End of training
Browse files- README.md +96 -186
- config.json +1 -1
- model.safetensors +1 -1
- runs/Jul17_12-34-05_bb9517665b4e/events.out.tfevents.1752755645.bb9517665b4e.525.1 +0 -0
- training_args.bin +0 -0
README.md
CHANGED
|
@@ -7,194 +7,104 @@ tags:
|
|
| 7 |
model-index:
|
| 8 |
- name: schedulebot-nlu-engine
|
| 9 |
results: []
|
| 10 |
-
datasets:
|
| 11 |
-
- andreaceto/hasd
|
| 12 |
-
language:
|
| 13 |
-
- en
|
| 14 |
---
|
| 15 |
|
| 16 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 17 |
should probably proofread and complete it, then remove this comment. -->
|
| 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 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
)
|
| 116 |
-
```
|
| 117 |
-
|
| 118 |
-
### Stage 2: Selective Fine-Tuning
|
| 119 |
-
|
| 120 |
-
- The DistilBERT backbone was entirely **unfrozen**.
|
| 121 |
-
- Using a very low LR allows the model to adapt even better to the new data while preserving the powerful, general-purpose knowledge.
|
| 122 |
-
|
| 123 |
-
**Setup**:
|
| 124 |
-
|
| 125 |
-
```python
|
| 126 |
-
# Define Training Arguments
|
| 127 |
-
training_args = TrainingArguments(
|
| 128 |
-
output_dir="path/to/output_dir",
|
| 129 |
-
num_train_epochs=50, # Fine.tuning epochs
|
| 130 |
-
per_device_train_batch_size=32,
|
| 131 |
-
per_device_eval_batch_size=32,
|
| 132 |
-
learning_rate=1e-6, # Learning Rate
|
| 133 |
-
weight_decay=1e-3, # AdamW weight decay
|
| 134 |
-
logging_dir="path/to/logging_dir",
|
| 135 |
-
logging_strategy="steps",
|
| 136 |
-
logging_steps=10,
|
| 137 |
-
eval_strategy="epoch",
|
| 138 |
-
save_strategy="epoch",
|
| 139 |
-
load_best_model_at_end=True,
|
| 140 |
-
metric_for_best_model="ner_f1", # Focus on NER F1 as the key metric
|
| 141 |
-
# --- Hub Arguments ---
|
| 142 |
-
push_to_hub=True,
|
| 143 |
-
hub_model_id=hub_model_id,
|
| 144 |
-
hub_strategy="end",
|
| 145 |
-
hub_token=hf_token,
|
| 146 |
-
report_to="tensorboard" # Tensorboard to monitor training
|
| 147 |
-
)
|
| 148 |
-
|
| 149 |
-
# Create the Trainer
|
| 150 |
-
trainer = Trainer(
|
| 151 |
-
model=model,
|
| 152 |
-
args=training_args,
|
| 153 |
-
train_dataset=processed_datasets["train"],
|
| 154 |
-
eval_dataset=processed_datasets["validation"],
|
| 155 |
-
processing_class=tokenizer,
|
| 156 |
-
data_collator=data_collator,
|
| 157 |
-
compute_metrics=compute_metrics, # Custom function (check how_to_use.md)
|
| 158 |
-
callbacks=[EarlyStoppingCallback(early_stopping_patience=5)]
|
| 159 |
-
)
|
| 160 |
-
```
|
| 161 |
-
## Evaluation
|
| 162 |
-
|
| 163 |
-
The model was evaluated on a held-out test set, and its performance was measured for both tasks.
|
| 164 |
-
|
| 165 |
-
### Intent Classification Performance
|
| 166 |
-
|
| 167 |
-
| Intent | Precision | Recall | F1-Score | Support |
|
| 168 |
-
| --- | --- | --- | --- | --- |
|
| 169 |
-
| bye | 1.00 | 1.00 | 1.00 | 22 |
|
| 170 |
-
| cancel | 1.00 | 0.95 | 0.98 | 21 |
|
| 171 |
-
| greeting | 1.00 | 1.00 | 1.00 | 23 |
|
| 172 |
-
| negative_reply | 0.96 | 1.00 | 0.98 | 22 |
|
| 173 |
-
| oos | 1.00 | 1.00 | 1.00 | 22 |
|
| 174 |
-
| positive_reply | 1.00 | 0.96 | 0.98 | 23 |
|
| 175 |
-
| query_avail | 0.95 | 1.00 | 0.98 | 21 |
|
| 176 |
-
| reschedule | 0.96 | 1.00 | 0.98 | 22 |
|
| 177 |
-
| schedule | 0.95 | 0.95 | 0.95 | 21 |
|
| 178 |
-
| **Accuracy** | | | **0.98** | **197** |
|
| 179 |
-
| **Macro Avg** | **0.98** | **0.98** | **0.98** | **197** |
|
| 180 |
-
| **Weighted Avg** | **0.98** | **0.98** | **0.98** | **197** |
|
| 181 |
-
|
| 182 |
-
### NER (Token Classification) Performance
|
| 183 |
-
|
| 184 |
-
| Entity | Precision | Recall | F1-Score | Support |
|
| 185 |
-
| --- | --- | --- | --- | --- |
|
| 186 |
-
| B-appointment_id | 1.00 | 1.00 | 1.00 | 25 |
|
| 187 |
-
| B-appointment_type | 1.00 | 1.00 | 1.00 | 33 |
|
| 188 |
-
| B-practitioner_name | 1.00 | 1.00 | 1.00 | 44 |
|
| 189 |
-
| O | 1.00 | 1.00 | 1.00 | 1342 |
|
| 190 |
-
| **Micro Avg** | **1.00** | **1.00** | **1.00** | 1444 |
|
| 191 |
-
| **Macro Avg** | **1.00** | **1.00** | **1.00** | 1444 |
|
| 192 |
-
| **Weighted Avg** | **1.00** | **1.00** | **1.00** | 1444 |
|
| 193 |
-
|
| 194 |
-
The model achieves near-perfect results on the NER task and excellent results on the intent classification task for this specific dataset.
|
| 195 |
-
|
| 196 |
-
## Limitations and Bias
|
| 197 |
-
|
| 198 |
-
- The model's performance is highly dependent on the quality and scope of the **HASD dataset**. It may not generalize well to phrasing or appointment types significantly different from what it was trained on.
|
| 199 |
-
- The dataset was primarily generated from templates, which may not capture the full diversity of real human language.
|
| 200 |
-
- The model inherits any biases present in the `distilbert-base-uncased` model and the `clinc/clinc_oos` dataset.
|
|
|
|
| 7 |
model-index:
|
| 8 |
- name: schedulebot-nlu-engine
|
| 9 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
|
| 15 |
+
# schedulebot-nlu-engine
|
| 16 |
+
|
| 17 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
|
| 18 |
+
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 0.3390
|
| 20 |
+
- Intent Accuracy: 0.9178
|
| 21 |
+
- Intent F1: 0.9178
|
| 22 |
+
- Ner F1: 0.9240
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training and evaluation data
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training procedure
|
| 37 |
+
|
| 38 |
+
### Training hyperparameters
|
| 39 |
+
|
| 40 |
+
The following hyperparameters were used during training:
|
| 41 |
+
- learning_rate: 1e-06
|
| 42 |
+
- train_batch_size: 32
|
| 43 |
+
- eval_batch_size: 32
|
| 44 |
+
- seed: 42
|
| 45 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 46 |
+
- lr_scheduler_type: linear
|
| 47 |
+
- num_epochs: 50
|
| 48 |
+
|
| 49 |
+
### Training results
|
| 50 |
+
|
| 51 |
+
| Training Loss | Epoch | Step | Validation Loss | Intent Accuracy | Intent F1 | Ner F1 |
|
| 52 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------------:|:---------:|:------:|
|
| 53 |
+
| No log | 1.0 | 64 | 0.7274 | 0.7785 | 0.7785 | 0.9136 |
|
| 54 |
+
| No log | 2.0 | 128 | 0.6946 | 0.7991 | 0.8005 | 0.9162 |
|
| 55 |
+
| No log | 3.0 | 192 | 0.6461 | 0.8196 | 0.8178 | 0.9158 |
|
| 56 |
+
| No log | 4.0 | 256 | 0.6226 | 0.8265 | 0.8261 | 0.9152 |
|
| 57 |
+
| No log | 5.0 | 320 | 0.5986 | 0.8516 | 0.8518 | 0.9141 |
|
| 58 |
+
| No log | 6.0 | 384 | 0.5705 | 0.8356 | 0.8359 | 0.9153 |
|
| 59 |
+
| No log | 7.0 | 448 | 0.5506 | 0.8584 | 0.8568 | 0.9153 |
|
| 60 |
+
| 0.901 | 8.0 | 512 | 0.5459 | 0.8379 | 0.8378 | 0.9147 |
|
| 61 |
+
| 0.901 | 9.0 | 576 | 0.5220 | 0.8539 | 0.8546 | 0.9158 |
|
| 62 |
+
| 0.901 | 10.0 | 640 | 0.5129 | 0.8676 | 0.8667 | 0.9157 |
|
| 63 |
+
| 0.901 | 11.0 | 704 | 0.4974 | 0.8653 | 0.8648 | 0.9146 |
|
| 64 |
+
| 0.901 | 12.0 | 768 | 0.4870 | 0.8744 | 0.8739 | 0.9180 |
|
| 65 |
+
| 0.901 | 13.0 | 832 | 0.4892 | 0.8676 | 0.8682 | 0.9180 |
|
| 66 |
+
| 0.901 | 14.0 | 896 | 0.4652 | 0.8767 | 0.8770 | 0.9174 |
|
| 67 |
+
| 0.901 | 15.0 | 960 | 0.4523 | 0.8790 | 0.8789 | 0.9174 |
|
| 68 |
+
| 0.6791 | 16.0 | 1024 | 0.4412 | 0.8881 | 0.8884 | 0.9197 |
|
| 69 |
+
| 0.6791 | 17.0 | 1088 | 0.4441 | 0.8790 | 0.8785 | 0.9208 |
|
| 70 |
+
| 0.6791 | 18.0 | 1152 | 0.4231 | 0.8950 | 0.8948 | 0.9190 |
|
| 71 |
+
| 0.6791 | 19.0 | 1216 | 0.4202 | 0.8858 | 0.8855 | 0.9202 |
|
| 72 |
+
| 0.6791 | 20.0 | 1280 | 0.4099 | 0.8950 | 0.8951 | 0.9208 |
|
| 73 |
+
| 0.6791 | 21.0 | 1344 | 0.4054 | 0.8973 | 0.8970 | 0.9219 |
|
| 74 |
+
| 0.6791 | 22.0 | 1408 | 0.4018 | 0.8950 | 0.8954 | 0.9212 |
|
| 75 |
+
| 0.6791 | 23.0 | 1472 | 0.3953 | 0.8973 | 0.8974 | 0.9201 |
|
| 76 |
+
| 0.5609 | 24.0 | 1536 | 0.3883 | 0.9041 | 0.9037 | 0.9220 |
|
| 77 |
+
| 0.5609 | 25.0 | 1600 | 0.3874 | 0.8995 | 0.8994 | 0.9224 |
|
| 78 |
+
| 0.5609 | 26.0 | 1664 | 0.3827 | 0.9041 | 0.9039 | 0.9224 |
|
| 79 |
+
| 0.5609 | 27.0 | 1728 | 0.3796 | 0.9041 | 0.9045 | 0.9230 |
|
| 80 |
+
| 0.5609 | 28.0 | 1792 | 0.3793 | 0.9018 | 0.9018 | 0.9230 |
|
| 81 |
+
| 0.5609 | 29.0 | 1856 | 0.3703 | 0.9110 | 0.9111 | 0.9219 |
|
| 82 |
+
| 0.5609 | 30.0 | 1920 | 0.3732 | 0.9018 | 0.9018 | 0.9207 |
|
| 83 |
+
| 0.5609 | 31.0 | 1984 | 0.3639 | 0.9132 | 0.9134 | 0.9219 |
|
| 84 |
+
| 0.4928 | 32.0 | 2048 | 0.3623 | 0.9064 | 0.9066 | 0.9225 |
|
| 85 |
+
| 0.4928 | 33.0 | 2112 | 0.3599 | 0.9132 | 0.9133 | 0.9230 |
|
| 86 |
+
| 0.4928 | 34.0 | 2176 | 0.3546 | 0.9110 | 0.9110 | 0.9219 |
|
| 87 |
+
| 0.4928 | 35.0 | 2240 | 0.3515 | 0.9178 | 0.9178 | 0.9230 |
|
| 88 |
+
| 0.4928 | 36.0 | 2304 | 0.3504 | 0.9155 | 0.9156 | 0.9235 |
|
| 89 |
+
| 0.4928 | 37.0 | 2368 | 0.3501 | 0.9178 | 0.9179 | 0.9235 |
|
| 90 |
+
| 0.4928 | 38.0 | 2432 | 0.3495 | 0.9132 | 0.9132 | 0.9230 |
|
| 91 |
+
| 0.4928 | 39.0 | 2496 | 0.3452 | 0.9132 | 0.9132 | 0.9235 |
|
| 92 |
+
| 0.447 | 40.0 | 2560 | 0.3430 | 0.9224 | 0.9224 | 0.9230 |
|
| 93 |
+
| 0.447 | 41.0 | 2624 | 0.3441 | 0.9132 | 0.9134 | 0.9240 |
|
| 94 |
+
| 0.447 | 42.0 | 2688 | 0.3408 | 0.9178 | 0.9178 | 0.9235 |
|
| 95 |
+
| 0.447 | 43.0 | 2752 | 0.3427 | 0.9155 | 0.9156 | 0.9236 |
|
| 96 |
+
| 0.447 | 44.0 | 2816 | 0.3420 | 0.9155 | 0.9157 | 0.9235 |
|
| 97 |
+
| 0.447 | 45.0 | 2880 | 0.3407 | 0.9201 | 0.9201 | 0.9235 |
|
| 98 |
+
| 0.447 | 46.0 | 2944 | 0.3396 | 0.9178 | 0.9178 | 0.9235 |
|
| 99 |
+
| 0.4209 | 47.0 | 3008 | 0.3401 | 0.9178 | 0.9178 | 0.9235 |
|
| 100 |
+
| 0.4209 | 48.0 | 3072 | 0.3389 | 0.9178 | 0.9178 | 0.9240 |
|
| 101 |
+
| 0.4209 | 49.0 | 3136 | 0.3392 | 0.9178 | 0.9178 | 0.9240 |
|
| 102 |
+
| 0.4209 | 50.0 | 3200 | 0.3390 | 0.9178 | 0.9178 | 0.9240 |
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
### Framework versions
|
| 106 |
+
|
| 107 |
+
- Transformers 4.53.2
|
| 108 |
+
- Pytorch 2.6.0+cu124
|
| 109 |
+
- Datasets 4.0.0
|
| 110 |
+
- Tokenizers 0.21.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
CHANGED
|
@@ -18,6 +18,6 @@
|
|
| 18 |
"sinusoidal_pos_embds": false,
|
| 19 |
"tie_weights_": true,
|
| 20 |
"torch_dtype": "float32",
|
| 21 |
-
"transformers_version": "4.53.
|
| 22 |
"vocab_size": 30522
|
| 23 |
}
|
|
|
|
| 18 |
"sinusoidal_pos_embds": false,
|
| 19 |
"tie_weights_": true,
|
| 20 |
"torch_dtype": "float32",
|
| 21 |
+
"transformers_version": "4.53.2",
|
| 22 |
"vocab_size": 30522
|
| 23 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 267851552
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:771362ffd2649dfac75137c8fb23415627356fd9ed2deab53c4b2d41215db76e
|
| 3 |
size 267851552
|
runs/Jul17_12-34-05_bb9517665b4e/events.out.tfevents.1752755645.bb9517665b4e.525.1
ADDED
|
Binary file (28.2 kB). View file
|
|
|
training_args.bin
CHANGED
|
Binary files a/training_args.bin and b/training_args.bin differ
|
|
|