πŸ€ Quadrifoglio - A small model for English -> Italian translation

Quadrifoglio is an encoder-decoder transformer model for English-Italian text translation based on bigscience/mt0-small. It was trained on the en-it section of Helsinki-NLP/opus-100 and Helsinki-NLP/europarl.

Usage

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Load model and tokenizer from checkpoint directory
tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-en-it")
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-en-it")

def generate_response(input_text):
    input_ids = tokenizer("translate English to Italian:" + input_text, return_tensors="pt").input_ids
    output = model.generate(input_ids, max_new_tokens=256)
    return tokenizer.decode(output[0], skip_special_tokens=True)

text_to_translate = "I would like a cup of green tea, please."
response = generate_response(text_to_translate)
print(response)

Evaluation

Done on the Opus 100 test set.

BLEU

mt0-Quadrifoglio mt0-small
BLEU Score 32.20 01.59
Precision 1 0.6168 0.2350
Precision 2 0.3773 0.0290
Precision 3 0.2601 0.0076
Precision 4 0.1833 0.0013
Downloads last month
20
Safetensors
Model size
300M params
Tensor type
F32
Β·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for LeonardPuettmann/mt0-Quadrifoglio-mt-en-it

Finetuned
(10)
this model

Datasets used to train LeonardPuettmann/mt0-Quadrifoglio-mt-en-it

Collection including LeonardPuettmann/mt0-Quadrifoglio-mt-en-it