Blog

Training a small translation model that beats the state of the art is now easy

Bruno Machado Valerio
View profilePublished November 25, 20266 min read

Elevata is one team across Canada and Brazil, so translation runs through everything we do: Slack threads, meeting captions, proposals and contract clauses, all day, in English and Brazilian Portuguese. That traffic is too narrow and too constant to pay a frontier model per token for it forever, so we went looking for an open model to run ourselves.

Translation is about the most basic thing a language model does, and open translation models small enough for a laptop now score near the top of public benchmarks. Xiaomi’s MiLMMT-46-4B is one of the strongest of its size. Then a colleague wrote “ta assinado ja esse contrato Bruno”: the contract is signed, Bruno. The model turned it into “You already signed that contract, Bruno.” It had decided Bruno was the one who signed.

It isn’t a hard sentence. A general model has simply never seen how we write.

From hundreds of hours to 6.5

It wasn’t a one-off. The same model turned a Slack <!here> into <Aqui>, which notifies no one. It translated an NDA sent “for execution”, meaning for signature, as “para execução”, which no Brazilian reads as signing. And it turned our AWS Generative AI Competency into “expertise in Generative AI”, losing the program name our clients look for. That’s what we had to teach it: our shorthand, our tools and the legal and partner vocabulary we use every day.

A few years ago, a translation model this good took a research team and hundreds of hours of GPU time. Today every ingredient is off the shelf: an open model that already translates well, a frontier model to write examples and grade the results, and GPUs you rent by the hour. What a general model lacks is the one thing every company already has: its own chats, meetings, documents and website.

So we didn’t build a translation model. We taught the one that failed. Frontier models on Amazon Bedrock wrote clean reference translations of real patterns from our own work, in our style and in Brazilian Portuguese: 16,170 training pairs across workplace chat, live meetings, business and legal documents, and marketing copy, half in each direction. Then we trained MiLMMT-46-4B and its 1B sibling on them.

Architecture diagram in the AWS Cloud: a bilingual corpus in Amazon S3 feeds Amazon Bedrock, the teacher and judge, then GPU fine-tuning on Amazon EKS, which stores trained models in Amazon S3. Slack and meeting services reach a model gateway that routes to vLLM, KEDA and Karpenter on Amazon EKS or to Amazon Bedrock. The trained models also run offline on laptops, from 0.7 to 4.1 GB.

The training was the easy part. Each run is a container on Elevata’s AWS Inference Accelerator, the Amazon EKS platform we deploy for clients. Karpenter starts a GPU node (NVIDIA L4, A10G or A100) when a run begins and removes it when the run ends, and datasets, checkpoints and builds are versioned in Amazon S3. The run that produced our 4B took about six and a half hours, updated under 3% of its weights and never used more than 14.9 GB of GPU memory. The 1B trained all of its weights in under four hours. We didn’t need compression tricks either: plain BF16 training beat 4-bit QLoRA.

A 4 GB model that beats the state of the art on our work

The message that started all this now comes back right: “That contract is already signed, Bruno.” The same goes for the <!here>, the NDA sent for signature and our Competency name.

Our 4B is the same size as the model it started from and makes 96% fewer critical errors. We tested every model on the same 464 English and Brazilian Portuguese cases. Each score is the share of translations a blind judge rated faithful.

Off-the-shelf 4BOur 4B, 8-bitOur 4B, 4-bitOur 1B, 5-bit
Size4.1 GB4.1 GB2.2 GB0.7 GB
Speed1.0×1.0×1.5×4.5×
Overall68.5%83.8%80.8%65.8%
Workplace chat71.3%94.2%86.2%74.7%
Live meetings73.9%90.2%87.0%77.2%
Marketing and web83.2%91.1%85.2%75.3%
High-stakes business45.0%85.0%90.0%65.0%
Contract clauses, PT-BR to EN92.5%96.2%96.2%83.0%
Critical errors281417

Its Portuguese stayed Brazilian in 99.6% of translations and in every chat message, and the 4-bit build halves the footprint while keeping most of the gain.

Bigger wasn’t better. We fine-tuned Tencent’s Hy-MT2-7B on the same data, and it reached 76.4% overall and 86.8% on contract clauses, against 83.8% and 96.2% for our 4B, which also ran about 30–40% faster.

How we kept the test honest

Fine-tuning results often look good only because test examples leak into training, so we closed that door first. Every thread, document and page stayed whole on one side of the split between training and testing, and we removed anything too close to a test example. Claude Haiku 5.5 on Amazon Bedrock then judged every test translation without knowing which model wrote it. It comes from a different model family than the teacher and the students.

Testing that strict also caught the project’s hardest bug, and it wasn’t in the training at all. Newer versions of Hugging Face transformers save RoPE settings under rope_parameters, while our inference runtimes read rope_scaling and rope_theta at the top level. The models loaded without a single error, then quietly fell apart after about 400 characters: only 10.7% of long documents passed. Restoring two keys took that to 100% (28 of 28).

Where it runs, and where it still slips

Shared services such as Slack bots, meeting captions and internal portals run the models on vLLM in Amazon EKS. KEDA scales replicas with demand, Karpenter adds GPU nodes, and our model gateway routes each request to these models or to Amazon Bedrock. We pay for GPU capacity, not per token, on the same inference stack we built for Starya’s healthcare AI agents.

The same weights also run offline. The 8-bit 4B needs about 5 GB of memory and answers a typical message in under a second, and the 1B needs 1.2 GB and answers in 0.22 seconds. MLX builds run on Apple Silicon, and GGUF builds run in LM Studio and llama.cpp on Windows and Linux with the same quality. A lawyer on a plane can translate a confidential draft without a byte leaving the laptop, with the same terminology as the shared service.

It isn’t finished everywhere. The 1B is the surprise of the project: tuning added 15.4 points, and at 0.7 GB it beat the untuned 4B on chat, meetings and high-stakes text. It stays in testing until it stops slipping into European Portuguese now and then.

Full legal documents are the hardest case. Faithfulness rose from 42.4% to 57.6% (67.1% in the GGUF build), and critical errors fell from 18 to 0. That makes the model a strong first draft for bilingual contracts, with a person reviewing every one.

Every company already has the training data

We picked translation because it looked solved. For our work it wasn’t, and the same is true of almost any task a company repeats all day in its own words. The best candidates are narrow, high in volume and easy to check, and the examples to learn from are already sitting in your systems.

Years of resolved support tickets can teach a model to route each new one to the right team at the right priority. Signed contracts can teach one to pull renewal dates, liability caps and payment terms into the fields your finance system reads. Your own documents can teach one to redact names, CPFs and Social Insurance Numbers before a file leaves the company. Your data warehouse’s query history can teach one to write SQL that fits your schema, and meeting transcripts paired with the tickets that followed can teach one to turn a meeting into tasks in your team’s format.

Each follows our recipe. A frontier model on Amazon Bedrock writes the examples and grades the results, an open model of a few gigabytes learns the work in hours, and it runs on capacity you control, down to a laptop.

If one of those sounds like your work, our Data & AI team can help you pick the first model and find out how small it can get.

Continue reading