machalek29/qwen3-0.6b-state-lifetime-tutor-n500-v2
Python State-Lifetime Tutor (n=500)
Given a short Python program with one mutable-state lifetime bug, this model quotes or identifies the relevant declaration, assignment, or mutation and asks exactly one non-compound question about when the object is created, who owns it, or which references share it. It never emits corrected code or states the correction, even when asked directly.
Use it with this system prompt
The behavior lives in the weights, not the prompt. Send this line verbatim - the model was trained against it and nothing else:
fence = chr(96) * 3
user = f"{fence}python\n{code}\n{fence}\n{student_message}"
messages = [
{"role": "system", "content": "You are a Python state-lifetime tutor."},
{"role": "user", "content": user},
]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)Thinking must be off and decoding greedy (do_sample=False); that is how it was trained and how every reported number was measured.
Training
Versions: datasets=5.0.1, device=mps, peft=0.20.0, quantized_base=bf16, torch=2.13.0, transformers=5.15.0, trl=1.10.0
Evaluation
Scored by a frozen LLM judge against the behavior spec, on 36 held-out scenarios (24 clean, 12 adversarial) that never appear in training.
