Views
No views yet
<think> trace. Before answering, the tuned model interrogates the question: clarifies what is asked, defines its key terms, surfaces assumptions, tests with counterexamples, and concludes with calibrated confidence, or with explicit aporia when the question cannot be settled.think: What is 'prime'? Divisible only by one and itself. Does any smaller number divide 17? Not 2 (odd), nor 3, 5, 7; and 7² already exceeds it, so none can remain.answer: Yes, 17 is prime. Note the answer depended on first fixing what 'prime' means.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base = AutoModelForCausalLM.from_pretrained(
5 "unsloth/Qwen3-8B", device_map="auto", load_in_4bit=True
6)
7model = PeftModel.from_pretrained(base, "AthrvShrn/Socrates-Qwen3-8B")
8tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-8B")
9
10messages = [{"role": "user", "content": "Is a hot dog a sandwich?"}]
11inputs = tokenizer.apply_chat_template(
12 messages, add_generation_prompt=True, return_tensors="pt"
13).to(model.device)
14print(tokenizer.decode(model.generate(inputs, max_new_tokens=1024)[0]))1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 "AthrvShrn/Socrates-Qwen3-8B", load_in_4bit=True
5)| Base model | unsloth/Qwen3-8B |
| Method | QLoRA (4-bit NF4) via Unsloth + TRL SFTTrainer, train_on_responses_only |
| Data | AthrvShrn/Socratic-Reasoning: 136 hand-authored examples, 109 train / 27 held-out test, correct answers reasoned Socratically inside <think> |
| LoRA config | r=32, alpha=32, dropout=0 |
| Schedule | 5 epochs, lr=2e-4, effective batch 8 (2 × 4 grad accum), adamw_8bit, fp16, max_seq_length=4096, seed 3407 |
| Hardware | 1× NVIDIA T4 (16 GB), Kaggle free tier |
| Metric | Bar |
|---|---|
| Method adoption (examines before answering) | ≥ 90% |
| Answer correctness | ≥ base model accuracy |
| Obedience (plain commands executed directly) | No over-analysis |
<think> format integrity | 100% parseable |