Text Classification
Transformers
TensorBoard
Safetensors
bert
Generated from Trainer
text-embeddings-inference
Instructions to use xshubhamx/bert-base-cased with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xshubhamx/bert-base-cased with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="xshubhamx/bert-base-cased")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("xshubhamx/bert-base-cased") model = AutoModelForSequenceClassification.from_pretrained("xshubhamx/bert-base-cased", device_map="auto") - Notebooks
- Google Colab
- Kaggle
bert-base-cased
This model was trained from scratch on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 1.6877
- Accuracy: 0.8102
- Precision: 0.8108
- Recall: 0.8102
- Precision Macro: 0.7633
- Recall Macro: 0.7599
- Macro Fpr: 0.0170
- Weighted Fpr: 0.0165
- Weighted Specificity: 0.9750
- Macro Specificity: 0.9857
- Weighted Sensitivity: 0.8102
- Macro Sensitivity: 0.7599
- F1 Micro: 0.8102
- F1 Macro: 0.7596
- F1 Weighted: 0.8098
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 15
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | Precision Macro | Recall Macro | Macro Fpr | Weighted Fpr | Weighted Specificity | Macro Specificity | Weighted Sensitivity | Macro Sensitivity | F1 Micro | F1 Macro | F1 Weighted |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.2487 | 1.0 | 643 | 0.8270 | 0.7475 | 0.7315 | 0.7475 | 0.5948 | 0.5801 | 0.0252 | 0.0236 | 0.9559 | 0.9802 | 0.7475 | 0.5801 | 0.7475 | 0.5695 | 0.7284 |
| 0.7012 | 2.0 | 1286 | 0.7203 | 0.7909 | 0.7910 | 0.7909 | 0.6785 | 0.6953 | 0.0192 | 0.0185 | 0.9718 | 0.9842 | 0.7909 | 0.6953 | 0.7909 | 0.6824 | 0.7873 |
| 0.5493 | 3.0 | 1929 | 0.8682 | 0.7909 | 0.7861 | 0.7909 | 0.6958 | 0.7065 | 0.0192 | 0.0185 | 0.9716 | 0.9842 | 0.7909 | 0.7065 | 0.7909 | 0.6985 | 0.7839 |
| 0.2971 | 4.0 | 2572 | 0.9885 | 0.8064 | 0.8093 | 0.8064 | 0.7203 | 0.7227 | 0.0174 | 0.0169 | 0.9745 | 0.9854 | 0.8064 | 0.7227 | 0.8064 | 0.7145 | 0.8039 |
| 0.2142 | 5.0 | 3215 | 1.1664 | 0.8009 | 0.8062 | 0.8009 | 0.7230 | 0.7128 | 0.0179 | 0.0174 | 0.9760 | 0.9851 | 0.8009 | 0.7128 | 0.8009 | 0.7040 | 0.7982 |
| 0.1312 | 6.0 | 3858 | 1.1734 | 0.7947 | 0.7994 | 0.7947 | 0.7368 | 0.7345 | 0.0189 | 0.0181 | 0.9731 | 0.9845 | 0.7947 | 0.7345 | 0.7947 | 0.7297 | 0.7931 |
| 0.0773 | 7.0 | 4501 | 1.3176 | 0.8071 | 0.8086 | 0.8071 | 0.7353 | 0.7467 | 0.0173 | 0.0168 | 0.9762 | 0.9856 | 0.8071 | 0.7467 | 0.8071 | 0.7367 | 0.8057 |
| 0.0424 | 8.0 | 5144 | 1.4781 | 0.8002 | 0.8034 | 0.8002 | 0.7390 | 0.7444 | 0.0181 | 0.0175 | 0.9739 | 0.9849 | 0.8002 | 0.7444 | 0.8002 | 0.7388 | 0.8000 |
| 0.0367 | 9.0 | 5787 | 1.5131 | 0.8071 | 0.8138 | 0.8071 | 0.7325 | 0.7592 | 0.0173 | 0.0168 | 0.9764 | 0.9856 | 0.8071 | 0.7592 | 0.8071 | 0.7423 | 0.8088 |
| 0.0235 | 10.0 | 6430 | 1.5637 | 0.8025 | 0.8042 | 0.8025 | 0.7678 | 0.7473 | 0.0179 | 0.0173 | 0.9736 | 0.9851 | 0.8025 | 0.7473 | 0.8025 | 0.7502 | 0.8006 |
| 0.0116 | 11.0 | 7073 | 1.5827 | 0.8156 | 0.8152 | 0.8156 | 0.7474 | 0.7546 | 0.0164 | 0.0159 | 0.9767 | 0.9862 | 0.8156 | 0.7546 | 0.8156 | 0.7458 | 0.8137 |
| 0.0083 | 12.0 | 7716 | 1.6471 | 0.8095 | 0.8087 | 0.8095 | 0.7554 | 0.7538 | 0.0172 | 0.0165 | 0.9744 | 0.9856 | 0.8095 | 0.7538 | 0.8095 | 0.7519 | 0.8082 |
| 0.0008 | 13.0 | 8359 | 1.7113 | 0.8048 | 0.8076 | 0.8048 | 0.7753 | 0.7513 | 0.0175 | 0.0170 | 0.9739 | 0.9852 | 0.8048 | 0.7513 | 0.8048 | 0.7574 | 0.8046 |
| 0.0034 | 14.0 | 9002 | 1.6869 | 0.8087 | 0.8091 | 0.8087 | 0.7571 | 0.7590 | 0.0172 | 0.0166 | 0.9752 | 0.9856 | 0.8087 | 0.7590 | 0.8087 | 0.7567 | 0.8083 |
| 0.0023 | 15.0 | 9645 | 1.6877 | 0.8102 | 0.8108 | 0.8102 | 0.7633 | 0.7599 | 0.0170 | 0.0165 | 0.9750 | 0.9857 | 0.8102 | 0.7599 | 0.8102 | 0.7596 | 0.8098 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.1.2
- Datasets 2.1.0
- Tokenizers 0.15.2
- Downloads last month
- 3