Update README.md
Browse files
README.md
CHANGED
@@ -1,61 +1,68 @@
|
|
1 |
-
---
|
2 |
-
library_name: transformers
|
3 |
-
license: mit
|
4 |
-
base_model: facebook/bart-large-mnli
|
5 |
-
tags:
|
6 |
-
- generated_from_keras_callback
|
7 |
-
model-index:
|
8 |
-
- name: zero-shot-prompt-classifier-bart-ft
|
9 |
-
results: []
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: facebook/bart-large-mnli
|
5 |
+
tags:
|
6 |
+
- generated_from_keras_callback
|
7 |
+
model-index:
|
8 |
+
- name: zero-shot-prompt-classifier-bart-ft
|
9 |
+
results: []
|
10 |
+
datasets:
|
11 |
+
- reddgr/nli-chatbot-prompt-categorization
|
12 |
+
---
|
13 |
+
|
14 |
+
# zero-shot-prompt-classifier-bart-ft
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli) on the [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) dataset.
|
17 |
+
|
18 |
+
The purpose of the model is to help classify chatbot prompts into categories that are relevant in the context of working with LLM conversational tools:
|
19 |
+
coding assistance, language assistance, role play, creative writing, general knowledge questions...
|
20 |
+
|
21 |
+
The model is fine-tuned and tested on the natural language inference (NLI) dataset [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization)
|
22 |
+
|
23 |
+
Below is a confusion matrix calculated on zero-shot inferences for the 10 most popular categories in the Test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload:
|
24 |
+
|
25 |
+
![Zero-shot prompt classification confusion matrix for reddgr/zero-shot-prompt-classifier-bart-ft](https://talkingtochatbots.com/wp-content/uploads/2024/12/NLI-prompt-classification.png)
|
26 |
+
|
27 |
+
As of the first version of the model uploaded to hub, the fine-tuned version outperforms the base model [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli) by 8 percentage points in this test set with 10 candidate zero-shot classes (the most frequent categories in the test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload.
|
28 |
+
|
29 |
+
The dataset and the model are continously updated as they assist with content publishing on my website [Talking to Chatbots](https://talkingtochatbots)
|
30 |
+
|
31 |
+
|
32 |
+
## Model description
|
33 |
+
|
34 |
+
More information needed
|
35 |
+
|
36 |
+
## Intended uses & limitations
|
37 |
+
|
38 |
+
More information needed
|
39 |
+
|
40 |
+
## Training and evaluation data
|
41 |
+
|
42 |
+
More information needed
|
43 |
+
|
44 |
+
## Training procedure
|
45 |
+
|
46 |
+
### Training hyperparameters
|
47 |
+
|
48 |
+
The following hyperparameters were used during training:
|
49 |
+
- optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': False, 'is_legacy_optimizer': False, 'learning_rate': 5e-06, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
|
50 |
+
- training_precision: float32
|
51 |
+
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|
55 |
+
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
|
56 |
+
| 0.9969 | 0.5490 | 0.9182 | 0.6225 | 0 |
|
57 |
+
| 0.7647 | 0.6601 | 1.0025 | 0.5441 | 1 |
|
58 |
+
| 0.6465 | 0.7157 | 1.1472 | 0.5392 | 2 |
|
59 |
+
| 0.5849 | 0.7418 | 1.1974 | 0.5049 | 3 |
|
60 |
+
| 0.4474 | 0.7843 | 1.5942 | 0.4657 | 4 |
|
61 |
+
|
62 |
+
|
63 |
+
### Framework versions
|
64 |
+
|
65 |
+
- Transformers 4.44.2
|
66 |
+
- TensorFlow 2.18.0-dev20240717
|
67 |
+
- Datasets 2.21.0
|
68 |
+
- Tokenizers 0.19.1
|