Instructions to use alenatz/bert-because-trainer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alenatz/bert-because-trainer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="alenatz/bert-because-trainer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("alenatz/bert-because-trainer") model = AutoModelForSequenceClassification.from_pretrained("alenatz/bert-because-trainer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
bert-because-trainer
This model is a fine-tuned version of bert-base-cased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0859
- Accuracy: 0.9785
- F1: 0.9647
- Recall: 0.9766
- Precision: 0.9531
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: 2
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Recall | Precision |
|---|---|---|---|---|---|---|---|
| 0.64 | 0.16 | 50 | 0.5307 | 0.7402 | 0.6333 | 0.7468 | 0.5497 |
| 0.5488 | 0.31 | 100 | 0.5084 | 0.8354 | 0.6430 | 0.4935 | 0.9223 |
| 0.4663 | 0.47 | 150 | 0.4426 | 0.7863 | 0.7306 | 0.9649 | 0.5878 |
| 0.4629 | 0.62 | 200 | 0.3278 | 0.8401 | 0.7838 | 0.9649 | 0.6599 |
| 0.4015 | 0.78 | 250 | 0.2249 | 0.9259 | 0.8773 | 0.8818 | 0.8728 |
| 0.3475 | 0.93 | 300 | 0.2204 | 0.9173 | 0.8704 | 0.9247 | 0.8222 |
| 0.2924 | 1.09 | 350 | 0.1708 | 0.9450 | 0.9094 | 0.9195 | 0.8996 |
| 0.2047 | 1.25 | 400 | 0.1872 | 0.9528 | 0.9222 | 0.9312 | 0.9134 |
| 0.1768 | 1.4 | 450 | 0.1928 | 0.9423 | 0.9102 | 0.9740 | 0.8542 |
| 0.2212 | 1.56 | 500 | 0.1898 | 0.9614 | 0.9341 | 0.9117 | 0.9577 |
| 0.3448 | 1.71 | 550 | 0.1127 | 0.9672 | 0.9469 | 0.9727 | 0.9224 |
| 0.1806 | 1.87 | 600 | 0.0943 | 0.9739 | 0.9575 | 0.9805 | 0.9356 |
Framework versions
- Transformers 4.37.2
- Pytorch 2.3.1
- Datasets 2.19.1
- Tokenizers 0.15.1
- Downloads last month
- 4
Model tree for alenatz/bert-because-trainer
Base model
google-bert/bert-base-cased