Views
No views yet
intent, urgency, product, and sentiment.unsloth/Qwen3.5-4B.| Run | Target | Regression | JSON format | Latency (ms/sample) |
|---|---|---|---|---|
| Base + naive prompt | 0.000 | 0.7578 | 0.000 | 3370.5 |
| Base + optimized prompt | 0.765 | 0.7578 | 1.000 | 1066.3 |
| This LoRA adapter | 0.970 | 0.6778 | 1.000 | 1511.4 |
+0.205 over the optimized-prompt baseline, but
regression drops by -0.080, beyond the allowed tolerance of -0.020. The formal
verdict is therefore FAILED. This is an honest experimental result, not a claim that
the adapter is production-ready. See submission/REPORT.md and
the machine-readable files under results/.unsloth/Qwen3.5-4Br=16, alpha=321e-41import torch
2from peft import PeftModel
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5base_id = "unsloth/Qwen3.5-4B"
6adapter_id = "mjusdda/lab21-2A202601343-qwen35-triage-vi"
7
8tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
9base = AutoModelForCausalLM.from_pretrained(
10 base_id,
11 trust_remote_code=True,
12 dtype=torch.float16,
13 device_map="auto",
14)
15model = PeftModel.from_pretrained(base, adapter_id)
16
17ticket = "Shop ơi, đơn bàn phím cơ của tôi giao chậm quá. Nhờ kiểm tra gấp."
18messages = [
19 {"role": "system", "content": "Phân loại ticket sau."},
20 {"role": "user", "content": ticket},
21]
22text = tokenizer.apply_chat_template(
23 messages,
24 tokenize=False,
25 add_generation_prompt=True,
26 enable_thinking=False,
27)
28inputs = tokenizer(text, return_tensors="pt").to(model.device)
29with torch.no_grad():
30 output = model.generate(**inputs, max_new_tokens=160, do_sample=False)
31print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))intent: doi_tra, van_chuyen, hoan_tien, san_pham_loi, hoi_thong_tinurgency: cao, trung_binh, thapsentiment: tieu_cuc, trung_tinh, tich_cucproduct: product name copied from the ticketurgency=trung_binh when the correct value was thap.submission/REPORT.mdresults/verdict.json,
results/runs.csv, and results/autopsy.json