Instructions to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled") model = AutoModelForMultimodalLM.from_pretrained("arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled", filename="gemma-4-E4B-it.BF16-mmproj.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M # Run inference directly in the terminal: llama-cli -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M # Run inference directly in the terminal: llama-cli -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Use Docker
docker model run hf.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
- SGLang
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Ollama:
ollama run hf.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
- Unsloth Studio
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled to start chatting
- Pi
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Docker Model Runner:
docker model run hf.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
- Lemonade
How to use arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled:Q4_K_M
Run and chat with the model
lemonade run user.Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled-Q4_K_M
List all available models
lemonade list
Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled
Fine-tune of Gemma 4 E4B trained on Claude 4.6 Opus reasoning traces. The goal: take a compact 4B model and teach it to actually think before answering.
💡 What this is
Standard Gemma 4 E4B is already solid. This fine-tune pushes it toward a more deliberate, structured reasoning style by training on ~2.3k high-quality Chain-of-Thought samples distilled from Claude 4.6 Opus.
The model learns to plan inside <think> tags before committing to a final
answer — fewer impulsive responses, more structured breakdowns.
<think>
1. What is actually being asked here?
2. What are the constraints and edge cases?
3. Step-by-step plan...
4. Verify the logic holds.
</think>
Final answer here.
🗺️ Pipeline
google/gemma-4-E4B-it
│
▼
SFT + QLoRA 4-bit (Unsloth)
│ loss masked to responses only
▼
Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled
│
▼
exported as GGUF (Q4_K_M + Q8_0)
⚙️ Training Details
| Parameter | Value |
|---|---|
| Base model | google/gemma-4-E4B-it |
| Framework | Unsloth |
| Method | SFT + QLoRA (4-bit) |
| Dataset | nohurry/Opus-4.6-Reasoning-3000x-filtered |
| Hardware | RTX 5060 Ti 16GB |
| LoRA rank / alpha | 16 / 16 |
| Epochs | 3 |
| Max seq length | 2048 |
| Optimizer | adamw_8bit |
| Learning rate | 2e-4 |
| LR scheduler | cosine |
| Loss masking | train_on_responses_only |
📚 Dataset
| Dataset | Description |
|---|---|
| nohurry/Opus-4.6-Reasoning-3000x-filtered | ~2.3k filtered Claude 4.6 Opus reasoning trajectories covering math, logic, and coding |
🚀 Run it
Ollama:
ollama run hf.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled
llama.cpp:
./llama-cli -hf arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled \
--temp 1.0 --top-p 0.95 --top-k 64
✅ Good at
- Multi-step math and logic problems
- Code problem decomposition and debugging
- Tasks where showing reasoning is more valuable than raw speed
- Structured analysis of complex prompts
⚠️ Limitations
- Text only — multimodal capabilities of the base model are not trained here
- Small dataset — treat this as a focused reasoning fine-tune, not a general-purpose upgrade
- Still an LLM — hallucinations happen, especially on factual recall outside the training domain
📜 License
Apache 2.0 + Gemma Terms of Use.
"Claude" is a trademark of Anthropic. This project is not affiliated with or endorsed by Anthropic — the name refers to the reasoning distillation data source only.
🙏 Acknowledgements
Unsloth for making this feasible on consumer hardware, and nohurry for the dataset.
📖 Citation
@misc{arsovskidev_gemma4_opus_distilled,
title = {Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled},
author = {arsovskidev},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled}}
}
- Downloads last month
- 4,801
Model tree for arsovskidev/Gemma-4-E4B-Claude-4.6-Opus-Reasoning-Distilled
Base model
google/gemma-4-E4B