Select an effort
Use this exact first line of the system prompt, replacing 25 with 50, 75, or 100:
Reasoning Effort: 25 (range 1–100; higher values request more thorough reasoning)
Keep thinking enabled (enable_thinking=True). Any additional system instructions
follow this line on a new line. These values express learned reasoning preferences;
they are not hard token limits or percentages of a token budget. Values outside
the four trained settings are not validated for this release.
effort_presets.json contains all four complete instructions. The examples/
directory contains a chat request for each setting.
The evaluation environment used Transformers 5.20.2 and PyTorch 2.14.0.
Use a Transformers version with Gemma 4 support and enough memory for the full
BF16 model (approximately 52 GB of weight files, plus inference memory).
import torchfrom transformers import AutoModelForImageTextToText, AutoProcessor model_id = "krystofmitka/gemma-4-26B-A4B-effort-checkpoint167"effort = 25 # supported: 25, 50, 75, 100assert effort in (25, 50, 75, 100) processor = AutoProcessor.from_pretrained(model_id)model = AutoModelForImageTextToText.from_pretrained( model_id, dtype=torch.bfloat16, device_map="auto")messages = [ {"role": "system", "content": ( f"Reasoning Effort: {effort} " "(range 1–100; higher values request more thorough reasoning)" )}, {"role": "user", "content": "Solve 3x + 7 = 28. Explain your answer."},]inputs = processor.apply_chat_template( messages, add_generation_prompt=True, enable_thinking=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)with torch.inference_mode(): output = model.generate( **inputs, max_new_tokens=65536, do_sample=True, temperature=1.0, top_p=0.95, top_k=64 )generated = output[0, inputs["input_ids"].shape[-1]:]print(processor.tokenizer.decode(generated, skip_special_tokens=False))
The decoded response includes the thinking channel and final answer. The chosen
output limit above matches the evaluation protocol; applications can choose a
smaller limit, which may truncate reasoning or the final answer.
vLLM
Serve the model with a vLLM release that supports Gemma 4:
vllm serve krystofmitka/gemma-4-26B-A4B-effort-checkpoint167 --served-model-name effort-model --max-model-len 262144
Send the same system instruction in chat-completion requests, with
chat_template_kwargs={"enable_thinking": true}. Example request bodies for
all four settings are provided in examples/effort_25.json, effort_50.json,
effort_75.json, and effort_100.json. Backend requirements depend on the GPU;
the B300 evaluation used Triton attention and MoE backends.
Evaluation available for this checkpoint
The following are preliminary single-pass GPQA-Diamond results, with all
198 selected questions answered for every setting. They are not multi-seed
aggregates, and no across-seed confidence intervals are available for this table.
Sampling: temperature 1.0, top-p 0.95, top-k 64; maximum output 65,536 tokens;
context 262,144 tokens; vLLM and EvalScope 1.14.1. None of these responses was
truncated. Thinking tokens are distinct from total output tokens.
Table with columns: Setting, Accuracy, Mean thinking tokens, Mean output tokens| Setting | Accuracy | Mean thinking tokens | Mean output tokens |
|---|
| Original Gemma 4 | 79.80% | 11,040 | 11,822 |
| Checkpoint 167, no effort line | 80.81% | 8,849 | 9,580 |
| Checkpoint 167, effort 25 | 81.31% | 4,726 | 5,238 |
| Checkpoint 167, effort 50 | 76.26% | 6,147 | 6,781 |
| Checkpoint 167, effort 75 | 81.82% | 8,131 | 8,852 |
| Checkpoint 167, effort 100 | 79.29% | 8,362 | 9,092 |
The twelve-benchmark evaluation was stopped at the owner's request. Its MMLU-Pro
pass was incomplete, and the other ten benchmarks had not started. These results
therefore do not establish general capability preservation or accuracy gains.
A later effort-10 experiment was also stopped before completion and is not a
supported-setting result for this release.
Provenance and license
checkpoint_metadata.json records the checkpoint identity, original model
revision, adapter SHA-256, and evaluation scope. weights_manifest.json records
the size and SHA-256 of every merged weight shard. Training remains paused at
step 167; this release is not the planned 500-step checkpoint.
The original model is by Google DeepMind and is distributed under Apache 2.0.
The weights in this repository were modified by supervised warm-up and GRPO
fine-tuning. See LICENSE, NOTICE, and BASE_MODEL_CARD.md for the upstream
license and original model information. Upstream benchmark results in the
original model card describe the original model, not this fine-tune.