Instructions to use lekhnathrijal/bert-question-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lekhnathrijal/bert-question-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="lekhnathrijal/bert-question-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("lekhnathrijal/bert-question-classifier") model = AutoModelForSequenceClassification.from_pretrained("lekhnathrijal/bert-question-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ai-research-lab/bert-question-classifier
Browse files- README.md +33 -34
- config.json +18 -0
- model.safetensors +1 -1
- tokenizer.json +10 -1
README.md
CHANGED
|
@@ -21,11 +21,11 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 21 |
|
| 22 |
This model is a fine-tuned version of [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on the None dataset.
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
-
- Loss:
|
| 25 |
-
- Accuracy: 0.
|
| 26 |
-
- Recall: 0.
|
| 27 |
-
- Precision: 0.
|
| 28 |
-
- F1: 0.
|
| 29 |
|
| 30 |
## Model description
|
| 31 |
|
|
@@ -44,9 +44,9 @@ More information needed
|
|
| 44 |
### Training hyperparameters
|
| 45 |
|
| 46 |
The following hyperparameters were used during training:
|
| 47 |
-
- learning_rate:
|
| 48 |
-
- train_batch_size:
|
| 49 |
-
- eval_batch_size:
|
| 50 |
- seed: 42
|
| 51 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
- lr_scheduler_type: linear
|
|
@@ -57,32 +57,31 @@ The following hyperparameters were used during training:
|
|
| 57 |
|
| 58 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Recall | Precision | F1 |
|
| 59 |
|:-------------:|:------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
| 60 |
-
| No log | 0.
|
| 61 |
-
| No log | 0.
|
| 62 |
-
| No log | 0.
|
| 63 |
-
| No log | 0.
|
| 64 |
-
|
|
| 65 |
-
|
|
| 66 |
-
|
|
| 67 |
-
|
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
|
|
| 71 |
-
|
|
| 72 |
-
|
|
| 73 |
-
|
|
| 74 |
-
|
|
| 75 |
-
|
|
| 76 |
-
|
|
| 77 |
-
|
|
| 78 |
-
|
|
| 79 |
-
|
|
| 80 |
-
|
|
| 81 |
-
|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
-
| 4.1055 | 4.9808 | 2600 | 4.0243 | 0.9374 | 0.6628 | 0.6533 | 0.6580 |
|
| 86 |
|
| 87 |
|
| 88 |
### Framework versions
|
|
|
|
| 21 |
|
| 22 |
This model is a fine-tuned version of [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on the None dataset.
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
+
- Loss: 1.5848
|
| 25 |
+
- Accuracy: 0.9719
|
| 26 |
+
- Recall: 0.8524
|
| 27 |
+
- Precision: 0.8409
|
| 28 |
+
- F1: 0.8466
|
| 29 |
|
| 30 |
## Model description
|
| 31 |
|
|
|
|
| 44 |
### Training hyperparameters
|
| 45 |
|
| 46 |
The following hyperparameters were used during training:
|
| 47 |
+
- learning_rate: 1.5e-05
|
| 48 |
+
- train_batch_size: 4
|
| 49 |
+
- eval_batch_size: 4
|
| 50 |
- seed: 42
|
| 51 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
- lr_scheduler_type: linear
|
|
|
|
| 57 |
|
| 58 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Recall | Precision | F1 |
|
| 59 |
|:-------------:|:------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
| 60 |
+
| No log | 0.0959 | 100 | 5.2511 | 0.8846 | 0.4563 | 0.3862 | 0.4183 |
|
| 61 |
+
| No log | 0.1918 | 200 | 4.7859 | 0.9093 | 0.4991 | 0.5014 | 0.5002 |
|
| 62 |
+
| No log | 0.2876 | 300 | 4.3639 | 0.9228 | 0.6110 | 0.5702 | 0.5899 |
|
| 63 |
+
| No log | 0.3835 | 400 | 4.0136 | 0.9346 | 0.6752 | 0.6312 | 0.6525 |
|
| 64 |
+
| 4.7001 | 0.4794 | 500 | 3.7321 | 0.9383 | 0.6846 | 0.6535 | 0.6687 |
|
| 65 |
+
| 4.7001 | 0.5753 | 600 | 3.4591 | 0.9449 | 0.7146 | 0.6902 | 0.7022 |
|
| 66 |
+
| 4.7001 | 0.6711 | 700 | 3.3056 | 0.9425 | 0.6873 | 0.6825 | 0.6849 |
|
| 67 |
+
| 4.7001 | 0.7670 | 800 | 2.9697 | 0.9494 | 0.7404 | 0.7140 | 0.7270 |
|
| 68 |
+
| 4.7001 | 0.8629 | 900 | 2.7873 | 0.9511 | 0.7395 | 0.7271 | 0.7332 |
|
| 69 |
+
| 3.1425 | 0.9588 | 1000 | 2.6415 | 0.9551 | 0.7636 | 0.7481 | 0.7558 |
|
| 70 |
+
| 3.1425 | 1.0547 | 1100 | 2.4893 | 0.9581 | 0.7801 | 0.7640 | 0.7719 |
|
| 71 |
+
| 3.1425 | 1.1505 | 1200 | 2.3650 | 0.9600 | 0.7810 | 0.7798 | 0.7804 |
|
| 72 |
+
| 3.1425 | 1.2464 | 1300 | 2.1932 | 0.9645 | 0.8086 | 0.8026 | 0.8056 |
|
| 73 |
+
| 3.1425 | 1.3423 | 1400 | 2.1029 | 0.9651 | 0.8139 | 0.8042 | 0.8090 |
|
| 74 |
+
| 2.2748 | 1.4382 | 1500 | 2.0278 | 0.9666 | 0.8238 | 0.8120 | 0.8179 |
|
| 75 |
+
| 2.2748 | 1.5340 | 1600 | 1.9880 | 0.9660 | 0.8232 | 0.8067 | 0.8149 |
|
| 76 |
+
| 2.2748 | 1.6299 | 1700 | 1.8956 | 0.9679 | 0.8334 | 0.8167 | 0.8250 |
|
| 77 |
+
| 2.2748 | 1.7258 | 1800 | 1.8376 | 0.9686 | 0.8350 | 0.8225 | 0.8287 |
|
| 78 |
+
| 2.2748 | 1.8217 | 1900 | 1.7823 | 0.9690 | 0.8393 | 0.8232 | 0.8312 |
|
| 79 |
+
| 1.8388 | 1.9175 | 2000 | 1.7044 | 0.9707 | 0.8465 | 0.8338 | 0.8401 |
|
| 80 |
+
| 1.8388 | 2.0134 | 2100 | 1.6618 | 0.9709 | 0.8502 | 0.8331 | 0.8416 |
|
| 81 |
+
| 1.8388 | 2.1093 | 2200 | 1.6139 | 0.9716 | 0.8536 | 0.8372 | 0.8453 |
|
| 82 |
+
| 1.8388 | 2.2052 | 2300 | 1.5848 | 0.9719 | 0.8524 | 0.8409 | 0.8466 |
|
| 83 |
+
| 1.8388 | 2.3011 | 2400 | 1.5922 | 0.9716 | 0.8496 | 0.8397 | 0.8446 |
|
| 84 |
+
| 1.4663 | 2.3969 | 2500 | 1.5409 | 0.9719 | 0.8524 | 0.8409 | 0.8466 |
|
|
|
|
| 85 |
|
| 86 |
|
| 87 |
### Framework versions
|
config.json
CHANGED
|
@@ -5,6 +5,24 @@
|
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"classifier_dropout": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"gradient_checkpointing": false,
|
| 9 |
"hidden_act": "gelu",
|
| 10 |
"hidden_dropout_prob": 0.1,
|
|
|
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"classifier_dropout": null,
|
| 8 |
+
"custom_pipelines": {
|
| 9 |
+
"question-classifier": {
|
| 10 |
+
"default": {
|
| 11 |
+
"model": {
|
| 12 |
+
"pt": [
|
| 13 |
+
"ai-research-lab/bert-question-classifier",
|
| 14 |
+
"main"
|
| 15 |
+
]
|
| 16 |
+
}
|
| 17 |
+
},
|
| 18 |
+
"impl": "classifier_pipeline.MultiTaskClassifierPipeline",
|
| 19 |
+
"pt": [
|
| 20 |
+
"AutoModelForSequenceClassification"
|
| 21 |
+
],
|
| 22 |
+
"tf": [],
|
| 23 |
+
"type": "text"
|
| 24 |
+
}
|
| 25 |
+
},
|
| 26 |
"gradient_checkpointing": false,
|
| 27 |
"hidden_act": "gelu",
|
| 28 |
"hidden_dropout_prob": 0.1,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 438057080
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1023f00f099b59e758a789fecd3eb91fa219b7c06f81aa9259cd9a72441ffc7a
|
| 3 |
size 438057080
|
tokenizer.json
CHANGED
|
@@ -6,7 +6,16 @@
|
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
-
"padding":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
| 12 |
"id": 0,
|
|
|
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
+
"padding": {
|
| 10 |
+
"strategy": {
|
| 11 |
+
"Fixed": 512
|
| 12 |
+
},
|
| 13 |
+
"direction": "Right",
|
| 14 |
+
"pad_to_multiple_of": null,
|
| 15 |
+
"pad_id": 0,
|
| 16 |
+
"pad_type_id": 0,
|
| 17 |
+
"pad_token": "[PAD]"
|
| 18 |
+
},
|
| 19 |
"added_tokens": [
|
| 20 |
{
|
| 21 |
"id": 0,
|