Qwen2.5-0.5B ticket triage LoRA adapter
LoRA adapter for Qwen/Qwen2.5-0.5B-Instruct that reads one customer support ticket and returns strict JSON: category, priority, sentiment, needs_human, suggested_action and a short reason. Trained on synthetic tickets generated with gpt-4o-mini. Code, data card and evaluation: https://github.com/Khalid-Mehmood-117/fine-tuned-llm-ticket-triage
Business rules (safety, legal, security, chargeback) are applied in code after the model and
are not part of this adapter. Use the system prompt from src/triage/prompts.py.
Training
TRL SFTTrainer, LoRA r=16, alpha=32, dropout=0.05, all linear layers, lr 0.0002, cosine schedule, effective batch 16, up to 3 epochs with early stopping on validation loss, fp16 on Tesla T4, loss on the answer only. 1343 training and 169 validation tickets, repo commit 1e2f835. Best validation loss 0.3280. Training time 7.3 min.
Validation metrics (greedy decoding, before business rules)
| metric | value |
|---|---|
| tickets | 169 |
| json_valid | 1.0 |
| category_accuracy | 0.923 |
| priority_accuracy | 0.876 |
| sentiment_accuracy | 0.858 |
| needs_human_accuracy | 0.941 |
| suggested_action_accuracy | 0.864 |
| all_fields_accuracy | 0.657 |
| seconds_per_ticket | 0.366 |
Test set results are in the GitHub repo (eval/results.md).