Model reference · open weights
vllm-translategemma is an open-weight language model from Infomaniak-AI. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Infomaniak-AI |
|---|---|
| Type | Language models |
| Task | Vision + text |
| Parameters (lead) | 5.0B |
| Context | 128k tokens |
| Runs with | transformers |
| Released | 2026-01-26 |
| Popularity | 577k downloads / month |
| Licence | Open, with conditions |
About
This is a modified version of google/translategemma-4b-it optimized for deployment with vLLM.
The original TranslateGemma model requires a structured payload with dedicated source_lang_code and target_lang_code fields:
{
"role": "user",
"content": [
{
"type": "text",
"source_lang_code": "cs",
"target_lang_code": "de-DE",
"text": "V nejhorším případě i k prasknutí čočky."
}
]
}
However, vLLM does not support these custom content parameters. To maintain compatibility, the chat template has been modified to encode language codes directly in the message content using a delimiter-based format:
{
"model": "model",
"messages": [
{
"role": "user",
"content": ">>cs>>de-DE>>V nejhorším případě i k prasknutí čočky."
}
]
}
Format: >>{source_lang}>>{target_lang}>>{text_to_translate}
If you need to provide a custom prompt input
Format: >>{text}
The original model uses the new Transformers RoPE configuration format with separate attention type settings:
"rope_parameters": {
"full_attention": {
"factor": 8.0,
"rope_type": "linear"
},
"sliding_attention": {
"rope_type": "default"
}
}
This has been simplified for vLLM compatibility:
"rope_parameters": {
"factor": 8.0,
"rope_type": "linear"
}
The EOS token has been corrected from to to ensure proper sequence termination.
Resources and Technical Documentation:
Terms of Use: Terms Authors: Google Translate
Summary description and brief definition of inputs and outputs.
TranslateGemma is a family of lightweight, state-of-the-art open translation models from Google, based on the Gemma 3 family of models. TranslateGemma models are designed to handle translation tasks across 55 languages. Their relatively small size makes it possible to deploy them in environments with limited resources such as laptops, desktops or your own cloud infrastructure, democratizing access to state of the art translation models and helping foster innovation for everyone.
Input:
Output:
TranslateGemma is designed to work with a specific chat template that supports direct translation of a text input, or text-extraction-and-translation from an image input. This chat template has been implemented with Hugging Face transformers' chat templating system and is compatible with the apply_chat_template() function provided by the Gemma tokenizer and Gemma 3 processor. Notable differences from other models' chat templates include:
TranslateGemma supports only User and Assistant roles.
TranslateGemma's User role is highly opinionated:
The content property must be provided as a list with exactly one entry.
The content list entry must provide:
The content list entry should provide one of these:
The "source_lang_code" and "target_lang_code" property values can take one of one of two forms:
en; ororen-GB, similar to the Unicode Common Locale Data Repository format.If the "source_lang_code" and "target_lang_code" property value is not supported by the model, an error will be raised when the template is applied.
from transformers import pipeline
import torch
pipe = pipeline(
"image-text-to-text",
model="google/translategemma-4b-it",
device="cuda",
dtype=torch.bfloat16
)
# ---- Text Translation ----
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"source_lang_code": "cs",
"target_lang_code": "de-DE",
"text": "V nejhorším případě i k prasknutí čočky.",
}
],
}
]
output = pipe(text=messages, max_new_tokens=200)
print(output[0]["generated_text"][-1]["content"])
# ---- Text Extraction and Translation ----
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"source_lang_code": "cs",
"target_lang_code": "de-DEFrom the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys vllm-translategemma for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (vllm-translategemma below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"vllm-translategemma","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.