Downloads · 30 days
62
44% of all-time downloads
eorgantzoglou/qwen2.5-0.5b-airline-triage-lora
qwen2.5-0.5b-airline-triage-lora is a text generation model from eorgantzoglou. 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.
LoRA adapters that turn Qwen2.5-0.5B-Instruct into a classifier for airline customer-support messages. Given a tweet, the model returns JSON with an intent (10 classes), an urgency level (3 levels, time-based criterio…
Downloads · 30 days
62
44% of all-time downloads
All-time downloads
142
Public
Repo size
46.7 MB
Likes
1
Public
Click a slice to open those files.
.safetensors35.2 MB · 75%
From the Hugging Face model README
LoRA adapters that turn Qwen2.5-0.5B-Instruct into a classifier for airline customer-support messages. Given a tweet, the model returns JSON with an intent (10 classes), an urgency level (3 levels, time-based criterion) and an abusive flag.
Trained on 5,130 tweets from the Customer Support on Twitter corpus, labeled by DeepSeek V4 Flash and audited against a 300-message human-reviewed gold set (labeler–human agreement: intent 97.7%, urgency 92.3%).
Full pipeline (labeling, audit, training, FastAPI serving, AWS deployment): github.com/eorgantzoglou/Smart-Support-Ticket-Triage
Evaluated on the 300-message gold set against human labels — the gold set was fully excluded from training:
| Metric | Value |
|---|---|
| Intent accuracy (10 classes) | 73.0% |
| Intent macro-F1 | 0.645 |
| Urgency accuracy (3 levels) | 80.0% |
| Valid JSON output | 300/300 |
The zero-shot base model classifies essentially everything as
general_question — the classification ability comes from these adapters.
Errors concentrate in rare classes (special_assistance: F1 0.29 from only
121 training examples); frequent classes do well (praise 0.91, delay 0.83,
lost luggage 0.80).
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE = "Qwen/Qwen2.5-0.5B-Instruct"
ADAPTER = "eorgantzoglou/qwen2.5-0.5b-airline-triage-lora"
SYSTEM_PROMPT = (
"You are a triage assistant for an airline's customer support. "
"Classify the customer tweet. Respond with json only, in exactly this format: "
'{"intent": "...", "urgency": "...", "abusive": true/false}. '
"intent must be one of: delay_disruption, checkin_boarding_issue, "
"flight_cancellation_rebooking, lost_luggage, special_assistance, "
"general_complaint, general_question, praise_feedback, spam_irrelevant, "
"other_unclear. urgency must be one of: high, medium, low."
)
tokenizer = AutoTokenizer.from_pretrained(BASE)
model = PeftModel.from_pretrained(
AutoModelForCausalLM.from_pretrained(BASE, torch_dtype=torch.float32), ADAPTER
).merge_and_unload()
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "my bags are lost and nobody at the desk is helping"},
]
inputs = tokenizer(
tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True),
return_tensors="pt",
)
out = model.generate(**inputs, max_new_tokens=60, do_sample=False,
pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# {"intent": "lost_luggage", "urgency": "high", "abusive": false}
The system prompt must match the one used in training (above) — the model was fine-tuned with it and expects it verbatim.
special_assistance, spam_irrelevant) have low F1 due to
class imbalance.