Text Generation
Transformers
Safetensors
English
qwen2
reasoning
mathematical
hybrid-reasoning
adaptive-reasoning
efficient-reasoning
reinforcement-learning
rlvr
conversational
text-generation-inference
Instructions to use junshim/When2Think-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use junshim/When2Think-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="junshim/When2Think-1.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("junshim/When2Think-1.5B") model = AutoModelForCausalLM.from_pretrained("junshim/When2Think-1.5B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use junshim/When2Think-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "junshim/When2Think-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "junshim/When2Think-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/junshim/When2Think-1.5B
- SGLang
How to use junshim/When2Think-1.5B 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 "junshim/When2Think-1.5B" \ --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": "junshim/When2Think-1.5B", "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 "junshim/When2Think-1.5B" \ --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": "junshim/When2Think-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use junshim/When2Think-1.5B with Docker Model Runner:
docker model run hf.co/junshim/When2Think-1.5B
Update README.md
Browse files
README.md
CHANGED
|
@@ -243,21 +243,30 @@ See the paper for dataset versions, prompts, answer extraction, and the complete
|
|
| 243 |
|
| 244 |
### Key Results
|
| 245 |
|
| 246 |
-
| Model | GSM-Plus Pass@3 ↑ | Tokens ↓ | AIME24 Pass@3 ↑ | Tokens ↓ | AIME25 Pass@3 ↑ | Tokens ↓ |
|
| 247 |
-
|---|---:|---:|---:|---:|---:|---:|
|
| 248 |
-
| R1-Distill-Qwen backbone | 79.4 | **590** | 46.0 | 14,195 | 32.0 | 12,616 |
|
| 249 |
-
| **When2Think-1.5B** | **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
|
| 251 |
Key observations:
|
| 252 |
|
| 253 |
-
- **
|
| 254 |
-
- **
|
| 255 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
|
| 257 |
For complete baselines, standard deviations, difficulty-stratified analysis, and ablations, see the [paper](https://arxiv.org/abs/2609.19671).
|
| 258 |
|
| 259 |
-
#### Summary
|
| 260 |
-
|
| 261 |
## Citation
|
| 262 |
|
| 263 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
|
|
|
| 243 |
|
| 244 |
### Key Results
|
| 245 |
|
| 246 |
+
| Model | MATH-500 L1 Pass@1 ↑ | Tokens ↓ | GSM-Plus Pass@3 ↑ | Tokens ↓ | AIME24 Pass@3 ↑ | Tokens ↓ | AIME25 Pass@3 ↑ | Tokens ↓ |
|
| 247 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 248 |
+
| R1-Distill-Qwen backbone | 92.1 | 1,199 | 79.4 | **590** | 46.0 | 14,195 | 32.0 | 12,616 |
|
| 249 |
+
| **When2Think-1.5B** | **95.8** | **619** | 85.7 | 1,052 | 56.0 | 10,236 | **40.0** | **9,549** |
|
| 250 |
+
| **When2Think-ThinkOnly-1.5B** | N/R | N/R | **86.8** | 1,652 | **57.3** | **10,046** | **40.0** | 9,846 |
|
| 251 |
+
|
| 252 |
+
> `When2Think-ThinkOnly-1.5B` corresponds to the paper's
|
| 253 |
+
> **w/o IS (IDAC + BWS)** variant. Its MATH-500 Level 1 results are not
|
| 254 |
+
> separately reported in the paper and are therefore marked as `N/R`.
|
| 255 |
+
|
| 256 |
+
### Summary
|
| 257 |
|
| 258 |
Key observations:
|
| 259 |
|
| 260 |
+
- **Easy-instance allocation:** On MATH-500 Level 1, When2Think improves Pass@1 from **92.1% to 95.8%** while reducing average generated tokens from **1,199 to 619**, a reduction of **580 tokens**, or approximately **48.4%**. This demonstrates that the hybrid checkpoint can favor direct answering when extended deliberation provides limited benefit.
|
| 261 |
+
- **Task-dependent allocation:** On GSM-Plus, When2Think uses more tokens than the backbone while improving Pass@3 from **79.4% to 85.7%**. Together with the MATH-500 Level 1 result, this shows that adaptive allocation may reduce, preserve, or increase computation depending on the input.
|
| 262 |
+
- **When2Think-1.5B on AIME24:** Pass@3 improves by **10.0 percentage points**, while average generated tokens decrease by **27.9%** relative to the backbone.
|
| 263 |
+
- **When2Think-1.5B on AIME25:** Pass@3 improves by **8.0 percentage points**, while average generated tokens decrease by **24.3%** relative to the backbone.
|
| 264 |
+
- **When2Think-ThinkOnly-1.5B:** Achieves **57.3% Pass@3** on AIME24 and **40.0% Pass@3** on AIME25 while always using explicit reasoning.
|
| 265 |
+
- **Within-THINK control:** The strong THINK-only results show that difficulty-aware computation control contributes independently of THINK/NOTHINK mode selection.
|
| 266 |
+
- **Different operating points:** The hybrid and THINK-only checkpoints represent different accuracy-computation operating points rather than a strict performance ordering.
|
| 267 |
|
| 268 |
For complete baselines, standard deviations, difficulty-stratified analysis, and ablations, see the [paper](https://arxiv.org/abs/2609.19671).
|
| 269 |
|
|
|
|
|
|
|
| 270 |
## Citation
|
| 271 |
|
| 272 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|