Model: Anshrajsingh/qwen2.5-1.5b-ticket-classifier Source: Original Platform
library_name, tags, license, language, base_model, pipeline_tag
| library_name | tags | license | language | base_model | pipeline_tag | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| transformers |
|
apache-2.0 |
|
|
text-generation |
Model Card for Model ID
🚀 Production-Grade SLM Structured Data Extractor
Fine-Tuned Qwen-1.5B-Instruct for Zero-Yapping Strict JSON Schema Compliance
📌 Business Case & Problem Statement
In enterprise production environments, unstructured text (customer support tickets, invoices, logs) must be mapped to structured databases (SQL/NoSQL) with 100% deterministic reliability.
While massive commercial LLMs (like GPT-4o) achieve high accuracy, they introduce major bottlenecks for high-throughput narrow tasks:
- High API Costs: Processing millions of tokens daily is economically unsustainable.
- High Latency: Cloud API round-trips slow down real-time automated routing workflows.
- Data Privacy Risks: Transmitting sensitive client information (PII) to third-party APIs violates data compliance laws (GDPR/HIPAA).
- Formatting Violations ("Yapping"): General-purpose base models frequently violate strict formatting constraints by adding conversational filler (e.g., "Here is the JSON you requested...").
The Solution
This project demonstrates Cost-Conscious AI Engineering by fine-tuning a 1.5 Billion parameter Small Language Model (SLM) to perform production-grade, schema-bound classification with near-zero latency and fraction of a cent compute cost, making it entirely deployable on the edge or low-cost commodity GPUs.
📊 Performance & ROI Benchmark
We evaluated the model on a hidden test dataset of customer support tickets across 4 categorical schema keys: category, urgency, sentiment, and action_required.
| Metric | Base Model (Qwen2.5-1.5B-Instruct) | Fine-Tuned SLM (LoRA Adapted) |
|---|---|---|
| Valid JSON Generation Rate | 100% (Wrapped in Markdown) | 100% (Pure Strict JSON) |
| Schema Compliance | 0.0% (Generated arbitrary tags) | 95.6% (Strictly adheres to enum keys) |
| Exact Match Accuracy | 0.0% | 91.3% |
| Formatting Filler (Yapping) | High | 0.0% (Starts with { ends with }) |
| Deployment Suitability | General Chat | Production-Ready Automated API |
💰 Estimated Cost Breakdown (At Scale)
Assumed volume: 1 Million Tickets/Month (~300M Tokens processed)
- Commercial LLM API (e.g., GPT-4o Class): ~$750 - $1,500 / month
- This Fine-Tuned SLM (Hosted on Single Low-End Instance / Serverless GPU): <$25 / month
- Net Business Savings: ~96.5% Cost Reduction with 100% data privacy.
🛠️ Technical Implementation & Architecture
1. Technology Stack
- Base Model:
Qwen/Qwen2.5-1.5B-Instruct - Fine-Tuning Technique: Parameter-Efficient Fine-Tuning (PEFT) using QLoRA (4-bit quantization)
- Infrastructure: Trained via PyTorch and Hugging Face
Trainerpipeline on a single consumer-grade T4 GPU. - Inference UI: Gradio application deployed seamlessly on Hugging Face Spaces.
2. Target Features & Schema Constraints
The model was fine-tuned using custom-engineered synthetic dataset structures following the ChatML format to map arbitrary inputs directly into this immutable JSON schema:
{
"category": "billing | technical | refund | account | general",
"urgency": "low | medium | high",
"sentiment": "positive | negative | neutral",
"action_required": "auto_reply | escalate | close"
}