AIVory Smart Inference  ·  Gemma

Open Weight

Gemma 4 31B - Google quality, single-GPU cost.

Google DeepMind's 31B dense transformer. Tight instruction following, 128K context, and small enough to fit on one A100. Swap your base_url, done.

At a glance

Gemma 4 31B via Smart Inference.

Routed to the cheapest live provider on every request. Same model, lower bill.

31B
Parameters

Dense Transformer

128K
Context window

tokens per request

Cheapest input price

per 1M tokens via Smart Inference

%
Cheaper

vs the priciest endpoint for the same model

Pricing

Gemma 4 31B: price comparison.

Our cheapest routed price vs what you'd pay elsewhere.

Fetching prices…

Prices in USD per 1M input tokens · updated live from the router

Quick start

Use Gemma 4 31B in three lines.

OpenAI-compatible. Swap your base_url, keep everything else.

from openai import OpenAI

client = OpenAI(
    base_url="https://smart.aivory.net/v1",
    api_key="sk-aivory-...",
)

resp = client.chat.completions.create(
    model="gemma-4-31b",
    messages=[{"role": "user", "content": "Ship it."}],
)
print(resp.choices[0].message.content)

That's the whole migration. Get early access and try it →

Use cases

What Gemma 4 31B is great at.

  1. Structured Output Pipelines

    Gemma 4 follows output format instructions more reliably than most 70B models. Define a JSON schema in your system prompt, and it sticks to it. Good for ETL pipelines, form parsing, and any workflow where format compliance matters.

  2. Classification and Extraction at Scale

    At 31B parameters, Gemma 4 runs fast and cheap. Process 100K support tickets, tag them by category and sentiment, and extract key entities. Per-ticket cost is a fraction of a cent.

  3. On-Premise and Hybrid Deployment

    Small enough for a single A100 or even a pair of RTX 4090s. Self-host it through the <a href='/smart-inference/cheap-gpu/'>GPU Marketplace</a> for data-sensitive workloads, or use the API for everything else.

FAQ

Common questions.

What does Gemma 4 31B cost through AIVory?

Gemma 4 is one of the cheaper models in the catalogue thanks to its small size. The exact rate changes with provider load. Check the live table above for the current price per million tokens.

Gemma 4 31B vs Llama 3.3 70B - which is better?

Gemma 4 costs roughly half as much per token because it's a 31B model. It matches Llama 3.3 on instruction following and structured tasks. Llama 3.3 has an edge on open-ended reasoning. Try both and compare output quality for your specific prompt.

Can I self-host Gemma 4 on a spot GPU?

Yes. Gemma 4 fits on a single GPU with 40GB+ VRAM. Rent one from the GPU Marketplace, and Smart Inference routes to your dedicated instance. Useful when you need data locality or guaranteed capacity.

What is Gemma 4's training data?

Google DeepMind trained Gemma 4 on a filtered web corpus, code, and multilingual text. Exact dataset composition isn't published, but the model handles English, German, French, Spanish, Japanese, and Chinese well.

Start using Gemma 4 31B. Today.

Swap your base_url, keep shipping.

The router is live. Credits from $10, no subscription, no commitment.