Text Classification
Transformers
ONNX
Safetensors
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use av-codes/prompt-injection-detector-v3-mixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use av-codes/prompt-injection-detector-v3-mixed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="av-codes/prompt-injection-detector-v3-mixed")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("av-codes/prompt-injection-detector-v3-mixed") model = AutoModelForSequenceClassification.from_pretrained("av-codes/prompt-injection-detector-v3-mixed") - Notebooks
- Google Colab
- Kaggle
prompt-injection-detector-v3-mixed
This model is a fine-tuned version of distilbert-base-uncased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0165
- Accuracy: 0.9964
- Precision: 0.9953
- Recall: 0.9970
- F1: 0.9961
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: 32
- eval_batch_size: 64
- 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: cosine
- lr_scheduler_warmup_steps: 500
- num_epochs: 5
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|---|---|
| 0.0655 | 0.2320 | 1000 | 0.0643 | 0.9826 | 0.9876 | 0.9747 | 0.9811 |
| 0.0395 | 0.4640 | 2000 | 0.0356 | 0.9890 | 0.9916 | 0.9845 | 0.9881 |
| 0.0347 | 0.6961 | 3000 | 0.0350 | 0.9893 | 0.9949 | 0.9819 | 0.9883 |
| 0.0248 | 0.9281 | 4000 | 0.0298 | 0.9913 | 0.9976 | 0.9836 | 0.9906 |
| 0.0090 | 1.1601 | 5000 | 0.0330 | 0.9919 | 0.9896 | 0.9929 | 0.9912 |
| 0.0149 | 1.3921 | 6000 | 0.0210 | 0.9945 | 0.9949 | 0.9932 | 0.9940 |
| 0.0181 | 1.6241 | 7000 | 0.0230 | 0.9935 | 0.9937 | 0.9923 | 0.9930 |
| 0.0164 | 1.8561 | 8000 | 0.0207 | 0.9952 | 0.9935 | 0.9961 | 0.9948 |
| 0.0049 | 2.0882 | 9000 | 0.0177 | 0.9961 | 0.9947 | 0.9970 | 0.9958 |
| 0.0103 | 2.3202 | 10000 | 0.0175 | 0.9959 | 0.9958 | 0.9952 | 0.9955 |
| 0.0107 | 2.5522 | 11000 | 0.0222 | 0.9946 | 0.9952 | 0.9932 | 0.9942 |
| 0.0065 | 2.7842 | 12000 | 0.0188 | 0.9957 | 0.9947 | 0.9961 | 0.9954 |
| 0.0020 | 3.0162 | 13000 | 0.0165 | 0.9964 | 0.9953 | 0.9970 | 0.9961 |
| 0.0057 | 3.2483 | 14000 | 0.0177 | 0.9961 | 0.9947 | 0.9970 | 0.9958 |
| 0.0059 | 3.4803 | 15000 | 0.0195 | 0.9961 | 0.9952 | 0.9964 | 0.9958 |
| 0.0032 | 3.7123 | 16000 | 0.0195 | 0.9956 | 0.9949 | 0.9955 | 0.9952 |
| 0.0023 | 3.9443 | 17000 | 0.0188 | 0.9961 | 0.9958 | 0.9958 | 0.9958 |
| 0.0019 | 4.1763 | 18000 | 0.0195 | 0.9959 | 0.9952 | 0.9958 | 0.9955 |
| 0.0009 | 4.4084 | 19000 | 0.0202 | 0.9963 | 0.9958 | 0.9961 | 0.9960 |
| 0.0014 | 4.6404 | 20000 | 0.0213 | 0.9963 | 0.9958 | 0.9961 | 0.9960 |
| 0.0026 | 4.8724 | 21000 | 0.0213 | 0.9963 | 0.9958 | 0.9961 | 0.9960 |
| 0.0023 | 5.0 | 21550 | 0.0213 | 0.9963 | 0.9958 | 0.9961 | 0.9960 |
Framework versions
- Transformers 5.9.0
- Pytorch 2.7.1+cu128
- Datasets 4.8.5
- Tokenizers 0.22.2
- Downloads last month
- 311
Model tree for av-codes/prompt-injection-detector-v3-mixed
Base model
distilbert/distilbert-base-uncased