Views
No views yet
/think mode for detailed reasoning| Parameter | Value |
|---|---|
| Base Model | HuggingFaceTB/SmolLM3-3B |
| Method | LoRA (r=16, alpha=32) |
| Training Data | ~7K samples |
| - OpenThoughts3_1.2M_think | 5,000 (math reasoning) |
| - s1k_1.1_think | ~1,000 (high-quality math) |
| - smoltalk_everyday_convs | 1,000 (everyday reasoning) |
| Epochs | 2 |
| Learning Rate | 2e-4 (cosine) |
| Effective Batch Size | 16 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("real-jiakai/SmolLM3-3B-MathReason")
4tokenizer = AutoTokenizer.from_pretrained("real-jiakai/SmolLM3-3B-MathReason")
5
6messages = [
7 {"role": "system", "content": "/think"}, # Enable reasoning mode
8 {"role": "user", "content": "A store sells apples for $2 each. If John buys 5 apples and pays with a $20 bill, how much change does he get?"}
9]
10
11formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
12inputs = tokenizer(formatted, return_tensors="pt")
13outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
14print(tokenizer.decode(outputs[0], skip_special_tokens=True))