Workload-Driven Optimization for On-Device Real-Time Subtitle Translation
This paper presents LocalSubs, an on-device English-to-Traditional-Chinese subtitle translation system optimized for low-latency, privacy-preserving inference on Taiwan devices by reducing the vocabulary size to 64k tokens, which significantly improves decoding speed and achieves a 59.2% win rate against Google Translate on short inputs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you're trying to translate a movie subtitle in real-time on your own laptop, right before the text disappears from the screen. You want it to be fast, private (so no data leaves your device), and sound natural to someone in Taiwan. This is the challenge the paper tackles.
Most big translation tools are like massive delivery trucks designed to haul huge loads of cargo (long documents) or run in a giant convoy (processing hundreds of requests at once). But translating a single subtitle line is more like a ninja sprinting to deliver a single, tiny note. The paper argues that using those giant trucks for a ninja sprint is a waste of time and energy. Instead, they built a custom, lightweight scooter specifically for this job.
The "Heavy Backpack" Problem
The researchers started with a standard translation model (LMT-60-0.6B). They found that even after making the model smaller and lighter using a technique called "quantization" (which is like compressing a heavy backpack into a smaller, denser one), the model was still struggling with one specific part of the job: the "vocabulary projection."
Think of the model's vocabulary as a giant dictionary. The original model had a dictionary with 151,936 words. Every time the model wanted to say a word, it had to flip through all 151,936 pages to find the right one. This took too much time, especially when you only have a split second to write a subtitle.
The Custom Dictionary Solution
The team realized that for movie subtitles, you don't need a dictionary for everything in the universe. You mostly need words for movies, conversations, and Taiwan-specific slang. So, they built a brand-new, custom dictionary with only 64,024 words, trained specifically on English and Traditional Chinese subtitles.
This change did two cool things:
- Smaller Dictionary: The model now only has to flip through 64,024 pages instead of 151,936. This is a 57.9% reduction in the size of the dictionary.
- Denser Packing: In the old dictionary, one "token" (a chunk of text) might represent just one Chinese character. In the new subtitle dictionary, one token could represent 1.40 characters on average. It's like packing your suitcase more efficiently; you fit more meaning into fewer steps.
The "Re-Training" Magic
You can't just swap a dictionary in a model without breaking it, because the numbers (IDs) for the words change. To fix this, the researchers used a clever two-step process:
- Migration: They copied over the meanings for words that existed in both dictionaries. For new words, they averaged the meanings of the smaller pieces that made them up.
- Calibration: Before teaching the model new things, they did a "warm-up" where they only tweaked the dictionary and the final output layer, keeping the rest of the brain frozen. This helped the model get used to the new dictionary without forgetting everything it knew.
- Fine-Tuning: Finally, they taught the whole model on a fresh set of 233,088 subtitle examples.
The Results: Fast and Private
When they tested this new system, called "LocalSubs," against Google Translate on 500 specific examples:
- Quality: It won 59.2% of the time (when ignoring ties) in a head-to-head comparison judged by a super-smart AI (GPT-4o). This is impressive because it's running entirely on a local device, not a giant cloud server.
- Speed: On an Apple M2 chip, the new system was 1.63 times faster on average than the old system with the big dictionary. The time to generate a subtitle dropped from 92.7 ms to 56.8 ms.
- The Catch: The system is a superhero for short sentences (1–3 words), winning 82.0% of the time there. But as sentences get longer (8+ words), the win rate drops to 45.7%. The paper suggests this is because longer sentences are harder to compress without losing details.
What They Didn't Prove (Yet)
The authors are very honest about what is still a "work in progress." The speed numbers come from a "profiling" run, which is like a test drive before the final car is built. They admit they don't have a complete, reproducible log of every single step yet, so the 1.63x speedup is a strong hint rather than a final, unshakeable fact. They also note that the "win rate" is relative to Google Translate, not a direct comparison to the cloud-based GPT-4o model, though they did test that too and found GPT-4o mini was slightly better at 64.6%.
The Bottom Line
This paper suggests that for on-device, real-time subtitle translation, the secret isn't just making the model smaller; it's redesigning the dictionary to fit the specific job. By swapping a massive, general-purpose dictionary for a lean, subtitle-specific one, they made the translation process significantly faster and more efficient, proving that sometimes, a smaller, specialized tool is better than a giant, general-purpose one. However, the team warns that the speed results are preliminary and need more rigorous testing to be considered a final victory.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.