gemma-4-31B-it
By google. 31.3 billion parameters, a context window of 262,144 tokens and the licence apache-2.0.
Facts
- Released
- 2026-03-11 the day the repository was first published on Hugging Face Hugging Face, read
- Licence
- apache-2.0 the licence the model card declares Hugging Face, read
- Open weights
- Yes the weights are published in this Hugging Face repository Hugging Face, read
- Parameters
- 31.3 billion counted from the safetensors weight files Hugging Face, read
- Active parameters
- Unknown
- Knowledge cutoff
- Unknown
- Context window
- 262,144 tokens the maximum position embeddings in the model configuration model configuration, read
- Longest output
- Unknown
- Tool calling
- Unknown
- Structured output
- Unknown
- Reasoning controls
- Unknown
- Inputs and outputs
- text, image in, text out Hugging Face, read
- Good for
- Vision: Hugging Face files it under image-text-to-text Hugging Face, read
Prices
| Provider | Input | Output | Context | As of | Source |
|---|---|---|---|---|---|
| Nvidia | 0 USD | 0 USD | 256,000 | older than 30 days; check the provider | models.dev, read |
| CoreWeave | 0.100 USD | 0.340 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Kilo Gateway | 0.100 USD | 0.340 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Lilac | 0.110 USD | 0.350 USD | 262,100 | older than 30 days; check the provider | models.dev, read |
| FastRouter | 0.130 USD | 0.380 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| OrcaRouter | 0.130 USD | 0.380 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| SiliconFlow | 0.130 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Abacus | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Crusoe | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Friendli | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Hugging Face | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Merge Gateway | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| NanoGPT | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Novita AI | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Vercel AI Gateway | 0.140 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| tensormesh | 0.140 USD | 0.560 USD | 32,768 | LiteLLM, read | |
| Deep Infra | 0.200 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| OpenRouter | 0.200 USD | 0.400 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| ai& | 0.200 USD | 0.500 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Infomaniak | 0.250 USD | 0.500 USD | 100,000 | older than 30 days; check the provider | models.dev, read |
| Berget.AI | 0.275 USD | 0.550 USD | 128,000 | older than 30 days; check the provider | models.dev, read |
| Together AI | 0.390 USD | 0.970 USD | 262,144 | LiteLLM, read | |
| sail | 0.400 USD | 0.600 USD | 256,000 | LiteLLM, read | |
| Pioneer | 0.500 USD | 0.500 USD | 32,768 | older than 30 days; check the provider | models.dev, read |
| AI/ML API | 1.36 USD | 2.05 USD | 256,000 | older than 30 days; check the provider | models.dev, read |
Run it on your own hardware
Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.
| Quantization | Weights | Memory at 8,192 tokens | Memory at 32,768 tokens |
|---|---|---|---|
| UD-IQ2_XXS | 7.9 GiB | 16.3 GiB | 38.8 GiB |
| UD-IQ2_M | 10.0 GiB | 18.5 GiB | 41.0 GiB |
| UD-Q2_K_XL | 11.0 GiB | 19.5 GiB | 42.0 GiB |
| UD-IQ3_XXS | 11.0 GiB | 19.6 GiB | 42.1 GiB |
| Q3_K_S | 12.3 GiB | 20.9 GiB | 43.4 GiB |
| Q3_K_M | 13.7 GiB | 22.4 GiB | 44.9 GiB |
| UD-Q3_K_XL | 14.3 GiB | 23.0 GiB | 45.5 GiB |
| IQ4_XS | 15.2 GiB | 24.0 GiB | 46.5 GiB |
| IQ4_NL | 16.1 GiB | 24.9 GiB | 47.4 GiB |
| Q4_0 | 16.1 GiB | 25.0 GiB | 47.5 GiB |
| Q4_K_S | 16.2 GiB | 25.0 GiB | 47.5 GiB |
| Q4_K_M | 17.1 GiB | 25.9 GiB | 48.4 GiB |
| UD-Q4_K_XL | 17.5 GiB | 26.4 GiB | 48.9 GiB |
| Q4_1 | 17.8 GiB | 26.7 GiB | 49.2 GiB |
| Q5_K_S | 19.7 GiB | 28.7 GiB | 51.2 GiB |
| Q5_K_M | 20.2 GiB | 29.2 GiB | 51.7 GiB |
| UD-Q5_K_XL | 20.4 GiB | 29.4 GiB | 51.9 GiB |
| Q6_K | 23.5 GiB | 32.6 GiB | 55.1 GiB |
| UD-Q6_K_XL | 25.6 GiB | 34.9 GiB | 57.4 GiB |
| Q8_0 | 30.9 GiB | 40.4 GiB | 62.9 GiB |
| UD-Q8_K_XL | 32.6 GiB | 42.2 GiB | 64.7 GiB |
Start it with a local runtime
- Ollama
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q4_0 - LM Studio
lms get unsloth/gemma-4-31B-it-GGUF lms server start - llama.cpp server
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q4_0 --jinja - vLLM
vllm serve google/gemma-4-31B-it - SGLang
sglang serve --model-path google/gemma-4-31B-it --port 30000
Use it from your harness
Set up for Abacus with the model google/gemma-4-31b-it. Each endpoint page has the same setup for its own address.
OpenCode
Put this in opencode.json in your project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"abacus": {
"npm": "@ai-sdk/openai-compatible",
"name": "Abacus",
"options": {
"baseURL": "https://routellm.abacus.ai/v1",
"apiKey": "{env:ABACUS_API_KEY}"
},
"models": {
"google/gemma-4-31b-it": {
"name": "gemma-4-31B-it"
}
}
}
}
}- OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.
From OpenCode documentation, read .
Pi
Put this in ~/.pi/agent/models.json:
{
"providers": {
"abacus": {
"baseUrl": "https://routellm.abacus.ai/v1",
"api": "openai-completions",
"apiKey": "$ABACUS_API_KEY",
"models": [
{
"id": "google/gemma-4-31b-it"
}
]
}
}
}- The apiKey field can name an environment variable as $NAME.
From Pi documentation, read .
Codex
Codex speaks only the Responses API, and Abacus documents no Responses address. A gateway that offers one can sit in between.
- Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.
From Codex documentation, read .
Claude Code
Claude Code sends Anthropic Messages requests, and Abacus documents no such address. A gateway that translates to that API can sit in between.
- Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.
From Claude Code documentation, read .
Other ways to reach it
- ai&, model
google/gemma-4-31b-it - AI/ML API, model
google/gemma-4-31b-it - Berget.AI, model
google/gemma-4-31B-it - Crusoe, model
google/gemma-4-31b-it - DeepInfra, model
google/gemma-4-31B-it - FastRouter, model
google/gemma-4-31b-it - Friendli, model
google/gemma-4-31B-it - Hugging Face, model
google/gemma-4-31B-it - Infomaniak, model
google/gemma-4-31B-it - Kilo Gateway, model
google/gemma-4-31b-it - Lilac, model
google/gemma-4-31b-it
Published results
These are results other people published. Baltor did not run them and does not rank models by them.
- Results the maker published on the model card published by google Hugging Face, read
Two more publishers are linked, never copied, because their terms do not allow it:
- Artificial Analysis publishes its own intelligence, speed and price measurements.
- OpenRouter lists current prices and uptime for each provider it routes to.
Sources of this page
Paid links
No link in this directory is a paid link or an ad, and no listing is paid for. The order and the contents of every list come from the sources named on this page.