Text Generation
Transformers
TensorBoard
Safetensors
English
qwen2
Generated from Trainer
conversational
text-generation-inference
Instructions to use Scale-or-Reason/Qwen2.5-3B-math-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Scale-or-Reason/Qwen2.5-3B-math-reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Scale-or-Reason/Qwen2.5-3B-math-reasoning") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Scale-or-Reason/Qwen2.5-3B-math-reasoning") model = AutoModelForCausalLM.from_pretrained("Scale-or-Reason/Qwen2.5-3B-math-reasoning") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Scale-or-Reason/Qwen2.5-3B-math-reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Scale-or-Reason/Qwen2.5-3B-math-reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Scale-or-Reason/Qwen2.5-3B-math-reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Scale-or-Reason/Qwen2.5-3B-math-reasoning
- SGLang
How to use Scale-or-Reason/Qwen2.5-3B-math-reasoning 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 "Scale-or-Reason/Qwen2.5-3B-math-reasoning" \ --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": "Scale-or-Reason/Qwen2.5-3B-math-reasoning", "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 "Scale-or-Reason/Qwen2.5-3B-math-reasoning" \ --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": "Scale-or-Reason/Qwen2.5-3B-math-reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Scale-or-Reason/Qwen2.5-3B-math-reasoning with Docker Model Runner:
docker model run hf.co/Scale-or-Reason/Qwen2.5-3B-math-reasoning
Improve model card: Add project page link
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
tags:
|
| 4 |
-
- generated_from_trainer
|
| 5 |
datasets:
|
| 6 |
- When-Does-Reasoning-Matter/general-reasoning-ift-pairs
|
| 7 |
- When-Does-Reasoning-Matter/math-reasoning-ift-pairs
|
| 8 |
language:
|
| 9 |
- en
|
|
|
|
| 10 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# When Does Reasoning Matter?
|
|
@@ -26,6 +26,8 @@ pipeline_tag: text-generation
|
|
| 26 |
This model was trained as part of the paper [When Does Reasoning Matter?](https://arxiv.org/pdf/2509.22193)
|
| 27 |
It belongs to a collection of **General and Math-specific student models** distilled from Instruction-Fine-Tuned (IFT) or Reasoning answers generated by [Qwen/Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B).
|
| 28 |
|
|
|
|
|
|
|
| 29 |
<img src="https://huggingface.co/api/resolve-cache/models/When-Does-Reasoning-Matter/Qwen2.5-0.5B-ift/733797fee2fdd300e1a0453d368250327fe4cc44/results.png?%2FWhen-Does-Reasoning-Matter%2FQwen2.5-0.5B-ift%2Fresolve%2Fmain%2Fresults.png=&etag=%22d36dedfbca764a8ac9a7a5ebc043ca53f5ee4966%22" alt="results" width="600"/>
|
| 30 |
|
| 31 |
---
|
|
@@ -101,4 +103,4 @@ If you use this dataset in your work, please cite: **[When Does Reasoning Matter
|
|
| 101 |
primaryClass={cs.CL},
|
| 102 |
url={https://arxiv.org/abs/2509.22193},
|
| 103 |
}
|
| 104 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
datasets:
|
| 3 |
- When-Does-Reasoning-Matter/general-reasoning-ift-pairs
|
| 4 |
- When-Does-Reasoning-Matter/math-reasoning-ift-pairs
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
+
library_name: transformers
|
| 8 |
pipeline_tag: text-generation
|
| 9 |
+
tags:
|
| 10 |
+
- generated_from_trainer
|
| 11 |
---
|
| 12 |
|
| 13 |
# When Does Reasoning Matter?
|
|
|
|
| 26 |
This model was trained as part of the paper [When Does Reasoning Matter?](https://arxiv.org/pdf/2509.22193)
|
| 27 |
It belongs to a collection of **General and Math-specific student models** distilled from Instruction-Fine-Tuned (IFT) or Reasoning answers generated by [Qwen/Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B).
|
| 28 |
|
| 29 |
+
**Project Page:** [https://huggingface.co/when-does-reasoning-matter](https://huggingface.co/when-does-reasoning-matter)
|
| 30 |
+
|
| 31 |
<img src="https://huggingface.co/api/resolve-cache/models/When-Does-Reasoning-Matter/Qwen2.5-0.5B-ift/733797fee2fdd300e1a0453d368250327fe4cc44/results.png?%2FWhen-Does-Reasoning-Matter%2FQwen2.5-0.5B-ift%2Fresolve%2Fmain%2Fresults.png=&etag=%22d36dedfbca764a8ac9a7a5ebc043ca53f5ee4966%22" alt="results" width="600"/>
|
| 32 |
|
| 33 |
---
|
|
|
|
| 103 |
primaryClass={cs.CL},
|
| 104 |
url={https://arxiv.org/abs/2509.22193},
|
| 105 |
}
|
| 106 |
+
```
|