1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained(
5 "dustarrr/reasoning-rob",
6 torch_dtype=torch.float16,
7 device_map="auto",
8)
9tokenizer = AutoTokenizer.from_pretrained("dustarrr/reasoning-rob")
10model.eval()
11
12messages = [
13 {"role": "system", "content": "You are a helpful assistant that thinks step by step."},
14 {"role": "user", "content": "If a train travels 60 km in 1.5 hours, what is its speed?"},
15]
16text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
17inputs = tokenizer(text, return_tensors="pt")
18
19with torch.no_grad():
20 outputs = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
21
22response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
23print(response)
Extend the model's thinking phase by injecting
"Wait" before the
</think> token
to force longer reasoning before the final answer. This is the test-time scaling
trick from the
s1 paper.
Reasoning Rob is a QLoRA fine-tune of
Qwen/Qwen2.5-1.5B
(base, not instruct) trained on:
Using the
s1 distillation + budget-forcing method
and
LIMO "less is more" reasoning transfer approach.
This model would not exist without their work.
Apache 2.0 (inherited from Qwen2.5 base model).