DEV Community

Cover image for [ Open Source Project] open-translate — Offline Translation Web Service Powered by TranslateGemma

[ Open Source Project] open-translate — Offline Translation Web Service Powered by TranslateGemma

I’ve provided a Google Colab test script for this project. You can apply for Hugging Face and ngrok tokens to test it. Welcome to use it!



On January 15, 2026, Google released a new model named TranslateGemma. It can perform translation tasks for 55 languages, including Traditional Chinese and English, based on its specific training. It even supports image input for translation output.

I wondered if it was possible to create an offline "Google Translate-like" web service so that corporate confidential data could be processed in a non-networked environment. Thus, this project was born. This article will introduce TranslateGemma and my personal project.

I. Introduction to TranslateGemma

1. Background & Overview

TranslateGemma is a specialized LLM for translation tasks developed by Google DeepMind, built on the Gemma 3 architecture. It aims to provide the strongest translation capabilities in the open-source community. Unlike general chatbots, TranslateGemma focuses on language conversion. Weights are publicly available on Hugging Face and Vertex AI for local or cloud deployment.

2. Architecture & Training

Its core advantage comes from a unique "two-stage training" process:

  • Supervised Fine-Tuning (SFT): Utilizing high-quality human translation data and synthetic data generated by Gemini.
  • Reinforcement Learning (RL): Further guided by translation reward models like MetricX-QE and AutoMQM to align with human preferences and semantic precision.
  • Model Sizes: Available in 4B (mobile), 12B (laptop/workstation), and 27B (cloud).

3. Key Features

  • Supported Languages: 55 core languages with training on nearly 500 language pairs. > PS: According to the tech report, Traditional Chinese-related pairs include EN/Cantonese -> Trad. Chinese and Trad. Chinese -> Cantonese.
  • Multimodal Potential: Inherits Gemma 3's vision capabilities, enabling "visual translation" to understand text context in images (signs, menus, etc.).
  • High Efficiency: The 12B version often outperforms larger unspecialized models in translation quality. > Reminder: Max Context Window is 2k.

4. Performance & Applications

Excelled in authority benchmarks like WMT24++.

  • The 12B version's quality (MetricX) even surpasses the general Gemma 3 27B model, proving the effectiveness of specialized training.
  • Its flexibility makes it the best choice for balancing lightweight design and high quality in the open-source community.

5. Information


II. Open Translate — Modern Interface for TranslateGemma

Open Translate was created to bridge the gap in localization and privacy.

1. Technology Stack

(1) Backend: FastAPI for high-performance async API. Uses Hugging Face transformers to call the translategemma-4b-it model with CUDA acceleration.
(2) Frontend: React (Vite) + Bootstrap for a clean, modern UI with real-time previews.
(3) Database: SQLite (SQLAlchemy) for translation history logs.

2. Highlights & Localization

  • Multimodal Support: Image translation interface for screenshots, signs, or documents.
  • Trad. Chinese Optimization: Integrated OpenCC to convert outputs into Taiwan-style phrasing and Traditional Chinese characters.
  • Privacy & Security: Supports full offline deployment via Docker to ensure data remains internal.

3. Quick Start

3. Github

Link: https://github.com/simonliu-ai-product/open-translate/tree/main


III. Conclusion

The release of TranslateGemma proves that specialized small models can punch above their weight.

  1. Democratizing Compute: 4B models provide professional quality on home laptops, lowering the barrier to entry.
  2. Multimodal is Future: Translation moves beyond text to direct visual understanding, changing how we interact with the world.
  3. Open Source Value: Combining Google's models with modern web frameworks enables rapid problem-solving.

Open Translate is just a starting point. I will continue to optimize localization and explore integration with AI Agents. Welcome to download the source code on GitHub, give it a Star, or test it via Colab!


I am Simon

Hi everyone, I am Simon Liu, an AI Solutions Expert and a Google Developer Expert (GDE) in GenAI. I look forward to helping enterprises implement AI technologies. If this article was helpful, please give it a "Clap" on Medium and follow my account. Feel free to leave comments on my LinkedIn!

My Personal Website: https://simonliuyuwei.my.canva.site/link-in-bio

Top comments (0)