Instructions to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16 # Run inference directly in the terminal: llama cli -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16 # Run inference directly in the terminal: llama cli -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16 # Run inference directly in the terminal: ./llama-cli -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Use Docker
docker model run hf.co/AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
- LM Studio
- Jan
- vLLM
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
- Ollama
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with Ollama:
ollama run hf.co/AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
- Unsloth Desktop
- Pi
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with Docker Model Runner:
docker model run hf.co/AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
- Lemonade
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Run and chat with the model
lemonade run user.Qwen_2.5_3B_GRPO_Reasoning_XIOSERV-F16
List all available models
lemonade list
- Hermes Agent
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen2.5-3B Toggleable-Reasoning (GRPO)
A fine-tune of Qwen2.5-3B-Instruct with a runtime-toggleable reasoning mode: with a short system prompt the model
thinks inside <reasoning> tags before answering inside <answer> tags; without it, the model answers directly like a normal
instruct model. One checkpoint, two behaviours, switched at inference time.
Trained and released by Aaryan Kapoor as an independent research project. Released February 16, 2025.
DOI: 10.57967/hf/5366
Toggleable reasoning
| System prompt | Behaviour |
|---|---|
| Included (below) | Explicit <reasoning> … </reasoning> block, then <answer> … </answer> |
| Omitted | Standard conversational response, no visible reasoning |
System prompt that enables reasoning:
Respond in the following format:
<reasoning>
...
</reasoning>
<answer>
...
</answer>
The switch is purely prompt-driven — no extra tokens, adapters, or generation flags are required. The model was trained so that the reasoning format is triggered by this instruction and remains dormant otherwise, which keeps default responses short and lets applications opt into chain-of-thought only where it pays off.
Training
- Base model:
Qwen/Qwen2.5-3B-Instruct - Method: Group Relative Policy Optimization (GRPO) — the reinforcement-learning objective introduced in DeepSeekMath and used to train DeepSeek-R1. Group-relative advantages remove the need for a separate value model, which is what makes RL on reasoning practical at small scale.
- Rewards: rule-based rewards for answer correctness plus format rewards for well-formed
<reasoning>/<answer>structure. - Efficiency: parameter-efficient fine-tuning (QLoRA / PEFT) so the full run fits on a single consumer GPU.
- Goal: reproduce the "aha-moment" behaviour of R1-style training — the model learning to reflect on and revise its own intermediate steps — in a 3B model, while keeping the ability to answer plainly when reasoning is not requested.
Files
- Safetensors / PyTorch weights (transformers-compatible)
- GGUF quantizations for llama.cpp: F16, Q8_0, Q5_K_M
Usage
transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
REASONING_PROMPT = (
"Respond in the following format:\n<reasoning>\n...\n</reasoning>\n<answer>\n...\n</answer>"
)
messages = [
{"role": "system", "content": REASONING_PROMPT}, # drop this line for direct answers
{"role": "user", "content": "A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?"},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
llama.cpp
llama-cli -m <model>_Q5_K_M.gguf \
--system-prompt "Respond in the following format:
<reasoning>
...
</reasoning>
<answer>
...
</answer>" \
-p "A bat and a ball cost \$1.10 in total. The bat costs \$1.00 more than the ball. How much does the ball cost?"
Omit --system-prompt for standard instruct-style answers.
Limitations
- 3B parameters: reasoning helps most on short math, logic, and structured tasks; it does not turn the model into a frontier reasoner.
- Reasoning traces are not guaranteed to be faithful to the final answer.
- Inherits the base model's knowledge cutoff, biases, and safety behaviour.
- Released under CC BY-NC 2.0 (non-commercial).
Citation
@misc{kapoor2025toggleable,
author = {Kapoor, Aaryan},
title = {Qwen2.5-3B Toggleable-Reasoning (GRPO)},
year = {2025},
month = feb,
doi = {10.57967/hf/5366},
url = {https://huggingface.co/AaryanK/Qwen_2.5_3B_GRPO_Reasoning_XIOSERV},
publisher = {Hugging Face}
}
Questions and feedback: open a discussion in the Community tab.
- Downloads last month
- 756
5-bit
8-bit
16-bit