Instructions to use Michael-Kozu/Deimos-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Michael-Kozu/Deimos-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Michael-Kozu/Deimos-R1") 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("Michael-Kozu/Deimos-R1") model = AutoModelForMultimodalLM.from_pretrained("Michael-Kozu/Deimos-R1", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Michael-Kozu/Deimos-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Michael-Kozu/Deimos-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Michael-Kozu/Deimos-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Michael-Kozu/Deimos-R1
- SGLang
How to use Michael-Kozu/Deimos-R1 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 "Michael-Kozu/Deimos-R1" \ --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": "Michael-Kozu/Deimos-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Michael-Kozu/Deimos-R1" \ --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": "Michael-Kozu/Deimos-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Michael-Kozu/Deimos-R1 with Docker Model Runner:
docker model run hf.co/Michael-Kozu/Deimos-R1
Deimos R1
Kozu AI Research · 4.54B · Apache 2.0Release brief
Deimos R1 is a focused 4B-class system for reasoning and instruction following. In like-for-like evaluation, it improves five of seven reported full-budget capability rows while using substantially fewer thinking tokens on the headline tasks.
The central result is efficiency, not scale. Deimos R1 reaches 0.907 GSM8K flexible and 0.551 MMLU-Pro in the recorded full-budget run while reducing mean thinking tokens by 5.0× and 2.9× respectively.
Evaluation
The table reports matched comparisons under the same open harness, generation budget, sampling settings, and seed. Values are run-local and should not be compared with vendor-published numbers produced by other evaluation stacks.
| Full-budget benchmark | Reference | Deimos R1 | Delta | Think tokens · ref → R1 |
|---|---|---|---|---|
| GSM8K · flexible | 0.860 | 0.907 | +0.047 | 1,778 → 357 |
| MMLU-Pro | 0.363 | 0.551 | +0.188 | 1,984 → 677 |
| IFEval · prompt loose | 0.260 | 0.353 | +0.093 | 4,808 → 1,189 |
| IFEval · instruction loose | 0.437 | 0.487 | +0.050 | — |
| IFEval · prompt strict | 0.260 | 0.267 | +0.007 | — |
| IFEval · instruction strict | 0.437 | 0.429 | −0.008 | — |
| GSM8K · strict format | 0.727 | 0.333 | −0.394 | — |
lm-eval 0.4.12 · 32,768-token generation budget · temperature 1.0 · top_p 0.95 · presence penalty 1.5 · thinking enabled · GSM8K/IFEval n=150 · MMLU-Pro n=25 per subtask · seed 42.
| 4,096-token constrained run | Reference | Deimos R1 | Delta |
|---|---|---|---|
| GSM8K · flexible | 0.660 | 0.933 | +0.273 |
| MMLU-Pro | 0.394 | 0.634 | +0.240 |
| IFEval · prompt strict | 0.247 | 0.320 | +0.073 |
Constrained-budget results use greedy decoding. Compare within this table, not across decoding regimes.
- The internal held-out math set is contamination-filtered with verified ground truth: accuracy moved from 0.175 to 0.465 at n=200. The 12-check instruction suite remained 0.917.
- IFEval scores the complete response, including the thinking block. Shorter reasoning can therefore improve constraint scores; the behavior affects both compared models.
- GSM8K strict rewards an unrequested
#### Nending. Deimos R1 is materially weaker at silently copying that demonstrated format. Explicit format requests are more reliable. - Raw evaluation artifacts are retained under bench/ in this repository.
Data & development
kozu_reasoning_v1.1 is a roughly 10k-example blend of verified reasoning traces and human-authored instruction data. The release uses a three-layer quality process for the reasoning portion and a dedicated 800-example format-adherence slice.
Source licenses and attribution
Deployment
The repository includes merged BF16 weights, tokenizer assets, processor configuration, generation configuration, and the model chat template. Thinking is enabled by default and appears inside <think>…</think> before the final answer.
vllm serve Michael-Kozu/Deimos-R1 --served-model-name deimos-r1 \
--max-model-len 8192 --gpu-memory-utilization 0.80 --trust-remote-code
Recommended sampling: temperature 0.6–1.0 and top_p 0.95. Request required output formats explicitly.
Limitations
- This is a research preview, not a safety-certified or production-guaranteed system.
- The strongest evidence covers English reasoning and instruction following. Performance outside those domains is not established here.
- Silent few-shot format imitation is a known weakness; strict GSM8K formatting declines substantially in the recorded comparison.
- Long reasoning may still be incorrect. Verify outputs for consequential decisions and domain-specific use.
- Downloads last month
- 35