Baltor Get started

Models

Gemma 3 27B

By Google. 27.4 billion parameters, a context window of 131,072 tokens and the licence gemma.

Facts

Released
2025-03-01 the day the repository was first published on Hugging Face Hugging Face, read
Licence
gemma the licence the model card declares Hugging Face, read
Open weights
Yes the weights are published in this Hugging Face repository, behind the maker's access form Hugging Face, read
Parameters
27.4 billion counted from the safetensors weight files Hugging Face, read
Active parameters
Unknown
Knowledge cutoff
2024-08-31 the knowledge cutoff OpenRouter lists OpenRouter, read
Context window
  • 131,072 tokens the maximum position embeddings in the model configuration model configuration, read
  • 131,072 tokens the context length OpenRouter lists OpenRouter, read
Longest output
  • 117,964 tokens the largest output OpenRouter's first provider allows OpenRouter, read
Tool calling
  • No the chat template in the tokenizer configuration has no place for tool definitions Hugging Face, read
  • 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
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

Prices in US dollars per million tokens, as each source lists them
ProviderInputOutputContextAs ofSource
Deep Infra direct0.080 USD0.160 USD131,072 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.080 USD0.160 USD131,072OpenRouter endpoints, read
Hugging Face direct0.080 USD0.160 USD131,072 older than 30 days; check the providermodels.dev, read
Kilo Gateway direct0.080 USD0.160 USD131,072 older than 30 days; check the providermodels.dev, read
Merge Gateway direct0.080 USD0.450 USD131,072 older than 30 days; check the providermodels.dev, read
OpenRouter direct0.080 USD0.450 USD131,072 older than 30 days; check the providermodels.dev, read
Parasail through OpenRouter0.080 USD0.450 USD131,072OpenRouter endpoints, read
Nebius through OpenRouter0.100 USD0.300 USD110,000OpenRouter endpoints, read
Nebius Token Factory direct0.100 USD0.300 USD110,000 older than 30 days; check the providermodels.dev, read
Novita through OpenRouter0.119 USD0.200 USD98,304OpenRouter endpoints, read
NovitaAI direct0.119 USD0.200 USD98,304 older than 30 days; check the providermodels.dev, read
STACKIT direct0.530 USD0.760 USD37,000 older than 30 days; check the providermodels.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.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
Q2_K9.8 GiB14.6 GiB26.3 GiB
Q3_K_S11.3 GiB16.3 GiB27.9 GiB
Q3_K_M12.5 GiB17.5 GiB29.1 GiB
Q3_K_L13.5 GiB18.6 GiB30.2 GiB
Q4_K_S14.6 GiB19.7 GiB31.3 GiB
Q4_K_M15.4 GiB20.6 GiB32.2 GiB
Q5_K_S17.5 GiB22.7 GiB34.4 GiB
Q5_K_M17.9 GiB23.2 GiB34.8 GiB
Q6_K20.6 GiB26.1 GiB37.7 GiB
Q8_026.7 GiB32.4 GiB44.1 GiB

Start it with a local runtime

  • Ollama
    ollama run hf.co/MaziyarPanahi/gemma-3-27b-it-GGUF:Q4_K_S
  • LM Studio
    lms get MaziyarPanahi/gemma-3-27b-it-GGUF
    lms server start
  • llama.cpp server
    llama-server -hf MaziyarPanahi/gemma-3-27b-it-GGUF:Q4_K_S --jinja
  • vLLM
    vllm serve google/gemma-3-27b-it
  • SGLang
    sglang serve --model-path google/gemma-3-27b-it --port 30000

Use it from your harness

Set up for DeepInfra with the model google/gemma-3-27b-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": {
    "deepinfra": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DeepInfra",
      "options": {
        "baseURL": "https://api.deepinfra.com/v1/openai",
        "apiKey": "{env:DEEPINFRA_TOKEN}"
      },
      "models": {
        "google/gemma-3-27b-it": {
          "name": "Gemma 3 27B",
          "limit": {
            "context": 131072,
            "output": 117964
          }
        }
      }
    }
  }
}
  • 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": {
    "deepinfra": {
      "baseUrl": "https://api.deepinfra.com/v1/openai",
      "api": "openai-completions",
      "apiKey": "$DEEPINFRA_TOKEN",
      "models": [
        {
          "id": "google/gemma-3-27b-it"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Codex speaks only the Responses API, and DeepInfra 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

Put this in ~/.claude/settings.json, or variables in your shell:

export ANTHROPIC_BASE_URL="https://api.deepinfra.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="$DEEPINFRA_TOKEN"
export ANTHROPIC_MODEL="google/gemma-3-27b-it"
claude
  • 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.