Learning While Staying Curious: Entropy-Preserving Supervised Fine-Tuning via Adaptive Self-Distillation for Large Reasoning Models
Paper • 2602.02244 • Published • 2
How to use Hao0oWang/Qwen2.5-Math-7B-16k-think with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Hao0oWang/Qwen2.5-Math-7B-16k-think")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Hao0oWang/Qwen2.5-Math-7B-16k-think")
model = AutoModelForCausalLM.from_pretrained("Hao0oWang/Qwen2.5-Math-7B-16k-think", 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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use Hao0oWang/Qwen2.5-Math-7B-16k-think with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Hao0oWang/Qwen2.5-Math-7B-16k-think"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Hao0oWang/Qwen2.5-Math-7B-16k-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Hao0oWang/Qwen2.5-Math-7B-16k-think
How to use Hao0oWang/Qwen2.5-Math-7B-16k-think with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Hao0oWang/Qwen2.5-Math-7B-16k-think" \
--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": "Hao0oWang/Qwen2.5-Math-7B-16k-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "Hao0oWang/Qwen2.5-Math-7B-16k-think" \
--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": "Hao0oWang/Qwen2.5-Math-7B-16k-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Hao0oWang/Qwen2.5-Math-7B-16k-think with Docker Model Runner:
docker model run hf.co/Hao0oWang/Qwen2.5-Math-7B-16k-think
The base model used in CurioSFT (based on Qwen2.5-Math-7B-Base), described in Learning While Staying Curious: Entropy-Preserving Supervised Fine-Tuning via Adaptive Self-Distillation for Large Reasoning Models. We change the chat_template, rope_theta, and the context window for long context reasoning.
If you find our data is useful, please kindly cite our paper:
@misc{curioSFT,
title={Learning While Staying Curious: Entropy-Preserving Supervised Fine-Tuning via Adaptive Self-Distillation for Large Reasoning Models},
author={Hao Wang and Hao Gu and Hongming Piao and Kaixiong Gong and Yuxiao Ye and Xiangyu Yue and Sirui Han and Yike Guo and Dapeng Wu},
year={2026},
eprint={2602.02244},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2602.02244},
}