--- license: apache-2.0 base_model: Helsinki-NLP/opus-mt-en-es tags: - generated_from_trainer - translation - en - es datasets: - custom language: - en - es pipeline_tag: translation model-index: - name: fine-tuned-opus-mt-en-es results: - task: name: Translation type: translation dataset: name: Custom English-Spanish Dataset type: custom metrics: - name: BLEU type: bleu value: 65.8 --- # Fine-tuned English-Spanish Translation Model This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-es](https://huggingface.co/Helsinki-NLP/opus-mt-en-es) on a custom English-Spanish parallel corpus. ## Model Description - **Base Model**: Helsinki-NLP/opus-mt-en-es - **Task**: Machine Translation (English to Spanish) - **Language**: English → Spanish - **Fine-tuning Data**: Custom parallel corpus with educational and general domain text ## Performance The model achieves a BLEU score of **65.8** on the test set, indicating high-quality translation performance. ### Sample Translations | English | Spanish (Reference) | Spanish (Model) | |---------|-------------------|-----------------| | "The London and Rio de Janeiro buildings will be less than 540 meters and the Tokyo building will be taller than 540 meters." | "Los edificios de Londres y Río de Janeiro tendrán menos de 540 metros y el de Tokio será más alto de 540 metros." | "Los edificios de Londres y Río de Janeiro serán menos que 540 metros y el edificio de Tokio será más alto que 540 metros." | | "What are some other ways to think about quantities in this problem?" | "¿De qué otras maneras puedes pensar en las cantidades de este problema?" | "¿Qué otras maneras de pensar en las cantidades de este problema?" | ## Usage ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("omkarhurix/fine-tuned-opus-mt-en-es") model = AutoModelForSeq2SeqLM.from_pretrained("omkarhurix/fine-tuned-opus-mt-en-es") # Translate text text = "Hello, how are you?" inputs = tokenizer(text, return_tensors="pt") outputs = model.generate(**inputs) translation = tokenizer.decode(outputs[0], skip_special_tokens=True) print(translation) # "Hola, ¿cómo estás?" ``` ## Training Details - **Training Framework**: Hugging Face Transformers - **Training Method**: Fine-tuning with custom parallel data - **Evaluation Metric**: BLEU score - **Hardware**: GPU-accelerated training ## Citation If you use this model, please cite: ```bibtex @misc{fine-tuned-opus-mt-en-es, title={Fine-tuned English-Spanish Translation Model}, author={omkarhurix}, year={2025}, howpublished={\url{https://huggingface.co/omkarhurix/fine-tuned-opus-mt-en-es}}, } ``` ## License This model is released under the Apache 2.0 License, same as the base model.