# src/ The training + evaluation code. **This is the primary thing we want to read** — it's the only way to confirm what the Claude-written report actually did. ## Files to push | file | what it is | |---|---| | `train_head.py` | LoRA + prototype-head training | | `evaluate.py` | metrics: top-1 accuracy, macro-F1, show/hide, confidence buckets | | `rules_table.json` | the fixed step-4 show/hide rules (no AI) | | `config.yaml` | all hyperparameters (see the checklist in the root README) | ## Also include so it runs offline - `requirements.txt` (or `environment.yml`) — torch version, bf16 support, `transformers`/`peft` versions - a short **how-to-run**: base model path (`Qwen/Qwen3-Embedding-0.6B`), seed flag, config flag, output paths - any preprocessing that turns a raw item into the model input (concatenation order, tokenization, max length) ## What we'll check in `train_head.py` (vs the root README checklist) LoRA rank/alpha/dropout + which modules · prototype head + cosine×scale + scale init 20 · prototype seeding from description embeddings · loss + label smoothing · the two AdamW groups + warmup/decay · early-stop on val macro-F1 · class-balanced sampling + hard-pair weighting · seed handling.