Instructions to use abuzarkhan/bilingual-ticket-triage-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use abuzarkhan/bilingual-ticket-triage-adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-3b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "abuzarkhan/bilingual-ticket-triage-adapter") - Transformers
How to use abuzarkhan/bilingual-ticket-triage-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abuzarkhan/bilingual-ticket-triage-adapter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("abuzarkhan/bilingual-ticket-triage-adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abuzarkhan/bilingual-ticket-triage-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abuzarkhan/bilingual-ticket-triage-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abuzarkhan/bilingual-ticket-triage-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abuzarkhan/bilingual-ticket-triage-adapter
- SGLang
How to use abuzarkhan/bilingual-ticket-triage-adapter with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "abuzarkhan/bilingual-ticket-triage-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abuzarkhan/bilingual-ticket-triage-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "abuzarkhan/bilingual-ticket-triage-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abuzarkhan/bilingual-ticket-triage-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abuzarkhan/bilingual-ticket-triage-adapter with Docker Model Runner:
docker model run hf.co/abuzarkhan/bilingual-ticket-triage-adapter
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, andentities(order_id,product_name,account_email,sentiment) - Categories: billing, shipping_delivery, refund_return, technical_issue, account_access, product_complaint, general_inquiry, 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
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.
- Downloads last month
- -