sergiopaniego/math-sdpo-hints
Viewer • Updated • 600 • 39
How to use sergiopaniego/Qwen3.5-4B-sdpo-math-hints with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("sergiopaniego/Qwen3.5-4B-sdpo-math-hints", dtype="auto")This model is a fine-tuned version of Qwen/Qwen3.5-4B on the sergiopaniego/math-sdpo-hints dataset. It has been trained using TRL.
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="sergiopaniego/Qwen3.5-4B-sdpo-math-hints", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
This model was trained with SDPO, a method introduced in Reinforcement Learning via Self-Distillation.
Cite SDPO as:
@article{hubotter2026sdpo,
title = {{Reinforcement Learning via Self-Distillation}},
author = {Jonas H\"ubotter and Frederike L\"ubeck and Lejs Behric and Anton Baumann and Marco Bagatella and Daniel Marta and Ido Hakimi and Idan Shenfeld and Thomas Kleine Buening and Carlos Guestrin and Andreas Krause},
year = 2026,
eprint = {arXiv:2601.20802}
}
Cite TRL as:
@software{vonwerra2020trl,
title = {{TRL: Transformers Reinforcement Learning}},
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
license = {Apache-2.0},
url = {https://github.com/huggingface/trl},
year = {2020}
}