Summary
A LoRA adapter (trained with QLoRA) for ibm-granite/granite-3.3-2b-instruct
that triages IT helpdesk tickets. Given a ticket's subject and body it replies with strict JSON:
{"category": "<one of 8 categories>", "priority": "<Low | Medium | High | Critical>"}
Result: fine-tuning raises exact match (both labels right) from 50.2% (base model, zero-shot) to 73.0%, and valid-JSON answers from 99.8% to 100.0%; a TF-IDF + logistic regression baseline reaches 67.8%.
The merged full model is at shreyabatra6/granite-3.3-2b-instruct-it-ticket-triage.
Code (data generation, training, evaluation, this card): https://github.com/ShreyaBatra6/it-ticket-triage-lora.
Intended use
- Intended: a first-pass triage suggestion for IT service desks: routing a new ticket to a queue
and proposing a priority, with a human agent confirming. Also a reference for small-model QLoRA
fine-tuning with a fair before/after evaluation.
- Out of scope: making final priority or SLA decisions without review; security incident
response decisions; tickets in languages other than English; any input that is not an IT
support ticket (the model always answers with one of the fixed labels, even when none fits).
Label definitions
Table with columns: Category, Definition| Category | Definition |
|---|
| Hardware | laptops, desktops, monitors, docks, peripherals, phones (not printers) |
| Software | applications and the OS: crashes, errors, installs, updates, licenses |
| Network | Wi-Fi, LAN, VPN, internet, DNS, slow or dropping connections |
| Access/Accounts | logins, passwords, MFA, lockouts, permissions, access requests |
| Email | mailboxes, Outlook, sending/receiving mail, calendars, distribution lists |
| Security | phishing, malware, suspicious activity, lost/stolen devices, data exposure |
| Printer | printers, scanners, copiers: jams, queues, drivers, print quality |
| Other | general or non-IT requests: facilities, furniture, questions, onboarding logistics |
Table with columns: Priority, Definition| Priority | Definition |
|---|
| Low | minor issue or request, workaround exists, no deadline |
| Medium | work is slowed but can continue; fix within days |
| High | a person or team is blocked, or a deadline is at risk; fix today |
| Critical | company-wide outage, active security incident, or executive/customer impact; fix now |
Training data
The training data is fully synthetic. No real tickets, users or companies are included.
shreyabatra6/it-ticket-triage: tickets generated from
hand-written templates with randomized slots, writing styles (formal, casual, terse, frustrated,
mobile, non-native), typos, cross-category vocabulary, optional unrelated side requests, and
realistic label imbalance. Priority is expressed through who is affected, whether they can still
work and any deadline; 3% of priorities were moved one level to mimic annotator disagreement.
Table with columns: Split, Tickets| Split | Tickets |
|---|
| train | 3218 |
| validation | 374 |
| test | 404 |
Split method: template held out (StratifiedGroupKFold on category+priority).
Validation and test tickets only use problem templates that never appear in training, so the
scores below measure generalisation to unseen phrasing, not memorisation.
A MinHash check removed validation/test tickets that were near-duplicates of training tickets
(Jaccard ≥ 0.8).
Training procedure
Table with columns: Setting, Value| Setting | Value |
|---|
| Method | QLoRA (4-bit NF4 + LoRA) |
| Base model | ibm-granite/granite-3.3-2b-instruct |
| LoRA rank / alpha / dropout | 16 / 32 / 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable parameters | 28,180,480 (1.1% of 2,561,720,320) |
| Loss | assistant answer only (prompt tokens masked) |
| Epochs / optimizer steps | 0.99 / 200 |
| Learning rate / schedule | 0.0002, cosine, 5% warmup |
| Batch size (per device × grad. accumulation) | 8 × 2 = 16 |
| Max sequence length | 512 |
| Precision / optimizer | fp16 / adamw_torch_fused |
| Gradient checkpointing | True |
| Checkpoint selection | lowest validation loss (step 200, loss 0.0478) |
| Seed | 42 |
| Hardware | 1x Tesla T4 (14.6 GB) |
| Training time | 46.7 min |
| Libraries | transformers 5.23.0, peft 0.22.0, trl 1.18.2, bitsandbytes 0.50.2, torch 2.14.1+cu130 |

Results: before vs. after fine-tuning
Test split (404 tickets). Every LLM row uses the same prompt and greedy decoding. An answer
counts only if the entire output is valid JSON with known labels; nothing is repaired.
Table with columns: Model, Cat Acc, Cat F1, Prio Acc, Prio F1, Exact Match, Valid JSON %| Model | Cat Acc | Cat F1 | Prio Acc | Prio F1 | Exact Match | Valid JSON % |
|---|
| TF-IDF + LogReg | 94.6% | 0.942 | 72.8% | 0.723 | 67.8% | n/a |
| Base zero-shot | 82.9% | 0.852 | 57.7% | 0.564 | 50.2% | 99.8% |
| Base few-shot (k=3) | 85.1% | 0.870 | 58.4% | 0.559 | 50.2% | 99.8% |
| LoRA fine-tuned | 99.8% | 0.998 | 73.3% | 0.724 | 73.0% | 100.0% |
Acc = accuracy, F1 = macro-F1, Exact Match = both labels correct. Best value per column in bold.
TF-IDF is a classifier, so "valid JSON" does not apply to it.
Table with columns: Model, Avg. latency per ticket, Batch size, Device| Model | Avg. latency per ticket | Batch size | Device |
|---|
| TF-IDF + LogReg | 0.8 ms | 404 | cpu |
| Base zero-shot | 228.5 ms | 8 | Tesla T4 |
| Base few-shot (k=3) | 311.6 ms | 8 | Tesla T4 |
| LoRA fine-tuned | 397.8 ms | 8 | Tesla T4 |
Confusion matrices (fine-tuned model)

