Views
No views yet
Build Environment & Features:
- Fine-tuning Framework: Unsloth
- Reasoning Effort: High
- This model bridges the gap between Google's exceptional open-weights architecture and Claude 4.6's profound reasoning capabilities, leveraging cutting-edge fine-tuning environments.

- Upgrade Alert: A significantly enhanced version of this distillation has been released. We highly recommend switching to v2 for a superior reasoning experience and improved stability.
- Model Link: gemma-4-26B-A4B-it-Claude-Opus-Distill-v2
1Base Model (unsloth/gemma-4-26B-A4B-it)
2 │
3 ▼
4Supervised Fine-Tuning (SFT) + High-Effort Reasoning Datasets
5 │
6 ▼
7Final Model (Gemma 4 - 26B A4B x Claude Opus 4.6)Deep Dive Analysis: For more comprehensive insights regarding the base capabilities of the Gemma 4 architecture, please refer to this Analysis Document.
| Dataset Name | Description / Purpose |
|---|---|
TeichAI/Claude-Opus-4.6-Reasoning-887x | Core Claude 4.6 Opus reasoning trajectories. |
TeichAI/Claude-Sonnet-4.6-Reasoning-1100x | Additional high-density reasoning instances from Claude 4.6 Sonnet. |
TeichAI/claude-4.5-opus-high-reasoning-250x | Legacy high-intensity reasoning distillation. |
Crownelius/Opus-4.6-Reasoning-2100x-formatted | Crownelius's extensively formatted Opus reasoning dataset for structural reinforcement. |
pip install -U transformers torch accelerate1from transformers import AutoProcessor, AutoModelForCausalLM
2
3MODEL_ID = "google/gemma-4-31B-it"
4
5# Load model
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = AutoModelForCausalLM.from_pretrained(
8 MODEL_ID,
9 dtype="auto",
10 device_map="auto"
11)1# Prompt
2messages = [
3 {"role": "system", "content": "You are a helpful assistant."},
4 {"role": "user", "content": "Write a short joke about saving RAM."},
5]
6
7# Process input
8text = processor.apply_chat_template(
9 messages,
10 tokenize=False,
11 add_generation_prompt=True,
12 enable_thinking=False
13)
14inputs = processor(text=text, return_tensors="pt").to(model.device)
15input_len = inputs["input_ids"].shape[-1]
16
17# Generate output
18outputs = model.generate(**inputs, max_new_tokens=1024)
19response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
20
21# Parse output
22processor.parse_response(response)enable_thinking=True and the parse_response function will take care of parsing the thinking output.AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process audio. To use it, make sure to install the following packages:pip install -U transformers torch librosa accelerate1from transformers import AutoProcessor, AutoModelForMultimodalLM
2
3MODEL_ID = "google/gemma-4-E2B-it"
4
5# Load model
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = AutoModelForMultimodalLM.from_pretrained(
8 MODEL_ID,
9 dtype="auto",
10 device_map="auto"
11)1# Prompt - add audio before text
2messages = [
3 {
4 "role": "user",
5 "content": [
6 {"type": "audio", "audio": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/journal1.wav"},
7 {"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
8 ]
9 }
10]
11
12# Process input
13inputs = processor.apply_chat_template(
14 messages,
15 tokenize=True,
16 return_dict=True,
17 return_tensors="pt",
18 add_generation_prompt=True,
19).to(model.device)
20input_len = inputs["input_ids"].shape[-1]
21
22# Generate output
23outputs = model.generate(**inputs, max_new_tokens=512)
24response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
25
26# Parse output
27processor.parse_response(response)AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process images. To use it, make sure to install the following packages:pip install -U transformers torch torchvision accelerate1from transformers import AutoProcessor, AutoModelForMultimodalLM
2
3MODEL_ID = "google/gemma-4-31B-it"
4
5# Load model
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = AutoModelForMultimodalLM.from_pretrained(
8 MODEL_ID,
9 dtype="auto",
10 device_map="auto"
11)1# Prompt - add image before text
2messages = [
3 {
4 "role": "user", "content": [
5 {"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
6 {"type": "text", "text": "What is shown in this image?"}
7 ]
8 }
9]
10
11# Process input
12inputs = processor.apply_chat_template(
13 messages,
14 tokenize=True,
15 return_dict=True,
16 return_tensors="pt",
17 add_generation_prompt=True,
18).to(model.device)
19input_len = inputs["input_ids"].shape[-1]
20
21# Generate output
22outputs = model.generate(**inputs, max_new_tokens=512)
23response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
24
25# Parse output
26processor.parse_response(response)AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process videos. To use it, make sure to install the following packages:pip install -U transformers torch torchvision torchcodec librosa accelerate1from transformers import AutoProcessor, AutoModelForMultimodalLM
2
3MODEL_ID = "google/gemma-4-31B-it"
4
5# Load model
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = AutoModelForMultimodalLM.from_pretrained(
8 MODEL_ID,
9 dtype="auto",
10 device_map="auto"
11)1# Prompt - add video before text
2messages = [
3 {
4 'role': 'user',
5 'content': [
6 {"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
7 {'type': 'text', 'text': 'Describe this video.'}
8 ]
9 }
10]
11
12# Process input
13inputs = processor.apply_chat_template(
14 messages,
15 tokenize=True,
16 return_dict=True,
17 return_tensors="pt",
18 add_generation_prompt=True,
19).to(model.device)
20input_len = inputs["input_ids"].shape[-1]
21
22# Generate output
23outputs = model.generate(**inputs, max_new_tokens=512)
24response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
25
26# Parse output
27processor.parse_response(response)temperature=1.0top_p=0.95top_k=64system, assistant, and user roles. To properly manage the thinking process, use the following control tokens:<|think|> token at the start of the system prompt. To disable thinking, remove the token.<|channel>thought\n[Internal reasoning]<channel|><|channel>thought\n<channel|>[Final answer][!Note] Note that many libraries like Transformers and llama.cpp handle the complexities of the chat template for you.
1Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.
2
3Follow these specific instructions for formatting the answer:
4* Only output the transcription, with no newlines.
5* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.1Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
2When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.1@misc{teichai_gemma4_26b_a4b_opus_distilled,
2 title = {Gemma-4-26B-A4B-it-Claude-Opus-Distill},
3 author = {TeichAI},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/TeichAI/gemma-4-26B-A4B-it-Claude-Opus-Distill}}
7}