Views
No views yet
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name="Cbgcbg/qwen3-1.7b-math-sft-stage1-20250723_111953",
5 max_seq_length=8192,
6 dtype=None,
7 load_in_4bit=True,
8)
9
10# Example
11messages = [
12 {"role": "system", "content": "Please reason step by step, and put your final answer within \boxed{}."},
13 {"role": "user", "content": "What is 2+2?"}
14]
15
16inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
17outputs = model.generate(input_ids=inputs, max_new_tokens=256)A Practical Two-Stage Recipe for Mathematical LLMs:
Maximizing Accuracy with SFT and Efficiency with Reinforcement Learning