Gemma 4 12B IT

GEMMA_4_12B_IT

Google Gemma 4 12B, a multilingual assistant for chat, writing, code and maths in over 140 languages, that can reason step by step before it answers when you turn thinking on.

Text Generationllmchatgemmagooglemultilingualreasoningapache-2.0Fine-tunable
Gemma 4 12B IT: Text Generation model on Kainguru

About Gemma 4 12B IT

Capabilities

  • Over 140 languages — pre-trained on more than 140, with 35+ supported out of the box
  • Thinking on request — enable_thinking lets it reason first; the reasoning comes back apart from the answer
  • Long prompts — up to 8,192 tokens in and 16,384 out

Good to know

  • Text only; the model's image, audio and video input is not offered.
  • Google recommends temperature 1.0, top_p 0.95 and top_k 64; the defaults here are lower, so set them for open-ended writing.
  • Thinking is off unless enable_thinking is on, and does not combine with stop_sequences. Reasoning tokens are billed as output tokens.
  • A fine-tune learns its replies as given with thinking off. The model's control tokens, such as <|turn>, <turn|>, <|channel>, <channel|> and <|think|>, are refused in messages and training data.
  • Fine-tuning examples are cut to 1,024 tokens.
  • The model card gives no list of the 35+ languages supported out of the box; check a sample in your language, Azerbaijani included, before you rely on it.

Gemma 4 12B IT inputs and output

NameTypeRequiredDefaultDetails
prompttextYes—Your message to the model.
1–131072 characters
system_prompttextNo—Instructions for how the assistant should behave; the model's own default when empty.
Max 32768 characters
enable_thinkingbooleanNofalseLet the model reason step by step before it answers: better on hard problems, slower, and its reasoning tokens are billed, so allow a larger max_new_tokens. The reasoning comes back apart from the answer. Not with stop_sequences.
seedintegerNo—The same seed and inputs give the same reply.
0–4294967295
max_new_tokensintegerNo4096The most tokens the reply may have, reasoning included.
1–16384
stop_sequencestextNo—JSON array of up to 4 texts of up to 64 characters that end the reply, e.g. ["\n\n"].
Max 1554 characters
temperaturenumberNo0.7Randomness of the reply; below 0.01 always picks the most likely next token.
0–2
top_kintegerNo50Sample only from this many most likely tokens.
1–200
repetition_penaltynumberNo1.0Above 1.0 discourages repeating the same words.
1–2
top_pnumberNo0.9Sample only from the most likely tokens whose probabilities add up to this.
0–1

Output. The model's reply. With enable_thinking on, the model reasons first and that reasoning comes back apart from the answer: in reasoning, with text holding only the final answer.

Run Gemma 4 12B IT with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=GEMMA_4_12B_IT" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "example",
    "enable_thinking": false,
    "max_new_tokens": 4096,
    "repetition_penalty": 1.0,
    "temperature": 0.7,
    "top_k": 50,
    "top_p": 0.9
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "GEMMA_4_12B_IT",
        {
          "prompt": "example",
          "enable_thinking": False,
          "max_new_tokens": 4096,
          "repetition_penalty": 1.0,
          "temperature": 0.7,
          "top_k": 50,
          "top_p": 0.9
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune Gemma 4 12B IT

You can fine-tune Gemma 4 12B IT on your own data and run the tuned model through the same API. Dataset: JSONL files (an example per line) or JSON arrays of examples: {"messages": [{"role", "content"}, ...]} (up to 64; a system message, if any, first) or {"prompt", "response"}, at most 131,072 characters each. 4 to 50,000 replies, 256 MiB in all.

The steps are in the docs.

Gemma 4 12B IT pricing

Price per 1M tokens: 3058 credits ($30.58). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Gemma 4 31B IT: Text Generation model on Kainguru
Text Generation

Gemma 4 31B IT

Gemma 4 31B, Google's open assistant for chat, reasoning, writing and code in over 35 languages, that thinks step by…

Fine-tunable
Qwen3.5 2B: Text Generation model on Kainguru
Text Generation

Qwen3.5 2B

Qwen3.5 2B, a small assistant for chat, writing, summaries and code in about 200 languages, Azerbaijani included, that…

Fine-tunable
Qwen3.5 9B: Text Generation model on Kainguru
Text Generation

Qwen3.5 9B

Qwen3.5 9B, a strong assistant for chat, reasoning, writing and code in about 200 languages, Azerbaijani included…

Fine-tunable
Qwen3.8 27B: Text Generation model on Kainguru
Text Generation

Qwen3.8 27B

Qwen3.8 27B, Qwen's compact assistant for chat, reasoning, writing, code and agent-style tasks, that works through…

Fine-tunable
SmolLM3 3B: Text Generation model on Kainguru
Text Generation

SmolLM3 3B

SmolLM3 3B, a small, fully open assistant for chat, reasoning and writing in English, French, Spanish, German, Italian…

Fine-tunable
Granite 3.3 8B Instruct: Text Generation model on Kainguru
Text Generation

Granite 3.3 8B Instruct

IBM Granite 3.3 8B Instruct, a general-purpose assistant that answers questions, writes, summarises and codes in…

Fine-tunable