Gemma 2 9B IT
Gemma 2 9B IT is Google's 9-billion-parameter instruction-tuned Gemma 2 model for English chat and writing. Google reports its pretrained base at 68.6 on GSM8K math, against 23.9 for the 2B.
Overview
Gemma 2 9B IT is the instruction-tuned 9B checkpoint of Gemma 2, Google's family of open-weight, decoder-only text models built from the research behind Gemini. It has about 9.2 billion parameters. Its 8 trillion training tokens are mostly English web text, with code and math mixed in.
Google's Gemma 2 technical report says the 9B was trained by knowledge distillation from a larger teacher model, and it gives the context window as 8,192 tokens.
Google's card puts the pretrained 9B base at 71.3 on MMLU (5-shot) and 40.2 on HumanEval pass@1. The 2B base scores 51.3 and 17.7 on the same tests, and on GSM8K grade-school math the gap grows to 68.6 against 23.9.
Choosing a variant: pick this 9B model for knowledge questions, math and code, where Google's scores put it well ahead of the 2B. Gemma 2 2B IT uses the same input form and suits short, tightly scoped prompts like rewrites or one-turn replies.
What you can build
- English FAQ assistants that answer from policy text pasted into the prompt, with chat history kept per user and session.
- Drafting tools for emails and product copy, where the system prompt sets the tone once.
- Summaries of meeting notes and short reports that fit in the 8,192-token window.
- Coding helpers that explain a snippet or write a small function.
Inputs
Only the prompt is required. The optional system prompt is prepended to it; Gemma 2's own chat format has just two roles, user and model.
For multi-turn chat, pass a user_id and a session_id. History is stored per user, and a new session_id starts a separate thread for that same user.
The advanced settings hold temperature (default 0.7, range 0 to 5), top_p (default 0.95), top_k, repetition and length penalties, a seed (default 123456) and a do_sample switch. max_tokens and min_tokens bound the reply length, and stop_sequences takes a semicolon-separated list. Quantization is on by default and may slightly affect output quality; switch it off for full precision.
Outputs
English text. The sample on this page answers the default prompt about historical events near the Tower of London. It walks through five episodes, starting with the Norman construction under William the Conqueror and including Anne Boleyn's imprisonment in 1536 and the Princes in the Tower in 1483. Each gets a story angle, and the answer closes with short tips for the writer.
Recommended settings
- Leave do_sample on at temperature 0.7 for drafting and brainstorming.
- Turn do_sample off for code or summaries, so the same prompt gives a consistent answer.
- Keep the system prompt short: it shares the 8,192-token window with your prompt and the stored history.
Limitations
- Training data is primarily English, and Google lists English text as the output.
- The card warns that the model can state incorrect or outdated facts and may miss sarcasm or figurative language. Check names and dates before publishing.
Safety & compliance
Use is governed by Google's Gemma Terms of Use and the Gemma Prohibited Use Policy. Google filtered the training data for CSAM and personal information and reports the instruction-tuned models' safety evaluations as within its internal thresholds. Developers are asked to add content safeguards that fit their own product.
API quick start
Run gemma-2-9b-it with a single API call.
{
"prompt": "What are some interesting historical even…",
"user_id": "...",
"session_id": "...",
"system_prompt": "You are a helpful, respectful and honest …"
}curl -X POST "https://api.wiro.ai/v1/Run/google/gemma-2-9b-it" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"prompt": "What are some interesting historical even…",
"user_id": "...",
"session_id": "...",
"system_prompt": "You are a helpful, respectful and honest …"
}
JSONOther models you might like
Explore similar llm & chat models.



