Views
No views yet
SentenceTransformer embeddings.training.ipynb: Notebook for fine-tuning the models.evaluation.ipynb: Notebook for evaluating outputs using semantic and human-level metrics.Galician.json: Dataset containing English-Galician translation pairs.translation_models/: Directory to save fine-tuned models.scripts/: Helper functions for preprocessing, training, and evaluation.git clone https://github.com/username/Translation-Models-En-Gl.gitpip install transformers datasets sentencepiece torch sacrebleu rouge-scoretraining.ipynb notebook to fine-tune T5-small or Helsinki-NLP models.translation_models directory.evaluation.ipynb notebook to generate outputs and compute metrics.1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3# Load model and tokenizer
4tokenizer = AutoTokenizer.from_pretrained("Swethamani/Translation-Models-En-G")
5model = AutoModelForSeq2SeqLM.from_pretrained("Swethamani/Translation-Models-En-G")
6
7# Translate English to Galician
8input_text = "Translate this text into Galician."
9inputs = tokenizer(input_text, return_tensors="pt")
10outputs = model.generate(**inputs)
11print(tokenizer.decode(outputs[0], skip_special_tokens=True))SentenceTransformer embeddings to compare input and output.transformers, SentenceTransformer, datasets, sacrebleu, and rouge-score.