priority classifier, macro-F1 0.611
Browse files- README.md +33 -0
- config.json +49 -0
- label_map.json +7 -0
- metrics.json +119 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +24 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
base_model: microsoft/deberta-v3-base
|
| 4 |
+
datasets: [Tobi-Bueck/customer-support-tickets]
|
| 5 |
+
language: [en]
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
---
|
| 8 |
+
# Service-desk priority classifier (Group 60, AIMLZG549)
|
| 9 |
+
|
| 10 |
+
Fine-tuned `microsoft/deberta-v3-base` that assigns a customer-support ticket to a **priority**.
|
| 11 |
+
Input format: `subject + "\n\n" + body`, max 128 tokens.
|
| 12 |
+
|
| 13 |
+
## Data
|
| 14 |
+
English tickets from Tobi-Bueck/customer-support-tickets (CC BY-NC 4.0), deduplicated and split 80/10/10
|
| 15 |
+
stratified by queue (seed 42). Train 18,997 · validation 2,375 · test 2,375.
|
| 16 |
+
|
| 17 |
+
## Training
|
| 18 |
+
learning rate 5e-05 · batch size 32 · up to 8 epochs · warm-up 10% · weight decay 0.01 ·
|
| 19 |
+
class-weighted cross-entropy · early stopping (patience 2) on validation macro-F1 · fp16=True ·
|
| 20 |
+
seed 42 · training time 30.6 min.
|
| 21 |
+
|
| 22 |
+
## Test results
|
| 23 |
+
Accuracy **0.607** · macro-F1 **0.611** · weighted-F1 0.606
|
| 24 |
+
|
| 25 |
+
| Class | Precision | Recall | F1 | Support |
|
| 26 |
+
|---|---|---|---|---|
|
| 27 |
+
| high | 0.619 | 0.656 | 0.637 | 914 |
|
| 28 |
+
| low | 0.640 | 0.626 | 0.633 | 492 |
|
| 29 |
+
| medium | 0.576 | 0.550 | 0.563 | 969 |
|
| 30 |
+
|
| 31 |
+
## Intended use and limits
|
| 32 |
+
Suggests a priority to a human agent; predictions below 0.5 confidence are flagged for manual routing.
|
| 33 |
+
Trained on synthetic-style tickets in English; accuracy on a real organisation's tickets must be re-measured.
|
config.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DebertaV2ForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "high",
|
| 14 |
+
"1": "low",
|
| 15 |
+
"2": "medium"
|
| 16 |
+
},
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 3072,
|
| 19 |
+
"label2id": {
|
| 20 |
+
"high": 0,
|
| 21 |
+
"low": 1,
|
| 22 |
+
"medium": 2
|
| 23 |
+
},
|
| 24 |
+
"layer_norm_eps": 1e-07,
|
| 25 |
+
"legacy": true,
|
| 26 |
+
"max_position_embeddings": 512,
|
| 27 |
+
"max_relative_positions": -1,
|
| 28 |
+
"model_type": "deberta-v2",
|
| 29 |
+
"norm_rel_ebd": "layer_norm",
|
| 30 |
+
"num_attention_heads": 12,
|
| 31 |
+
"num_hidden_layers": 12,
|
| 32 |
+
"pad_token_id": 0,
|
| 33 |
+
"pooler_dropout": 0.0,
|
| 34 |
+
"pooler_hidden_act": "gelu",
|
| 35 |
+
"pooler_hidden_size": 768,
|
| 36 |
+
"pos_att_type": [
|
| 37 |
+
"p2c",
|
| 38 |
+
"c2p"
|
| 39 |
+
],
|
| 40 |
+
"position_biased_input": false,
|
| 41 |
+
"position_buckets": 256,
|
| 42 |
+
"relative_attention": true,
|
| 43 |
+
"share_att_key": true,
|
| 44 |
+
"tie_word_embeddings": true,
|
| 45 |
+
"transformers_version": "5.22.1",
|
| 46 |
+
"type_vocab_size": 0,
|
| 47 |
+
"use_cache": false,
|
| 48 |
+
"vocab_size": 128100
|
| 49 |
+
}
|
label_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"labels": [
|
| 3 |
+
"high",
|
| 4 |
+
"low",
|
| 5 |
+
"medium"
|
| 6 |
+
]
|
| 7 |
+
}
|
metrics.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "fine-tuned microsoft/deberta-v3-base",
|
| 3 |
+
"label": "priority",
|
| 4 |
+
"output_dir": "models/priority-classifier",
|
| 5 |
+
"mlflow_run_id": "6cc1630832924a1ba7184bd27a95923d",
|
| 6 |
+
"train_minutes": 30.6,
|
| 7 |
+
"best_checkpoint": "checkpoints/priority/checkpoint-4752",
|
| 8 |
+
"epochs_run": 8.0,
|
| 9 |
+
"test": {
|
| 10 |
+
"n": 2375,
|
| 11 |
+
"accuracy": 0.6067,
|
| 12 |
+
"macro_f1": 0.6111,
|
| 13 |
+
"weighted_f1": 0.606,
|
| 14 |
+
"per_class": {
|
| 15 |
+
"high": {
|
| 16 |
+
"precision": 0.6191950464396285,
|
| 17 |
+
"recall": 0.6564551422319475,
|
| 18 |
+
"f1-score": 0.6372809346787042,
|
| 19 |
+
"support": 914.0
|
| 20 |
+
},
|
| 21 |
+
"low": {
|
| 22 |
+
"precision": 0.6403326403326404,
|
| 23 |
+
"recall": 0.6260162601626016,
|
| 24 |
+
"f1-score": 0.6330935251798561,
|
| 25 |
+
"support": 492.0
|
| 26 |
+
},
|
| 27 |
+
"medium": {
|
| 28 |
+
"precision": 0.5762162162162162,
|
| 29 |
+
"recall": 0.5500515995872033,
|
| 30 |
+
"f1-score": 0.5628299894403379,
|
| 31 |
+
"support": 969.0
|
| 32 |
+
},
|
| 33 |
+
"accuracy": 0.6067368421052631,
|
| 34 |
+
"macro avg": {
|
| 35 |
+
"precision": 0.6119146343294951,
|
| 36 |
+
"recall": 0.6108410006605841,
|
| 37 |
+
"f1-score": 0.6110681497662994,
|
| 38 |
+
"support": 2375.0
|
| 39 |
+
},
|
| 40 |
+
"weighted avg": {
|
| 41 |
+
"precision": 0.606038503159155,
|
| 42 |
+
"recall": 0.6067368421052631,
|
| 43 |
+
"f1-score": 0.6060374940852683,
|
| 44 |
+
"support": 2375.0
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"test_sample300": {
|
| 49 |
+
"n": 300,
|
| 50 |
+
"accuracy": 0.63,
|
| 51 |
+
"macro_f1": 0.6362,
|
| 52 |
+
"weighted_f1": 0.6279,
|
| 53 |
+
"per_class": {
|
| 54 |
+
"high": {
|
| 55 |
+
"precision": 0.6299212598425197,
|
| 56 |
+
"recall": 0.7142857142857143,
|
| 57 |
+
"f1-score": 0.6694560669456067,
|
| 58 |
+
"support": 112.0
|
| 59 |
+
},
|
| 60 |
+
"low": {
|
| 61 |
+
"precision": 0.6779661016949152,
|
| 62 |
+
"recall": 0.6557377049180327,
|
| 63 |
+
"f1-score": 0.6666666666666666,
|
| 64 |
+
"support": 61.0
|
| 65 |
+
},
|
| 66 |
+
"medium": {
|
| 67 |
+
"precision": 0.6052631578947368,
|
| 68 |
+
"recall": 0.5433070866141733,
|
| 69 |
+
"f1-score": 0.5726141078838174,
|
| 70 |
+
"support": 127.0
|
| 71 |
+
},
|
| 72 |
+
"accuracy": 0.63,
|
| 73 |
+
"macro avg": {
|
| 74 |
+
"precision": 0.6377168398107239,
|
| 75 |
+
"recall": 0.6377768352726401,
|
| 76 |
+
"f1-score": 0.6362456138320302,
|
| 77 |
+
"support": 300.0
|
| 78 |
+
},
|
| 79 |
+
"weighted avg": {
|
| 80 |
+
"precision": 0.629251781194612,
|
| 81 |
+
"recall": 0.63,
|
| 82 |
+
"f1-score": 0.6278924595527313,
|
| 83 |
+
"support": 300.0
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"top_confusions": [
|
| 88 |
+
{
|
| 89 |
+
"true": "medium",
|
| 90 |
+
"predicted": "high",
|
| 91 |
+
"count": 310,
|
| 92 |
+
"examples": [
|
| 93 |
+
"Issue with Marketing Campaign Hello Customer Support, we are encountering issues with our marketing campaign, which is hindering our brand's growth and digital strategies. The problem might be due to compatibility issues with software or ha",
|
| 94 |
+
"System Specifications for Running Laravel 8 on MacBook Air Greetings Customer Support, I am writing to request the system specifications needed for running Laravel 8 on my MacBook Air. My intention is to develop web applications using Larav",
|
| 95 |
+
"Enhance Data Analytics Software for Investment Seeking assistance in optimizing data analytics software to enhance investment strategies across our product line. This will aid in making more informed decisions and improving efficiency. We w"
|
| 96 |
+
]
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"true": "high",
|
| 100 |
+
"predicted": "medium",
|
| 101 |
+
"count": 267,
|
| 102 |
+
"examples": [
|
| 103 |
+
"Data Security Please address the need to enhance security protocols for managing medical data across all affected software. It is crucial to ensure compliance with regulatory requirements and maintain patient confidentiality. We request imm",
|
| 104 |
+
"Device Malfunction Problems The company has encountered several device malfunctions impacting scanners, antivirus programs, peripherals, and data analytics operations. Potential conflicts between hardware and software have been observed. De",
|
| 105 |
+
"Request for Enhanced Encryption for Medical Data Dear Customer Support, I am reaching out to inquire about the encryption methods and plans for future enhancements that you use for storing and transmitting medical data to ensure compliance "
|
| 106 |
+
]
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"true": "medium",
|
| 110 |
+
"predicted": "low",
|
| 111 |
+
"count": 126,
|
| 112 |
+
"examples": [
|
| 113 |
+
"Request to update data analytics tools to enhance investment optimization.",
|
| 114 |
+
"Seeking information on methods to secure medical data in hospital systems. Interested in learning about the strategies your company employs to protect sensitive information.",
|
| 115 |
+
"Security Incident in Medical Systems A security breach was identified due to outdated antivirus software. An updated Norton Antivirus has been installed and the system has been scanned."
|
| 116 |
+
]
|
| 117 |
+
}
|
| 118 |
+
]
|
| 119 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e68818de01ca9ea251b0bd77b1c600b6bc203bb5fac4fa36a6bd000aa501806
|
| 3 |
+
size 737722356
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "[CLS]",
|
| 5 |
+
"cls_token": "[CLS]",
|
| 6 |
+
"do_lower_case": false,
|
| 7 |
+
"eos_token": "[SEP]",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"[PAD]",
|
| 10 |
+
"[CLS]",
|
| 11 |
+
"[SEP]"
|
| 12 |
+
],
|
| 13 |
+
"is_local": false,
|
| 14 |
+
"local_files_only": false,
|
| 15 |
+
"mask_token": "[MASK]",
|
| 16 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 17 |
+
"pad_token": "[PAD]",
|
| 18 |
+
"sep_token": "[SEP]",
|
| 19 |
+
"split_by_punct": false,
|
| 20 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
| 21 |
+
"unk_id": 3,
|
| 22 |
+
"unk_token": "[UNK]",
|
| 23 |
+
"vocab_type": "spm"
|
| 24 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:002859ab9f4cc869fc17c2807754f43450bb75996cdcb62a79e9db576f0524c9
|
| 3 |
+
size 5265
|