Instructions to use sahilchat/m1_promptguard_bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sahilchat/m1_promptguard_bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sahilchat/m1_promptguard_bert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sahilchat/m1_promptguard_bert") model = AutoModelForSequenceClassification.from_pretrained("sahilchat/m1_promptguard_bert") - Notebooks
- Google Colab
- Kaggle
m1_promptguard_bert
This model is a fine-tuned version of bert-base-uncased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0744
- Accuracy: 0.9801
- Precision: 0.9804
- Recall: 0.9799
- F1: 0.9801
- Fpr: 0.0196
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: 2e-05
- train_batch_size: 128
- eval_batch_size: 256
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | Fpr |
|---|---|---|---|---|---|---|---|---|
| 0.0809 | 1.0 | 1250 | 0.0682 | 0.9744 | 0.9783 | 0.9702 | 0.9742 | 0.0215 |
| 0.0398 | 2.0 | 2500 | 0.0640 | 0.9780 | 0.9735 | 0.9829 | 0.9782 | 0.0268 |
| 0.0187 | 3.0 | 3750 | 0.0754 | 0.9806 | 0.9781 | 0.9832 | 0.9807 | 0.022 |
Framework versions
- Transformers 5.2.0
- Pytorch 2.4.1+cu124
- Datasets 4.5.0
- Tokenizers 0.22.2
- Downloads last month
- 2
Model tree for sahilchat/m1_promptguard_bert
Base model
google-bert/bert-base-uncased