✅ Expected {"category": "Software", "priority": "High"}
Subject: Computer running slow Dear Service Desk, Something is using 100% CPU and my laptop is basically unusable. I've restarted it a few times. Nobody else has mentioned it. Many thanks,Carlos
Model output: {"category": "Software", "priority": "High"}
✅ Expected {"category": "Other", "priority": "Medium"}
Subject: problem Hiya, what time should elena arrive on their first day and who will meet them? it keeps interrupting my work. whenveer you get a chance. just me, my colleagues are fine. thx
Model output: {"category": "Other", "priority": "Medium"}
✅ Expected {"category": "Access/Accounts", "priority": "Medium"}
Subject: Login issue Hi, I forgot my password and I'm locked out of my laptop. Caps lock is off. I changed it on Friday. I tried the self-service reset but it says my phone number isn't registered. I've been waiting two days for a reply already. I already restarted my notebook. Nobody else has mentioned it. Whenever is convenient. I can still work but it's frustrating. Unrelated, but I got a weird email yesterday to
Model output: {"category": "Access/Accounts", "priority": "Medium"}
❌ Expected {"category": "Security", "priority": "High"}
Subject: Weird pop-ups Pop-ups keep appearing saying my computer is infected and to call a phone number. I'm totally blocked.
Model output: {"category": "Security", "priority": "Critical"}
Limitations and bias
- Synthetic data shift. The model was trained and tested on templated synthetic tickets. Real
tickets are longer, messier, multilingual, contain signatures, threads and screenshots, and follow
each organisation's own category scheme. Expect lower accuracy on real data; re-evaluate (and
ideally fine-tune) on your own labelled tickets before relying on it.
- Priority is subjective. Different teams would label the same ticket differently, and users
often overstate urgency ("URGENT" on routine requests). The model only sees the text, cannot
verify claims, and inherits the priority conventions encoded in the synthetic generator.
- Fixed label set. It always answers with one of the 8 categories,
including for tickets that fit none of them.
- Ticket text is untrusted input. A ticket can contain instructions aimed at the model; keep a
human in the loop for anything consequential.
- English only, office-IT context.
How to use
The model expects exactly the prompt it was trained with: the system prompt below plus the
ticket as Subject: ... followed by a blank line and the body.
import json import torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModel base_id = "ibm-granite/granite-3.3-2b-instruct"adapter_id = "shreyabatra6/granite-3.3-2b-instruct-it-ticket-triage-lora"tokenizer = AutoTokenizer.from_pretrained(base_id)model = AutoModelForCausalLM.from_pretrained(base_id, dtype=torch.float16, device_map="auto")model = PeftModel.from_pretrained(model, adapter_id) SYSTEM_PROMPT = """You triage IT helpdesk tickets. Assign exactly one category and one priority. Categories:- Hardware: laptops, desktops, monitors, docks, peripherals, phones (not printers)- Software: applications and the OS: crashes, errors, installs, updates, licenses- Network: Wi-Fi, LAN, VPN, internet, DNS, slow or dropping connections- Access/Accounts: logins, passwords, MFA, lockouts, permissions, access requests- Email: mailboxes, Outlook, sending/receiving mail, calendars, distribution lists- Security: phishing, malware, suspicious activity, lost/stolen devices, data exposure- Printer: printers, scanners, copiers: jams, queues, drivers, print quality- Other: general or non-IT requests: facilities, furniture, questions, onboarding logistics Priorities:- Low: minor issue or request, workaround exists, no deadline- Medium: work is slowed but can continue; fix within days- High: a person or team is blocked, or a deadline is at risk; fix today- Critical: company-wide outage, active security incident, or executive/customer impact; fix now Reply with JSON only: {"category": "<category>", "priority": "<priority>"}""" ticket = "Subject: VPN keeps disconnecting\n\nSince this morning the VPN drops every 5 minutes and I can't stay on my calls."messages = [{"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": ticket}]inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)output = model.generate(**inputs, max_new_tokens=48, do_sample=False)answer = tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True)print(json.loads(answer)) # e.g. {'category': 'Network', 'priority': 'High'}
Citation
@misc{granite_3_3_2b_instruct_it_ticket_triage_lora, title = {granite-3.3-2b-instruct IT ticket triage (LoRA adapter)}, author = {shreyabatra6}, year = {2026}, howpublished = {\url{https://huggingface.co/shreyabatra6/granite-3.3-2b-instruct-it-ticket-triage-lora}}, note = {QLoRA fine-tune of ibm-granite/granite-3.3-2b-instruct for IT ticket triage}}
Built on QLoRA (Dettmers et al., 2023) and LoRA
(Hu et al., 2021).