Cấu hình
Table | |
|---|
| Placement | text-linear (12 modules, không đụng vision tower) |
| r / alpha | 16 / 32 |
| Learning rate | 1e-4 (10× thang full-FT) |
| Steps | 30 (2 epochs, 225 mẫu train, batch hiệu dụng 16) |
| Mask | assistant-only, supervised_fraction 0.41, mask proof xanh |
| Precision | fp16 LoRA (T4 không có bf16) · peak VRAM 12.01 GB |
Kết quả (50 mẫu eval, thang khách quan — không LLM judge)
Table with columns: Run, target, regression, format, latency| Run | target | regression | format | latency |
|---|
| (a) base + naive prompt | 0.000 | 0.758 | 0.000 | 3216 ms |
| (b) base + optimized prompt | 0.765 | 0.758 | 1.000 | 1007 ms |
| (c) LoRA này | 0.970 | 0.611 | 1.000 | 1356 ms |
⚠ Verdict: FAILED cổng hồi quy — không khuyến nghị deploy bản này. Thắng baseline
(b) +0.205 điểm target nhưng năng lực phổ thông tụt −0.147 (ngưỡng 0.02) và
valid_trace_rate = 0 — quên thảm hoạ / reasoning-trace collapse. Thuốc chữa đúng:
trộn 1–5% replay data rồi train lại. Phân tích đầy đủ:
submission/REPORT.md · artefact đo:
results/.
Dùng
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3.5-4B", torch_dtype="float16", device_map="auto")
tok = AutoTokenizer.from_pretrained("unsloth/Qwen3.5-4B")
model = PeftModel.from_pretrained(base, "ipgalone321/lab21-2A202601995-qwen35-triage-vi")
System prompt khi inference = NAIVE_PROMPT của lab ("Phân loại ticket sau.") — adapter
được train với prompt này; dùng prompt khác sẽ lệch phân phối train.
Repo lab (code + pipeline): https://github.com/antongduy2307/Day21-Track3-TongDuyAn-2A202601995