santman/distilbert
Browse files- README.md +21 -50
- config.json +14 -16
- model.safetensors +2 -2
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- training_args.bin +1 -1
- vocab.txt +0 -0
README.md
CHANGED
|
@@ -1,18 +1,16 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
-
base_model:
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
model-index:
|
| 8 |
-
- name: results
|
| 9 |
-
results: []
|
| 10 |
-
datasets:
|
| 11 |
-
- SantmanKT/hr-intent-dataset
|
| 12 |
metrics:
|
| 13 |
- accuracy
|
| 14 |
- precision
|
| 15 |
- recall
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -20,53 +18,26 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 20 |
|
| 21 |
# results
|
| 22 |
|
| 23 |
-
This model is a fine-tuned version of [
|
| 24 |
It achieves the following results on the evaluation set:
|
| 25 |
-
- Loss: 1.
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
## Model description
|
| 28 |
|
| 29 |
-
|
| 30 |
-
It takes a merged user query and context string as input and predicts the correct HR intent label (e.g., generate-offer, check-leave-balance, etc.).
|
| 31 |
-
|
| 32 |
|
| 33 |
## Intended uses & limitations
|
| 34 |
-
Intended uses
|
| 35 |
-
- Automating HR assistants, chatbots, and workflow engines to map employee queries to pre-defined HR actions.
|
| 36 |
|
| 37 |
-
|
| 38 |
-
- Trained only on enterprise HR dataset with limited intent classes.
|
| 39 |
-
- English only; not robust to out-of-domain (non-HR) queries.
|
| 40 |
|
| 41 |
## Training and evaluation data
|
| 42 |
|
| 43 |
-
|
| 44 |
-
- 133 rows of labeled HR queries covering 12 intent classes.
|
| 45 |
-
- Each sample: text = user query + context, label = HR intent.
|
| 46 |
-
- 80% train, 20% validation split, stratified by label.
|
| 47 |
|
| 48 |
## Training procedure
|
| 49 |
-
## Evaluation results (on validation set)
|
| 50 |
-
|
| 51 |
-
- **Accuracy**: 96.3%
|
| 52 |
-
- **Weighted Precision**: 97.5%
|
| 53 |
-
- **Weighted Recall**: 96.3%
|
| 54 |
-
- **Weighted F1**: 97.0%
|
| 55 |
-
|
| 56 |
-
### Per-class metrics
|
| 57 |
-
|
| 58 |
-
| Intent | Precision | Recall | F1 | Support |
|
| 59 |
-
|---------------------------|-----------|--------|-----|---------|
|
| 60 |
-
| generate-offer | 1.00 | 1.00 | 1.00| 4 |
|
| 61 |
-
| review-contract | 1.00 | 0.75 | 0.86| 4 |
|
| 62 |
-
| ... | ... | ... | ... | ... |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
### Example predictions
|
| 67 |
-
|
| 68 |
-
- **Input:** I need a vacation from June 10 to 12. [context: {domain: HR, topic: leave management, subject: leave request}]
|
| 69 |
-
- **Prediction:** request-leave
|
| 70 |
|
| 71 |
### Training hyperparameters
|
| 72 |
|
|
@@ -81,18 +52,18 @@ The following hyperparameters were used during training:
|
|
| 81 |
|
| 82 |
### Training results
|
| 83 |
|
| 84 |
-
| Training Loss | Epoch | Step | Validation Loss |
|
| 85 |
-
|:-------------:|:-----:|:----:|:---------------:|
|
| 86 |
-
| 2.
|
| 87 |
-
| 2.
|
| 88 |
-
| 1.
|
| 89 |
-
| 1.
|
| 90 |
-
| 1.
|
| 91 |
|
| 92 |
|
| 93 |
### Framework versions
|
| 94 |
|
| 95 |
-
- Transformers 4.54.
|
| 96 |
- Pytorch 2.6.0+cu124
|
| 97 |
- Datasets 4.0.0
|
| 98 |
-
- Tokenizers 0.21.
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
+
base_model: distilbert-base-uncased
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
metrics:
|
| 8 |
- accuracy
|
| 9 |
- precision
|
| 10 |
- recall
|
| 11 |
+
model-index:
|
| 12 |
+
- name: results
|
| 13 |
+
results: []
|
| 14 |
---
|
| 15 |
|
| 16 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 18 |
|
| 19 |
# results
|
| 20 |
|
| 21 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the None dataset.
|
| 22 |
It achieves the following results on the evaluation set:
|
| 23 |
+
- Loss: 1.4586
|
| 24 |
+
- Accuracy: 0.8889
|
| 25 |
+
- Precision: 1.0
|
| 26 |
+
- Recall: 0.8889
|
| 27 |
|
| 28 |
## Model description
|
| 29 |
|
| 30 |
+
More information needed
|
|
|
|
|
|
|
| 31 |
|
| 32 |
## Intended uses & limitations
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
More information needed
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## Training and evaluation data
|
| 37 |
|
| 38 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## Training procedure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
### Training hyperparameters
|
| 43 |
|
|
|
|
| 52 |
|
| 53 |
### Training results
|
| 54 |
|
| 55 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall |
|
| 56 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|
|
| 57 |
+
| 2.497 | 1.0 | 14 | 2.4813 | 0.1111 | 0.0617 | 0.1111 |
|
| 58 |
+
| 2.3512 | 2.0 | 28 | 2.1629 | 0.4444 | 0.6222 | 0.4444 |
|
| 59 |
+
| 1.7293 | 3.0 | 42 | 1.8070 | 0.8148 | 0.8148 | 0.8148 |
|
| 60 |
+
| 1.4604 | 4.0 | 56 | 1.5398 | 0.8148 | 0.8148 | 0.8148 |
|
| 61 |
+
| 1.1833 | 5.0 | 70 | 1.4586 | 0.8889 | 1.0 | 0.8889 |
|
| 62 |
|
| 63 |
|
| 64 |
### Framework versions
|
| 65 |
|
| 66 |
+
- Transformers 4.54.0
|
| 67 |
- Pytorch 2.6.0+cu124
|
| 68 |
- Datasets 4.0.0
|
| 69 |
+
- Tokenizers 0.21.2
|
config.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"hidden_dropout_prob": 0.1,
|
| 10 |
-
"hidden_size": 768,
|
| 11 |
"id2label": {
|
| 12 |
"0": "LABEL_0",
|
| 13 |
"1": "LABEL_1",
|
|
@@ -23,7 +22,6 @@
|
|
| 23 |
"11": "LABEL_11"
|
| 24 |
},
|
| 25 |
"initializer_range": 0.02,
|
| 26 |
-
"intermediate_size": 3072,
|
| 27 |
"label2id": {
|
| 28 |
"LABEL_0": 0,
|
| 29 |
"LABEL_1": 1,
|
|
@@ -38,17 +36,17 @@
|
|
| 38 |
"LABEL_8": 8,
|
| 39 |
"LABEL_9": 9
|
| 40 |
},
|
| 41 |
-
"layer_norm_eps": 1e-12,
|
| 42 |
"max_position_embeddings": 512,
|
| 43 |
-
"model_type": "
|
| 44 |
-
"
|
| 45 |
-
"
|
| 46 |
"pad_token_id": 0,
|
| 47 |
-
"position_embedding_type": "absolute",
|
| 48 |
"problem_type": "single_label_classification",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
"torch_dtype": "float32",
|
| 50 |
-
"transformers_version": "4.54.
|
| 51 |
-
"type_vocab_size": 2,
|
| 52 |
-
"use_cache": true,
|
| 53 |
"vocab_size": 30522
|
| 54 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"activation": "gelu",
|
| 3 |
"architectures": [
|
| 4 |
+
"DistilBertForSequenceClassification"
|
| 5 |
],
|
| 6 |
+
"attention_dropout": 0.1,
|
| 7 |
+
"dim": 768,
|
| 8 |
+
"dropout": 0.1,
|
| 9 |
+
"hidden_dim": 3072,
|
|
|
|
|
|
|
| 10 |
"id2label": {
|
| 11 |
"0": "LABEL_0",
|
| 12 |
"1": "LABEL_1",
|
|
|
|
| 22 |
"11": "LABEL_11"
|
| 23 |
},
|
| 24 |
"initializer_range": 0.02,
|
|
|
|
| 25 |
"label2id": {
|
| 26 |
"LABEL_0": 0,
|
| 27 |
"LABEL_1": 1,
|
|
|
|
| 36 |
"LABEL_8": 8,
|
| 37 |
"LABEL_9": 9
|
| 38 |
},
|
|
|
|
| 39 |
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "distilbert",
|
| 41 |
+
"n_heads": 12,
|
| 42 |
+
"n_layers": 6,
|
| 43 |
"pad_token_id": 0,
|
|
|
|
| 44 |
"problem_type": "single_label_classification",
|
| 45 |
+
"qa_dropout": 0.1,
|
| 46 |
+
"seq_classif_dropout": 0.2,
|
| 47 |
+
"sinusoidal_pos_embds": false,
|
| 48 |
+
"tie_weights_": true,
|
| 49 |
"torch_dtype": "float32",
|
| 50 |
+
"transformers_version": "4.54.0",
|
|
|
|
|
|
|
| 51 |
"vocab_size": 30522
|
| 52 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59d11b4b218eb0ce47c768fd742fe0eac19423b2751ee59b8c9315dbcb0d767f
|
| 3 |
+
size 267863328
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "[PAD]",
|
| 51 |
+
"sep_token": "[SEP]",
|
| 52 |
+
"strip_accents": null,
|
| 53 |
+
"tokenize_chinese_chars": true,
|
| 54 |
+
"tokenizer_class": "DistilBertTokenizer",
|
| 55 |
+
"unk_token": "[UNK]"
|
| 56 |
+
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92ebce3e0ff3e35ffad1ef85eee74972e77cc6508e8a5636b61e7344265ba0fe
|
| 3 |
size 5304
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|