CoolFace
Modelpublic

abuzarkhan/bilingual-ticket-triage-adapter

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
0likes16downloads
Model Card

bilingual-ticket-triage-adapter

QLoRA adapter fine-tuned from Qwen2.5-3B-Instruct for bilingual (Roman Urdu / Urdu script / English) support-ticket triage: category classification, entity extraction, and sentiment detection in a single structured JSON output.

Model Details

  • —Base model: Qwen/Qwen2.5-3B-Instruct
  • —Fine-tuning method: QLoRA (4-bit base during training via Unsloth), LoRA rank 8, alpha 16, dropout 0
  • —Target modules: all 7 linear modules (q, k, v, o, gate, up, down)
  • —Output schema: single JSON object with category (8 classes), urgency, and entities (order_id, product_name, account_email, sentiment)
  • —Categories: billing, shippingdelivery, refundreturn, technicalissue, accountaccess, productcomplaint, generalinquiry, other
  • —Languages: Roman Urdu, Urdu script, English, and code-mixed text
  • —License: This adapter is derived from Qwen2.5-3B-Instruct and is released under the Qwen research license (non-commercial use). See Qwen2.5-3B-Instruct LICENSE.

Uses

The model reads a support ticket (email or chat message) and outputs a machine-readable triage record. It is designed for the Support Ticket Analysis & Response Automation platform.

Out of scope: this is a research fine-tune on a synthetic dataset. It should not be used to process real customer data without re-validation, and it is not a general-purpose chatbot.

How to Get Started

python
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-3B-Instruct",
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model = PeftModel.from_pretrained(model, "abuzarkhan/bilingual-ticket-triage-adapter")

tokenizer = AutoTokenizer.from_pretrained("abuzarkhan/bilingual-ticket-triage-adapter")

messages = [{"role": "user", "content": "mera order kab tak aayega? bohot late ho raha hai"}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_dict=True, return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

An Ollama-ready quantized build of the merged model is available at abuzarkhan/bilingual-ticket-triage-gguf.

Training Details

  • —Dataset: abuzarkhan/bilingual-ticket-triage-dataset — fully synthetic, fabricated personas, ~1,400 training tickets across 8 categories in Roman Urdu / Urdu / English
  • —Procedure: SFT (ChatML template), 1 epoch, 4-bit base, LoRA r=8 α=16 dropout=0 on all 7 linear target modules
  • —Reproduction: training notebook and data-preparation scripts are in the GitHub repository (notebooks/qwen_qlora_training.ipynb)

Evaluation

On the held-out synthetic test set (~155 tickets):

  • —Category accuracy: ~80.4%
  • —Sentiment accuracy: ~87%
  • —Entity extraction: high precision on values that appear in the text (the model is trained never to invent entities)

Full per-arm evaluation (Arm A fine-tuned, Arm B base model, Arm C Llama 3.3 70B via Groq) lives in `results/`.

Bias, Risks, and Limitations

  • —Training data is synthetic; real-world ticket distributions and dialects will differ.
  • —Model may miss entities phrased in unusual ways or in low-resource dialectal forms.
  • —The Qwen research license restricts use to research/non-commercial purposes.

Built with [Qwen](https://qwenlm.github.io/).