Instructions to use prithivMLmods/translategemma-4b-it-f32-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/translategemma-4b-it-f32-GGUF") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prithivMLmods/translategemma-4b-it-f32-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
Use Docker
docker model run hf.co/prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/translategemma-4b-it-f32-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/translategemma-4b-it-f32-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
- SGLang
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/translategemma-4b-it-f32-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/translategemma-4b-it-f32-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/translategemma-4b-it-f32-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/translategemma-4b-it-f32-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with Ollama:
ollama run hf.co/prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with Docker Model Runner:
docker model run hf.co/prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
- Lemonade
How to use prithivMLmods/translategemma-4b-it-f32-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prithivMLmods/translategemma-4b-it-f32-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.translategemma-4b-it-f32-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
translategemma-4b-it-f32-GGUF
TranslateGemma-4b-it from Google is a lightweight 4 billion-parameter instruction-tuned translation model from the TranslateGemma family, built on Gemma 3 architecture and trained on TPUv4p/v5p/v5e hardware using supervised fine-tuning (SFT) on human/Gemini-synthesized parallel corpora across 500+ language pairs followed by RL optimization with MetricX-QE and AutoMQM reward models, enabling high-fidelity text-to-text and image-to-text translation across 55 languages (including Spanish, French, Chinese, Hindi, Arabic, and low-resource ones) with a 2K-128K token context window and 896x896 image resolution support (256 tokens/image). Optimized for edge/mobile deployment on laptops/desktops/cloud with half the parameters of baselines yet rivaling 12B models (MetricX↓=5.32, COMET↑=81.6 on WMT24++ across 55 langs), it uses a highly opinionated JSON chat template requiring source_lang_code/target_lang_code and processes inputs like {"type": "text/image_url", "text"/"url": content} for outputs in target languages, democratizing state-of-the-art translation for developers via Transformers/vLLM. Available in 4B (mobile/edge), 12B (laptops), and 27B (cloud/H100) sizes under open license, it prioritizes efficiency, throughput, and low latency without quality compromise for multilingual/multimodal communication.
translategemma-4b-it [GGUF]
| File Name | Quant Type | File Size | File Link |
|---|---|---|---|
| translategemma-4b-it.IQ4_XS.gguf | IQ4_XS | 2.28 GB | Download |
| translategemma-4b-it.Q2_K.gguf | Q2_K | 1.73 GB | Download |
| translategemma-4b-it.Q3_K_L.gguf | Q3_K_L | 2.24 GB | Download |
| translategemma-4b-it.Q3_K_M.gguf | Q3_K_M | 2.1 GB | Download |
| translategemma-4b-it.Q3_K_S.gguf | Q3_K_S | 1.94 GB | Download |
| translategemma-4b-it.Q4_K_M.gguf | Q4_K_M | 2.49 GB | Download |
| translategemma-4b-it.Q4_K_S.gguf | Q4_K_S | 2.38 GB | Download |
| translategemma-4b-it.Q5_K_M.gguf | Q5_K_M | 2.83 GB | Download |
| translategemma-4b-it.Q5_K_S.gguf | Q5_K_S | 2.76 GB | Download |
| translategemma-4b-it.Q6_K.gguf | Q6_K | 3.19 GB | Download |
| translategemma-4b-it.Q8_0.gguf | Q8_0 | 4.13 GB | Download |
| translategemma-4b-it.f16.gguf | F16 | 7.77 GB | Download |
| translategemma-4b-it.f32.gguf | F32 | 15.5 GB | Download |
| translategemma-4b-it.mmproj-Q8_0.gguf | mmproj-Q8_0 | 591 MB | Download |
| translategemma-4b-it.mmproj-f16.gguf | mmproj-f16 | 851 MB | Download |
| translategemma-4b-it.mmproj-f32.gguf | mmproj-f32 | 1.67 GB | Download |
Quants Usage
(sorted by size, not necessarily quality. IQ-quants are often preferable over similar sized non-IQ quants)
Here is a handy graph by ikawrakow comparing some lower-quality quant types (lower is better):
- Downloads last month
- 880
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
32-bit
Model tree for prithivMLmods/translategemma-4b-it-f32-GGUF
Base model
google/translategemma-4b-it