Text Generation
Transformers
Safetensors
English
qwen2
Generated from Trainer
conversational
text-generation-inference
Instructions to use Scale-or-Reason/Qwen2.5-0.5B-ift with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Scale-or-Reason/Qwen2.5-0.5B-ift with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Scale-or-Reason/Qwen2.5-0.5B-ift") 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-0.5B-ift") model = AutoModelForCausalLM.from_pretrained("Scale-or-Reason/Qwen2.5-0.5B-ift") 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-0.5B-ift 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-0.5B-ift" # 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-0.5B-ift", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Scale-or-Reason/Qwen2.5-0.5B-ift
- SGLang
How to use Scale-or-Reason/Qwen2.5-0.5B-ift 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-0.5B-ift" \ --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-0.5B-ift", "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-0.5B-ift" \ --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-0.5B-ift", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Scale-or-Reason/Qwen2.5-0.5B-ift with Docker Model Runner:
docker model run hf.co/Scale-or-Reason/Qwen2.5-0.5B-ift
| datasets: | |
| - When-Does-Reasoning-Matter/general-reasoning-ift-pairs | |
| - When-Does-Reasoning-Matter/math-reasoning-ift-pairs | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - generated_from_trainer | |
| # When Does Reasoning Matter? | |
| <p align="left"> | |
| <img src="https://cdn-avatars.huggingface.co/v1/production/uploads/62be186a5f59ff2320e6e32b/GjJ15tY7-F4bqR96FN4pd.png" alt="Dataset Icon" width="180"/> | |
| </p> | |
| <p align="left"> | |
| <a href="https://arxiv.org/pdf/2509.22193" target="_blank" rel="noopener noreferrer"> | |
| <img src="https://img.shields.io/badge/arXiv-2509.22193-b31b1b.svg?style=for-the-badge" alt="arXiv:2509.22193" /> | |
| </a> | |
| </p> | |
| Project Page: [https://huggingface.co/when-does-reasoning-matter](https://huggingface.co/when-does-reasoning-matter) | |
| This model was trained as part of the paper [When Does Reasoning Matter? A Controlled Study of Reasoning's Contribution to Model Performance](https://arxiv.org/pdf/2509.22193) | |
| 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). | |
| <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"/> | |
| --- | |
| ## Datasets | |
| These models were trained on the **largest set of IFT and Reasoning answer pairs**: | |
| - **General dataset**: [general-reasoning-ift-pairs](https://huggingface.co/datasets/When-Does-Reasoning-Matter/general-reasoning-ift-pairs) | |
| - **Math dataset**: [math-reasoning-ift-pairs](https://huggingface.co/datasets/When-Does-Reasoning-Matter/math-reasoning-ift-pairs) | |
| --- | |
| ## Available Models | |
| <table> | |
| <thead> | |
| <tr> | |
| <th colspan="2">General</th> | |
| <th colspan="2">Math</th> | |
| </tr> | |
| <tr> | |
| <th>IFT Models</th> | |
| <th>Reasoning Models</th> | |
| <th>IFT Models</th> | |
| <th>Reasoning Models</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-0.5B-ift">Qwen2.5-0.5B-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-0.5B-reasoning">Qwen2.5-0.5B-reasoning</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-0.5B-math-ift">Qwen2.5-0.5B-math-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-0.5B-math-reasoning">Qwen2.5-0.5B-math-reasoning</a></td> | |
| </tr> | |
| <tr> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-1.5B-ift">Qwen2.5-1.5B-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-1.5B-reasoning">Qwen2.5-1.5B-reasoning</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-1.5B-math-ift">Qwen2.5-1.5B-math-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-1.5B-math-reasoning">Qwen2.5-1.5B-math-reasoning</a></td> | |
| </tr> | |
| <tr> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-3B-ift">Qwen2.5-3B-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-3B-reasoning">Qwen2.5-3B-reasoning</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-3B-math-ift">Qwen2.5-3B-math-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-3B-math-reasoning">Qwen2.5-3B-math-reasoning</a></td> | |
| </tr> | |
| <tr> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-7B-ift">Qwen2.5-7B-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-7B-reasoning">Qwen2.5-7B-reasoning</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-7B-math-ift">Qwen2.5-7B-math-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-7B-math-reasoning">Qwen2.5-7B-math-reasoning</a></td> | |
| </tr> | |
| <tr> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-14B-ift">Qwen2.5-14B-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-14B-reasoning">Qwen2.5-14B-reasoning</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-14B-math-ift">Qwen2.5-14B-math-ift</a></td> | |
| <td><a href="https://huggingface.co/When-Does-Reasoning-Matter/Qwen2.5-14B-math-reasoning">Qwen2.5-14B-math-reasoning</a></td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| --- | |
| If you use this dataset in your work, please cite: **[When Does Reasoning Matter? A Controlled Study of Reasoning's Contribution to Model Performance](https://arxiv.org/pdf/2509.22193)** | |
| ```bibtex | |
| @misc{boizard2025doesreasoningmattercontrolled, | |
| title={When Does Reasoning Matter? A Controlled Study of Reasoning's Contribution to Model Performance}, | |
| author={Nicolas Boizard and Hippolyte Gisserot-Boukhlef and Kevin El-Haddad and Céline Hudelot and Pierre Colombo}, | |
| year={2025}, | |
| eprint={2509.22193}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CL}, | |
| url={https://arxiv.org/abs/2509.22193}, | |
| } | |
| ``` |