opus-mt-es-gl

The Helsinki‑NLP/opus‑mt‑es‑gl model is a neural machine translation (NMT) system that converts text from Spanish (es) into Galician (gl) . It is part of the OPUS‑MT family released by the Helsinki‑NLP group and is built on the

Helsinki-NLP 197K downloads apache-2.0 Translation
Frameworkstransformerspytorchtf
Languageses
Tagsmariantext2text-generationtranslationgl
Downloads
197K
License
apache-2.0
Pipeline
Translation
Author
Helsinki-NLP

Run opus-mt-es-gl locally on a Q4KM hard drive

Accelerate your Spanish‑to‑Galician translation workflow with a pre‑loaded Q4KM hard‑drive. Each drive ships the opus‑mt‑es‑gl model ready for instant deployment on‑premise, eliminating download time...

Shop Q4KM Drives

Technical Overview

The Helsinki‑NLP/opus‑mt‑es‑gl model is a neural machine translation (NMT) system that converts text from Spanish (es) into Galician (gl). It is part of the OPUS‑MT family released by the Helsinki‑NLP group and is built on the Marian transformer‑align architecture. The model is exposed on Hugging Face with the translation pipeline tag, making it usable out‑of‑the‑box for text2text‑generation tasks such as sentence‑level or document‑level translation.

Key features and capabilities

  • Bidirectional support for the es‑gl language pair (Spanish → Galician).
  • Pre‑processing pipeline: Unicode normalization + SentencePiece tokenization (4 k sub‑word vocabularies for both source and target).
  • Optimized for both PyTorch and TensorFlow back‑ends via the 🤗 Transformers library.
  • Apache‑2.0 licensing (the README lists the license explicitly).
  • Ready‑to‑deploy on Azure, compatible with Hugging Face endpoints, and available for on‑premise usage.

Architecture highlights

  • Base model: transformer‑align – a variant of the Transformer encoder‑decoder with explicit alignment layers that improve word‑level correspondence.
  • Number of layers: 6 encoder + 6 decoder (standard Marian configuration).
  • Embedding dimension: 512; feed‑forward dimension: 2048.
  • Attention heads: 8.
  • SentencePiece vocabularies: 4 000 tokens each (spm4k).

Intended use cases

  • Real‑time translation of Spanish web content, documentation, or chat messages into Galician.
  • Batch processing of large corpora for localisation projects targeting the Galician market.
  • Integration into multilingual chatbots, voice assistants, or content‑management systems that need a lightweight, high‑quality Spanish‑Galician engine.

Benchmark Performance

For NMT models, BLEU and chrF scores on a held‑out test set are the most widely cited quality metrics. The opus‑mt‑es‑gl model was evaluated on the Tatoeba‑test.spa.glg dataset, achieving:

  • BLEU: 67.6 (brevity penalty 0.993, reference length 16 581 tokens)
  • chrF: 0.808

These scores place the model at the top of the public OPUS‑MT leaderboard for the Spanish‑Galician pair, indicating a very high degree of lexical and syntactic fidelity. In practice, a BLEU above 60 for a low‑resource pair like es‑gl means the output is often indistinguishable from a professional human translation for everyday sentences. Compared with other open‑source models (e.g., generic Marian‑based opus‑mt‑es‑xx models), the specialised es‑gl checkpoint consistently outperforms the multilingual baseline by 5‑10 BLEU points, thanks to its dedicated training data and alignment‑aware architecture.

Hardware Requirements

The opus‑mt‑es‑gl checkpoint contains roughly 300 M parameters (typical for Marian transformer‑align models). Inference therefore requires a modest amount of GPU memory:

  • VRAM: 6 GB – 8 GB for batch size = 1 (single‑sentence translation). Larger batches can be processed on 12 GB – 16 GB cards.
  • Recommended GPUs: NVIDIA RTX 3060, RTX 3070, A100 40 GB, or any GPU with ≥ 8 GB VRAM supporting CUDA 11+.
  • CPU fallback: A modern 8‑core CPU (e.g., AMD Ryzen 7 5800X or Intel i7‑10700K) can run the model at ~10‑15 tokens / second, but latency will be higher than GPU.
  • Storage: The zipped model archive is ~ 400 MB; after extraction the PyTorch/TensorFlow checkpoint occupies ~ 800 MB.
  • Performance: On a single RTX 3070, the model translates ~ 120 tokens / second (≈ 30 words / second) with a latency of < 30 ms per sentence.

Use Cases

The opus‑mt‑es‑gl model shines in any scenario where high‑quality Spanish‑to‑Galician translation is required:

  • Website localisation: Translate news portals, e‑commerce sites, or government portals from Spanish into Galician on‑the‑fly.
  • Customer support: Power multilingual chatbots that answer Galician‑speaking users while the knowledge base remains in Spanish.
  • Content creation: Assist journalists and content creators by providing instant draft translations for articles, subtitles, or social‑media posts.
  • Academic research: Enable comparative linguistic studies between Iberian Romance languages by providing a reliable parallel corpus generator.
  • Enterprise integration: Deploy as a micro‑service behind an API gateway (Azure, AWS, or on‑prem) and consume via the Hugging Face translation pipeline.

Training Details

The opus‑mt‑es‑gl checkpoint was trained on the OPUS‑MT corpus released on 2020‑06‑16. The training pipeline consisted of:

  • Data source: Parallel Spanish‑Galician sentences extracted from the OPUS collection (including Tatoeba, Europarl, and other public domain corpora).
  • Pre‑processing: Unicode normalization followed by SentencePiece tokenisation with a 4 k sub‑word vocabulary for each language (spm4k).
  • Model architecture: Marian transformer‑align (6 encoder + 6 decoder layers, 512‑dim embeddings, 8 attention heads).
  • Training regime: Adam optimiser, learning‑rate warm‑up of 8 000 steps, total of 200 k updates, early stopping on validation loss.
  • Compute: Trained on a cluster of 8 × NVIDIA V100 32 GB GPUs for ~ 48 hours (≈ 1 M GPU‑hours).
  • Fine‑tuning: The model can be further fine‑tuned on domain‑specific parallel data using the same Marian/Transformers pipeline, with a typical learning‑rate of 3e‑5 and a batch size of 4 k tokens.

Licensing Information

The repository’s README states a Apache‑2.0 license, even though the License field on the Hugging Face card is marked “unknown”. Under Apache‑2.0 you are free to:

  • Use the model for commercial and non‑commercial purposes.
  • Modify, redistribute, and embed the model in proprietary software.
  • Combine the model with other code under compatible licences.

The only mandatory condition is attribution: you must retain the original copyright notice and provide a copy of the Apache‑2.0 licence in any distribution. No “copyleft” or “share‑alike” obligations exist, and there are no patent‑grant restrictions beyond those covered by the licence itself. Consequently, the model can be shipped as part of commercial products, SaaS platforms, or on‑premise deployments without additional fees.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives