Downloads · 30 days
3
3% of all-time downloads
Duy007/lab21-2A202602011-qwen35-triage-vi
lab21-2A202602011-qwen35-triage-vi is a text generation model from Duy007. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Học viên: Dương Văn Duy · MSSV: 2A202602011 Base model: unsloth/Qwen3.5-4B · Tier: T4 (Colab Free, Tesla T4 16GB)
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
104
Public
Repo size
150 MB
Likes
0
Public
Click a slice to open those files.
.safetensors130 MB · 87%
From the Hugging Face model README
Học viên: Dương Văn Duy · MSSV: 2A202602011
Base model: unsloth/Qwen3.5-4B · Tier: T4 (Colab Free, Tesla T4 16GB)
Adapter LoRA (r=16, all-linear/text-linear placement — 12 target modules) fine-tune trên
250 ticket chăm sóc khách hàng tiếng Việt, chuyển ticket → JSON triage 4 trường:
intent, urgency, product, sentiment.
Đây là bài nộp Lab 21 (AICB-P2T3 · Fine-tuning & An Toàn). Báo cáo đầy đủ, số liệu chi
tiết và phân tích nằm ở submission/REPORT.md trong repo này.
| Run | target | regression | format | latency (ms) |
|---|---|---|---|---|
| (a) base + naive prompt | 0.000 | 0.758 | 0.000 | 3205 |
| (b) base + optimized prompt | 0.765 | 0.758 | 1.000 | 1038 |
| (c) LoRA fine-tune (adapter này) | 0.975 | 0.700 | 1.000 | 1397 |
Cổng hồi quy 4 nhóm: FAILED — target thắng mạnh (+0.210 so với baseline đã prompt
tối ưu) nhưng regression tụt 0.058 trên 15 câu hỏi kiến thức phổ thông, vượt ngưỡng dung
sai ±0.020. Đây là dấu hiệu catastrophic forgetting nhẹ, không phải lỗi pipeline —
phân tích đầy đủ (nguyên nhân, lỗi hệ thống ở trường urgency, đề xuất khắc phục bằng
1-5% replay data) nằm trong submission/REPORT.md mục 5–7.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "unsloth/Qwen3.5-4B"
tok = AutoTokenizer.from_pretrained(base_id)
model = AutoModelForCausalLM.from_pretrained(base_id, dtype="auto")
model = PeftModel.from_pretrained(model, "Duy007/lab21-2A202602011-qwen35-triage-vi")
messages = [
{"role": "system", "content": "Phân loại ticket sau."},
{"role": "user", "content": "Alo shop, mình đặt balo laptop mã đơn VN411453. Cho tôi trả lại. Đã 3 ngày rồi."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=64)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
adapter_model.safetensors, adapter_config.json — adapter LoRA đã train (correct run)results/ — toàn bộ JSON + runs.csv dùng để grader đối chiếu chéo với reportsubmission/REPORT.md — báo cáo đầy đủ 7 mục theo rubricBài lab gốc: hieutrungdao/Day21-Track3-Finetuning-Lab