Baltor Get started

Models

Gemma 4 31B

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
  • 262,144 tokens the context length OpenRouter lists OpenRouter, read
Longest output
  • 16,384 tokens the largest output OpenRouter's first provider allows OpenRouter, read
Tool calling
  • Yes OpenRouter lists tools among the supported parameters OpenRouter, read
Structured output
  • Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
Reasoning controls
  • Yes OpenRouter lists reasoning controls OpenRouter, read
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
  • Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read

Prices

Prices in US dollars per million tokens, as each source lists them
ProviderInputOutputContextAs ofSource
Nvidia direct0 USD0 USD256,000 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.090 USD0.340 USD262,144OpenRouter endpoints, read
DeepInfra through OpenRouter0.090 USD0.340 USD262,144OpenRouter endpoints, read
Kilo Gateway direct0.090 USD0.340 USD262,144 older than 30 days; check the providermodels.dev, read
OpenRouter direct0.090 USD0.340 USD262,144 older than 30 days; check the providermodels.dev, read
CoreWeave direct0.100 USD0.340 USD262,144 older than 30 days; check the providermodels.dev, read
CoreWeave through OpenRouter0.100 USD0.340 USD262,144OpenRouter endpoints, read
CoreWeave through OpenRouter0.100 USD0.340 USD262,144OpenRouter endpoints, read
NanoGPT direct0.100 USD0.450 USD262,144 older than 30 days; check the providermodels.dev, read
Lilac direct0.110 USD0.350 USD262,100 older than 30 days; check the providermodels.dev, read
Venice through OpenRouter0.120 USD0.360 USD256,000OpenRouter endpoints, read
Venice through OpenRouter0.120 USD0.360 USD256,000OpenRouter endpoints, read
Chutes through OpenRouter0.120 USD0.370 USD131,072OpenRouter endpoints, read
Chutes through OpenRouter0.120 USD0.370 USD131,072OpenRouter endpoints, read
Deep Infra direct0.130 USD0.380 USD262,144 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.130 USD0.380 USD262,144OpenRouter endpoints, read
DeepInfra through OpenRouter0.130 USD0.380 USD262,144OpenRouter endpoints, read
FastRouter direct0.130 USD0.380 USD262,144 older than 30 days; check the providermodels.dev, read
OrcaRouter direct0.130 USD0.380 USD262,144 older than 30 days; check the providermodels.dev, read
SiliconFlow direct0.130 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Abacus direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Crusoe direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Crusoe through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
Crusoe through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
Friendli direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Friendli through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
Friendli through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
Hugging Face direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Merge Gateway direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Novita through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
Novita through OpenRouter0.140 USD0.400 USD262,144OpenRouter endpoints, read
NovitaAI direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Vercel AI Gateway direct0.140 USD0.400 USD262,144 older than 30 days; check the providermodels.dev, read
Parasail through OpenRouter0.150 USD0.400 USD262,144OpenRouter endpoints, read
Parasail through OpenRouter0.150 USD0.400 USD262,144OpenRouter endpoints, read
ai& direct0.200 USD0.500 USD262,144 older than 30 days; check the providermodels.dev, read
Infomaniak direct0.250 USD0.500 USD100,000 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.270 USD0.760 USD131,072OpenRouter endpoints, read
DeepInfra through OpenRouter0.270 USD0.760 USD131,072OpenRouter endpoints, read
Berget.AI direct0.275 USD0.550 USD128,000 older than 30 days; check the providermodels.dev, read
SambaNova through OpenRouter0.380 USD1.15 USD262,144OpenRouter endpoints, read
SambaNova through OpenRouter0.380 USD1.15 USD262,144OpenRouter endpoints, read
Together AI direct0.390 USD0.970 USD262,144 older than 30 days; check the providermodels.dev, read
Pioneer direct0.500 USD0.500 USD32,768 older than 30 days; check the providermodels.dev, read
ModelRun through OpenRouter0.750 USD1.00 USD262,144OpenRouter endpoints, read
ModelRun through OpenRouter0.750 USD1.00 USD262,144OpenRouter endpoints, read
SiliconFlow through OpenRouter0.750 USD1.00 USD262,144OpenRouter endpoints, read
SiliconFlow through OpenRouter0.750 USD1.00 USD262,144OpenRouter endpoints, 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.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
UD-IQ2_XXS7.9 GiB16.3 GiB38.8 GiB
UD-IQ2_M10.0 GiB18.5 GiB41.0 GiB
UD-Q2_K_XL11.0 GiB19.5 GiB42.0 GiB
UD-IQ3_XXS11.0 GiB19.6 GiB42.1 GiB
Q3_K_S12.3 GiB20.9 GiB43.4 GiB
Q3_K_M13.7 GiB22.4 GiB44.9 GiB
UD-Q3_K_XL14.3 GiB23.0 GiB45.5 GiB
IQ4_XS15.2 GiB24.0 GiB46.5 GiB
IQ4_NL16.1 GiB24.9 GiB47.4 GiB
Q4_016.1 GiB25.0 GiB47.5 GiB
Q4_K_S16.2 GiB25.0 GiB47.5 GiB
Q4_K_M17.1 GiB25.9 GiB48.4 GiB
UD-Q4_K_XL17.5 GiB26.4 GiB48.9 GiB
Q4_117.8 GiB26.7 GiB49.2 GiB
Q5_K_S19.7 GiB28.7 GiB51.2 GiB
Q5_K_M20.2 GiB29.2 GiB51.7 GiB
UD-Q5_K_XL20.4 GiB29.4 GiB51.9 GiB
Q6_K23.5 GiB32.6 GiB55.1 GiB
UD-Q6_K_XL25.6 GiB34.9 GiB57.4 GiB
Q8_030.9 GiB40.4 GiB62.9 GiB
UD-Q8_K_XL32.6 GiB42.2 GiB64.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",
          "limit": {
            "context": 262144,
            "output": 16384
          }
        }
      }
    }
  }
}
  • 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

Published results

These are results other people published. Baltor did not run them and does not rank models by them.