Downloads · 30 days
63
25% of all-time downloads
licht666/qwen3.5-4b-lora-vi-ticket-triage
qwen3.5-4b-lora-vi-ticket-triage is a text generation model from licht666. Use it when you need the model to write or continue text. It is set up for peft.
LoRA adapter that turns a Vietnamese CSKH (customer-support) ticket into a 4-field JSON triage record. Trained for AICB-P2T3 Day 21 (Track 3), and released with the number that matters most: the regression gate it doe…
Downloads · 30 days
63
25% of all-time downloads
All-time downloads
249
Public
Repo size
150 MB
Likes
0
Public
Click a slice to open those files.
.safetensors130 MB · 87%
From the Hugging Face model README
LoRA adapter that turns a Vietnamese CSKH (customer-support) ticket into a 4-field JSON triage record. Trained for AICB-P2T3 Day 21 (Track 3), and released with the number that matters most: the regression gate it does not pass.
{"intent": "...", "urgency": "...", "product": "...", "sentiment": "..."}
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "unsloth/Qwen3.5-4B"
ADAPTER = "<your-hf-username>/qwen3.5-4b-lora-vi-ticket-triage"
tok = AutoTokenizer.from_pretrained(BASE)
model = AutoModelForCausalLM.from_pretrained(BASE, dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER).eval()
msgs = [
{"role": "system", "content": "Phân loại ticket sau."},
{"role": "user", "content": "Shop ơi, mình đặt đèn bàn LED mã đơn OD819229. Sai màu. Khi nào tiện."},
]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=96, do_sample=False)[0][ids.shape[-1]:],
skip_special_tokens=True))
The adapter is trained to work with the short system prompt above. It does not need the long hand-tuned prompt the base model requires — that is the point of the fine-tune.
| Base | unsloth/Qwen3.5-4B, fp16 (Tesla T4, no bf16 on Turing) |
| Method | LoRA SFT, r=16, alpha=32, dropout=0.0 |
| Placement | all text linear layers (12 module types), not attention-only |
| Trainable params | 32,464,896 |
| LR | 1e-4 (~10x the full-fine-tune scale, per LoRA Without Regret) |
| Steps | 30 (2 epochs, effective batch 16 = 1 x 16 grad-accum) |
max_length | 1024 (measured p95 = 98 tokens; longest sample 101, so nothing truncates) |
| Loss mask | assistant-only — supervised_fraction = 0.4149, verified by decoding the span back |
| Data | 250 synthetic Vietnamese support tickets (225 train / 25 val, seed 42) |
| Peak VRAM | 12.01 GB · 898.5 s |
50 held-out tickets, 15 general-knowledge questions, greedy decode. Field accuracy against gold labels — no LLM judge.
| target | regression | format | latency (ms) | |
|---|---|---|---|---|
| base + naive prompt | 0.000 | 0.758 | 0.000 | 2946 |
| base + hand-tuned prompt | 0.765 | 0.758 | 1.000 | 991 |
| this adapter + naive prompt | 0.970 | 0.678 | 1.000 | 1331 |
+0.205 target over a properly prompted base, and it wins or ties on all 50 tickets (33 wins, 17 ties, 0 losses).
General-knowledge accuracy drops 0.758 -> 0.678, four times the 0.020 tolerance the lab allows. This is textbook catastrophic forgetting and the cause is the data: 225 of 225 training examples are ticket -> JSON, with no general-domain replay mixed in. The model learned that every input means "emit triage JSON".
Use it for ticket triage only. Do not put it on a general assistant path. The fix is known (1-5% replay data, retrain the same 30 steps) and is not applied here.
All 6 of its 200 field errors are the same one: urgency: thap read as trung_binh, on
exactly the 6 tickets containing the phrase "Khi nào tiện". The corpus marks low
urgency three synonymous ways; the adapter binds two of them perfectly (Không vội 7/7,
Hỏi cho biết thôi 5/5) and misses this one 0/6 — despite it having the most training
examples of the three (35, all labelled thap). intent, product and sentiment are
50/50.
Note that training loss is blind to all of this, and worse than blind: an attention-only contrast run with matched parameter budget reached a lower final loss (0.5377 vs 0.6249) while scoring identically on the task (194/200 both).
valid_trace_rate = 0.00) — training answers are bare JSON.Adapter weights follow the base model's license (unsloth/Qwen3.5-4B). Training corpus is
synthetic and generated by the lab.