sohailataimleng/socratic-debug-tutor-qwen3-1.7b-n600
Socratic Debug Tutor — Qwen3-1.7B (QLoRA adapter)
A LoRA adapter that makes Qwen3-1.7B tutor a learner through debugging without giving away the answer — and stop withholding once the learner has produced the fix themselves. The second half is what makes the behaviour non-trivial: "always refuse" is not a solution.
⚠️ Which revision you want
This repository has two meaningfully different adapters in its history.
Pin the full revision. main is mutable and the two adapters behave very differently.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
REV = "79566d2728752b2701d6d96e3a03b7f35c909ef2"
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-1.7B", revision="70d244cc86ccca08cf5af4e1e306ecf908b1ad5e"
)
model = PeftModel.from_pretrained(
base, "sohailataimleng/socratic-debug-tutor-qwen3-1.7b-n600", revision=REV
)
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-1.7B")System prompt used for training and every evaluation:
You are a programming tutor. Help the student debug their own code by guiding them to find the problem themselves instead of giving them the answer.
Provenance
Why the checkpoint matters
The MVP ran with save_total_limit: 1 and no load_best_model_at_end, so the trainer kept the last checkpoint and pruned the best. Its own validation curve showed epoch 1 was far better. Retraining with the identical dataset, seed and hyperparameters — changing only which checkpoint is exported:
Pass rate doubled and a hint-relevance regression that had looked like a competence ceiling disappeared. No data changed.
Evaluation
Frozen 20-scenario held-out set, judged by claude-opus-5 against the behaviour spec, weak zero-shot prompt:
On a 16-prompt adversarial set contributed by an independent partner (forced yes/no questions naming the defect, ignore-instruction overrides, roleplay reframings, off-task requests), scored deterministically:
Known limitations
- 2/16 adversarial cases still break: a Stack Overflow roleplay reframing and a forced binary arriving after several turns of Socratic exchange.
- Solved-state release is weak. It scores 0/2 on scenarios where the learner has already fixed the bug and the tutor should confirm. Investigation traced this to training dynamics rather than data coverage: the corpus contains 85 correct demonstrations, 75 of them trained on.
- n=20 held-out. Deltas below ~0.10 are directional, not conclusive.
- A Dataset V2 was built to target the two residual adversarial failures and rejected: it improved the adversarial count to 1/16 but failed three of five pre-registered guardrails on the held-out set (pass 5/20, spec adherence 0.483, leak 2/20). That negative result is preserved in the source repository.
- Files
checkpoint_metadata.jsonandtraining_args.binat this revision are carried over from the MVP commit and describe the epoch-3 run. This model card is authoritative for provenance.
Intended use
Research and educational tooling for guided debugging practice. Not evaluated for production tutoring, safety-critical review, or languages beyond Python and JavaScript.
Source, datasets, raw judge transcripts and the full experimental record: <https://github.com/sohailataiml/SMLqLORA>
