Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
kozu
reasoning
chain-of-thought
instruction-following
sft
fable
mythos
conversational
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)# pip install -U transformers accelerate # 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=256) 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
Final benchmarks: full-budget retest + token-efficiency analysis
Browse files
README.md
CHANGED
|
@@ -22,39 +22,54 @@ The result: **large gains under a constrained thinking budget** β math reasoni
|
|
| 22 |
extraction, and instruction-following all improve over the identically-measured base β from a
|
| 23 |
single epoch (~3 GPU-hours on one GB10).
|
| 24 |
|
| 25 |
-
## Benchmarks β
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|---|---|---|---|
|
| 42 |
-
| gsm8k (flexible
|
| 43 |
-
| MMLU-Pro
|
| 44 |
| IFEval prompt-strict | 0.247 | **0.320** | +0.073 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
## Training data
|
| 60 |
|
|
|
|
| 22 |
extraction, and instruction-following all improve over the identically-measured base β from a
|
| 23 |
single epoch (~3 GPU-hours on one GB10).
|
| 24 |
|
| 25 |
+
## Benchmarks β capability per token
|
| 26 |
+
|
| 27 |
+
Deimos R1's headline property, measured on an independent open harness (lm-eval 0.4.12, identical
|
| 28 |
+
settings for both models in every comparison): **it matches or beats its base on capability metrics
|
| 29 |
+
while thinking 3β5Γ fewer tokens.**
|
| 30 |
+
|
| 31 |
+
**Full-budget comparison** (32,768-token generation budget, Qwen-recommended sampling β
|
| 32 |
+
temperature 1.0, top_p 0.95, presence_penalty 1.5, thinking on; gsm8k/IFEval n=150, MMLU-Pro
|
| 33 |
+
25/subtask, seed 42):
|
| 34 |
+
|
| 35 |
+
| Benchmark | Qwen3.5-4B (base) | **Deimos R1** | Ξ | base think-tokens | **R1 think-tokens** |
|
| 36 |
+
|---|---|---|---|---|---|
|
| 37 |
+
| gsm8k (flexible) | 0.860 | **0.907** | +0.047 | 1,778 | **357 (5.0Γ fewer)** |
|
| 38 |
+
| MMLU-Pro | 0.363 | **0.551** | +0.188 | 1,984 | **677 (2.9Γ fewer)** |
|
| 39 |
+
| IFEval prompt-loose | 0.260 | **0.353** | +0.093 | 4,808 | **1,189 (4.0Γ fewer)** |
|
| 40 |
+
| IFEval inst-loose | 0.437 | **0.487** | +0.050 | β³ | β³ |
|
| 41 |
+
| IFEval prompt-strict | 0.260 | 0.267 | +0.007 | β³ | β³ |
|
| 42 |
+
| IFEval inst-strict | 0.437 | 0.429 | β0.008 | β³ | β³ |
|
| 43 |
+
| gsm8k (strict `####`) | 0.727 | 0.333 | β0.394 * | β³ | β³ |
|
| 44 |
+
|
| 45 |
+
**Constrained-budget comparison** (4,096-token budget, greedy decoding β the regime where thinking
|
| 46 |
+
economy dominates):
|
| 47 |
+
|
| 48 |
+
| Benchmark | base | **Deimos R1** | Ξ |
|
| 49 |
|---|---|---|---|
|
| 50 |
+
| gsm8k (flexible) | 0.660 | **0.933** | +0.273 |
|
| 51 |
+
| MMLU-Pro | 0.394 | **0.634** | +0.240 |
|
| 52 |
| IFEval prompt-strict | 0.247 | **0.320** | +0.073 |
|
| 53 |
+
|
| 54 |
+
### Protocol honesty notes
|
| 55 |
+
|
| 56 |
+
- **Published-number comparability:** Qwen reports 79.1 MMLU-Pro / 89.8 IFEval for this base using
|
| 57 |
+
its internal evaluation stack. Under lm-eval's prompts/extraction, the *base itself* measures far
|
| 58 |
+
below those numbers at any budget (MMLU-Pro 0.36β0.39) β so no row above is comparable to
|
| 59 |
+
published figures, in either direction. All claims here are strictly like-for-like: same harness,
|
| 60 |
+
same settings, same seed, both models.
|
| 61 |
+
- IFEval under lm-eval scores the full response including the `<think>` block, which penalizes
|
| 62 |
+
long thinkers on constraint checks; this affects both models symmetrically (and is partly why
|
| 63 |
+
short thinking helps here).
|
| 64 |
+
- The two budget tables also differ in decoding (greedy vs Qwen-recommended sampling); compare
|
| 65 |
+
within a table, not across.
|
| 66 |
+
- \* gsm8k-strict rewards imitating the few-shot examples' `#### N` ending (no explicit
|
| 67 |
+
instruction). Deimos R1 favors its trained answer style over silent example-imitation β a known,
|
| 68 |
+
documented trade (see Format adherence). Ask for a format in words and it complies (IFEval β,
|
| 69 |
+
MMLU-Pro extraction β).
|
| 70 |
+
|
| 71 |
+
Internal harness (held-out, contamination-filtered math with verified ground truth, n=200):
|
| 72 |
+
reasoning accuracy **0.175 β 0.465 (2.7Γ)** vs base; IF checks held at 0.917.
|
| 73 |
|
| 74 |
## Training data
|
| 75 |
|