This model is a fine-tuned version of Google's Gemma-4-E4B (4 billion parameters) specifically optimized for step-by-step reasoning and problem-solving tasks. It has been trained on high-quality chain-of-thought reasoning data distilled from Claude Opus 4.5 and 4.6, Anthropic's most capable reasoning models.
Key Features
🎯 Enhanced Reasoning: Trained on curated Opus reasoning traces for improved logical thinking
💭 Thinking Blocks: Uses <think>...</think> format for transparent reasoning
📊 Mathematical Excellence: Strong performance on math and quantitative problems
📝 Word Problems: Real-world scenario problem-solving
💬 Response Format
The model uses a structured thinking format for transparent reasoning:
<think>
[Internal reasoning process]
- Step 1: Understand the problem
- Step 2: Break down into sub-problems
- Step 3: Apply relevant knowledge
- Step 4: Verify the solution
</think>
[Final structured answer with clear formatting]
🚀 Usage
With Transformers
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
23model_id ="Ayodele01/gemma-4-E4B-Opus-4.6-Reasoning-Distill"45tokenizer = AutoTokenizer.from_pretrained(model_id)6model = AutoModelForCausalLM.from_pretrained(7 model_id,8 torch_dtype="auto",9 device_map="auto"10)1112# Example: Math problem13prompt ="""Solve this step by step:
14A store sells apples for $2 each and oranges for $3 each.
15If someone buys 5 apples and 3 oranges, and pays with a $50 bill,
16how much change should they receive?"""1718messages =[{"role":"user","content": prompt}]19inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)2021outputs = model.generate(22 inputs,23 max_new_tokens=1024,24 temperature=0.7,25 do_sample=True26)2728print(tokenizer.decode(outputs[0], skip_special_tokens=True))
With Unsloth (Recommended for Speed)
python
1from unsloth import FastModel
23model, tokenizer = FastModel.from_pretrained(4"Ayodele01/gemma-4-E4B-Opus-4.6-Reasoning-Distill",5 max_seq_length=4096,6 load_in_4bit=True,7)89# Use for inference...
📊 Example Outputs
Math Problem
Input:
Calculate the derivative of f(x) = x³ + 2x² - 5x + 3
Output:
<think>
To find the derivative, I'll apply the power rule to each term:
- For x³: d/dx(x³) = 3x²
- For 2x²: d/dx(2x²) = 4x
- For -5x: d/dx(-5x) = -5
- For 3: d/dx(3) = 0 (constant)
</think>
The derivative of f(x) = x³ + 2x² - 5x + 3 is:
**f'(x) = 3x² + 4x - 5**
Logic Problem
Input:
If all roses are flowers, and some flowers fade quickly, can we conclude that some roses fade quickly?
Output:
<think>
Let me analyze this syllogism:
- Premise 1: All roses are flowers (Roses ⊆ Flowers)
- Premise 2: Some flowers fade quickly (∃x: Flower(x) ∧ FadesQuickly(x))
- Question: Do some roses fade quickly?
The "some flowers" that fade quickly might or might not include roses.
We only know roses are a subset of flowers, not which specific flowers fade.
</think>
**No, we cannot conclude that some roses fade quickly.**
This is a logical fallacy. While all roses are flowers, the flowers that fade quickly might be entirely non-rose flowers (like tulips or daisies). The premises don't provide enough information to make this conclusion.
⚠️ Limitations
English Only: Primarily trained on English data
Knowledge Cutoff: Inherits base model's training cutoff
Specialized Domain: Best for reasoning tasks; general chat may vary
Hallucination Risk: May generate plausible-sounding but incorrect reasoning
Context Length: Optimal performance up to 4096 tokens
🔒 Ethical Considerations
This model inherits biases from both the base Gemma-4 model and the Opus training data
Not intended for medical, legal, or safety-critical applications
Users should verify important outputs independently
Follow Gemma's usage guidelines and license terms
📄 License
This model is released under the Gemma License, which requires:
Compliance with Google's Gemma Terms of Use
Appropriate use in accordance with responsible AI practices
🙏 Acknowledgments
Google for the Gemma-4 base model
Anthropic for Claude Opus (source of distilled reasoning data)