FarhanAK128 commited on
Commit
b52a289
·
verified ·
1 Parent(s): dd8df04

Create README.md

Browse files

![accuracy_plot](https://cdn-uploads.huggingface.co/production/uploads/65bc1af7ce846f8aa908a978/WwprMh8Ohj3fy0tjnb0Sd.png)
![loss_plot](https://cdn-uploads.huggingface.co/production/uploads/65bc1af7ce846f8aa908a978/IDm_z1ud6mP35T_8eMHNl.png)

Files changed (1) hide show
  1. README.md +179 -0
README.md ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - text-classification
6
+ - gpt2
7
+ - transformers
8
+ - pytorch
9
+ - custom-architecture
10
+ - tiktoken
11
+ library_name: transformers
12
+ ---
13
+
14
+ # TicketClassificationGPT
15
+
16
+ ## Model Summary
17
+
18
+ **TicketClassificationGPT** is a GPT-2–based text classification model designed entirely from scratct to classify IT support tickets into 8 predefined categories.
19
+ The model uses the original OpenAI GPT-2 architecture and weights, with the language modeling head replaced by a custom classification head. Only the final layers were fine-tuned for the ticket classification task.
20
+
21
+ This model is fully compatible with the Hugging Face `transformers` ecosystem and can be loaded using `AutoModel.from_pretrained`.
22
+
23
+ ---
24
+
25
+ ## How to Get Started with the Model
26
+
27
+ ### Inference Example (Transformers + tiktoken)
28
+
29
+ ```python
30
+ from transformers import AutoModel
31
+ import tiktoken
32
+
33
+ # Load tokenizer
34
+ tokenizer = tiktoken.get_encoding("gpt2")
35
+
36
+ # Load model
37
+ model_id = "FarhanAK128/TicketClassificationGPT"
38
+ model = AutoModel.from_pretrained(
39
+ model_id,
40
+ trust_remote_code=True
41
+ )
42
+
43
+ # Example prediction
44
+ text = "Need extra space on Google Drive."
45
+ prediction = model.predict(text, tokenizer)
46
+
47
+ print("Predicted class:", prediction) # Predicted class: Storage
48
+ ```
49
+
50
+ **Note:** This model uses a custom `.predict()` method defined in the repository and requires `trust_remote_code=True` to function.
51
+
52
+ ---
53
+
54
+ ## Model Details
55
+
56
+ ### Model Description
57
+
58
+ - **Developed by:** Farhan Ali Khan
59
+ - **Model type:** GPT-2–based text classification model
60
+ - **Base architecture:** GPT-2 (OpenAI)
61
+ - **Framework:** PyTorch
62
+ - **Task:** Text Classification
63
+ - **Number of classes:** 8
64
+ - **Language:** English
65
+ - **License:** MIT
66
+ - **Finetuned from model:** OpenAI GPT-2
67
+
68
+ ### Classification Labels
69
+ 0: Hardware
70
+ 1: HR Support
71
+ 2: Access
72
+ 3: Miscellaneous
73
+ 4: Storage
74
+ 5: Purchase
75
+ 6: Internal Project
76
+ 7: Administrative Rights
77
+
78
+ ### Model Sources
79
+
80
+ - **Repository:** https://huggingface.co/FarhanAK128/TicketClassificationGPT
81
+ - **Base model:** OpenAI GPT-2 like architecture from scratch
82
+ - **Paper:** https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf
83
+
84
+ ---
85
+
86
+ ## Training Details
87
+ ### Training Data
88
+
89
+ The model was trained on the **IT Service Ticket Classification Dataset** available on Kaggle.
90
+
91
+ - **Dataset name:** IT Service Ticket Classification Dataset
92
+ - **Source:** Kaggle
93
+ - **Link:** https://www.kaggle.com/datasets/adisongoh/it-service-ticket-classification-dataset
94
+ - **Content:** Labeled IT support ticket text data
95
+ - **Language:** English
96
+
97
+ The dataset was used for supervised multi-class classification after standard text preprocessing and tokenization.
98
+
99
+
100
+ ### Training Procedure
101
+
102
+ - **Base weights:** OpenAI GPT-2
103
+ - **Fine-tuning strategy:** Partial fine-tuning (classification head + final transformer layers)
104
+ - **Optimizer:** AdamW
105
+ - **Learning rate:** 1e-4
106
+ - **Weight decay:** 0.1
107
+ - **Epochs:** 5
108
+ - **Random seed:** 123
109
+ - **Loss function:** Cross-Entropy Loss
110
+ - **Training regime:** FP32
111
+ - **Evaluation frequency:** Every 30 steps
112
+ - **Total training time:** ~140 minutes
113
+ - **Final training loss:** ~0.61
114
+ - **Final validation loss:** ~0.86
115
+
116
+ ### 📈 Training Progress
117
+ #### Training and Validation Loss
118
+ ![Training and Validation Loss](https://cdn-uploads.huggingface.co/production/uploads/65bc1af7ce846f8aa908a978/IDm_z1ud6mP35T_8eMHNl.png)
119
+
120
+
121
+ #### Training and Validation Accuracy
122
+ ![Training and Validation Accuracy](https://cdn-uploads.huggingface.co/production/uploads/65bc1af7ce846f8aa908a978/WwprMh8Ohj3fy0tjnb0Sd.png)
123
+
124
+ ### 📊 Model Performance
125
+
126
+ | Dataset Split | Accuracy |
127
+ |--------------|----------|
128
+ | 🏋️ Training | **76.54%** |
129
+ | 🧪 Validation | **75.67%** |
130
+ | 🧠 Test | **73.83%** |
131
+
132
+ ---
133
+
134
+ ## Uses
135
+
136
+ ### Direct Use
137
+
138
+ This model can be used directly to classify short IT support ticket texts into predefined categories.
139
+
140
+ Example use cases:
141
+ - Automated ticket routing
142
+ - Helpdesk prioritization
143
+ - Internal IT workflow automation
144
+
145
+ ### Downstream Use
146
+
147
+ The model may be further fine-tuned on:
148
+ - Organization-specific ticket data
149
+ - Expanded label sets
150
+ - Domain-specific terminology
151
+
152
+ ### Out-of-Scope Use
153
+
154
+ - Multilingual text classification
155
+ - Open-domain topic classification
156
+ - Legal, medical, or safety-critical decision-making
157
+
158
+ ---
159
+
160
+ ## Bias, Risks, and Limitations
161
+
162
+ - Trained on a limited-domain dataset (IT support tickets)
163
+ - Not evaluated for demographic or social bias
164
+ - Predictions may be unreliable for unseen ticket categories
165
+ - Performance depends on input text quality and length
166
+
167
+ ### Recommendations
168
+
169
+ Human validation is recommended before using predictions in production systems.
170
+ For best results, further fine-tuning on in-domain data is advised.
171
+
172
+ ---
173
+
174
+ ## Model Card Authors
175
+ **Farhan Ali Khan**
176
+
177
+ ## Model Card Contact
178
+ For questions or feedback, please reach out via my Hugging Face profile:
179
+ [FarhanAK128](https://huggingface.co/FarhanAK128)