File size: 3,207 Bytes
78cddeb
 
 
 
 
 
 
 
 
 
 
 
 
 
f5b2e02
 
 
 
 
78cddeb
 
 
 
 
f5b2e02
78cddeb
 
 
 
 
 
 
 
f5b2e02
 
 
 
 
 
 
 
 
 
 
 
78cddeb
 
 
 
f5b2e02
 
 
 
 
78cddeb
 
 
f5b2e02
 
78cddeb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5b2e02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
library_name: transformers
license: apache-2.0
base_model: distilbert-base-uncased
tags:
- generated_from_trainer
metrics:
- accuracy
- precision
- recall
- f1
model-index:
- name: QueryCategorizer
  results: []
datasets:
- bitext/Bitext-customer-support-llm-chatbot-training-dataset
language:
- en
pipeline_tag: text-classification
---


# QueryCategorizer

This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the bitext/Bitext-customer-support-llm-chatbot-training-dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0038
- Accuracy: 0.9996
- Precision: 0.9996
- Recall: 0.9996
- F1: 0.9996

## Model description
A fine-tuned DistilBERT model that classifies customer support queries into one of 9 departments, 
designed to auto-route incoming support tickets to the correct team.
## Model Details

- **Base model:** distilbert-base-uncased
- **Task:** Multi-class text classification (9 classes)
- **Language:** English
- **Fine-tuned on:** bitext/Bitext-customer-support-llm-chatbot-training-dataset

The model predicts one of the following 9 departments:

ACCOUNT, CONTACT, DELIVERY, FEEDBACK, INVOICE, ORDER, PAYMENT, REFUND, SHIPPING


## Intended uses & limitations

- Routing incoming customer support emails/messages to the appropriate department
- Prototyping multi-class text classification pipelines
- Educational demonstrations of fine-tuning transformer models for classification
- It is limited to just classify the message but not forward them to the appropriate department
- Out of 11 labels mentioned in dataset, we only took 9 and removed "Cancel" and "Subscription" because of limited no of data samples for that class.

## Training and evaluation data

The bitext/Bitext-customer-support-llm-chatbot-training-dataset was used for training and evaluation of the model.
80% was reserved for training, 10% for validation and 10% for testing.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 0.0079        | 1.0   | 1125 | 0.0053          | 0.9988   | 0.9988    | 0.9988 | 0.9988 |
| 0.0036        | 2.0   | 2250 | 0.0061          | 0.9984   | 0.9984    | 0.9984 | 0.9984 |
| 0.0009        | 3.0   | 3375 | 0.0038          | 0.9996   | 0.9996    | 0.9996 | 0.9996 |
| 0.0005        | 4.0   | 4500 | 0.0038          | 0.9992   | 0.9992    | 0.9992 | 0.9992 |
| 0.0001        | 5.0   | 5625 | 0.0029          | 0.9996   | 0.9996    | 0.9996 | 0.9996 |
| 0.0000        | 6.0   | 6750 | 0.0028          | 0.9996   | 0.9996    | 0.9996 | 0.9996 |


### Framework versions

- Transformers 5.16.1
- Pytorch 2.11.0+cu128
- Datasets 4.8.5
- Tokenizers 0.23.1