Text Classification
Transformers
Safetensors
English
distilbert
prompt-injection
security
cybersecurity
llm-security
ml-intern
text-embeddings-inference
Instructions to use av-codes/pi-detector-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use av-codes/pi-detector-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="av-codes/pi-detector-distilbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("av-codes/pi-detector-distilbert") model = AutoModelForSequenceClassification.from_pretrained("av-codes/pi-detector-distilbert") - Notebooks
- Google Colab
- Kaggle
File size: 2,871 Bytes
551ef81 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | {
"best_global_step": 99,
"best_metric": 1.0,
"best_model_checkpoint": "./pi-detector/checkpoint-99",
"epoch": 1.0,
"eval_steps": 500,
"global_step": 99,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.010101010101010102,
"grad_norm": 1.3391671180725098,
"learning_rate": 0.0,
"loss": 0.6838793754577637,
"step": 1
},
{
"epoch": 0.10101010101010101,
"grad_norm": 1.2506626844406128,
"learning_rate": 1.8000000000000001e-06,
"loss": 0.6808025042215983,
"step": 10
},
{
"epoch": 0.20202020202020202,
"grad_norm": 1.1518597602844238,
"learning_rate": 3.8000000000000005e-06,
"loss": 0.6861461639404297,
"step": 20
},
{
"epoch": 0.30303030303030304,
"grad_norm": 1.91855788230896,
"learning_rate": 5.8e-06,
"loss": 0.6577313423156739,
"step": 30
},
{
"epoch": 0.40404040404040403,
"grad_norm": 1.835654854774475,
"learning_rate": 7.800000000000002e-06,
"loss": 0.5954501628875732,
"step": 40
},
{
"epoch": 0.5050505050505051,
"grad_norm": 1.999822735786438,
"learning_rate": 9.800000000000001e-06,
"loss": 0.5008408069610596,
"step": 50
},
{
"epoch": 0.6060606060606061,
"grad_norm": 2.83133864402771,
"learning_rate": 1.18e-05,
"loss": 0.37516820430755615,
"step": 60
},
{
"epoch": 0.7070707070707071,
"grad_norm": 1.6260528564453125,
"learning_rate": 1.38e-05,
"loss": 0.29813175201416015,
"step": 70
},
{
"epoch": 0.8080808080808081,
"grad_norm": 1.7019435167312622,
"learning_rate": 1.58e-05,
"loss": 0.2266446352005005,
"step": 80
},
{
"epoch": 0.9090909090909091,
"grad_norm": 1.1480830907821655,
"learning_rate": 1.7800000000000002e-05,
"loss": 0.17041007280349732,
"step": 90
},
{
"epoch": 1.0,
"eval_accuracy": 1.0,
"eval_f1": 1.0,
"eval_loss": 0.032340291887521744,
"eval_precision": 1.0,
"eval_recall": 1.0,
"eval_runtime": 0.2543,
"eval_samples_per_second": 503.339,
"eval_steps_per_second": 15.729,
"step": 99
}
],
"logging_steps": 10,
"max_steps": 495,
"num_input_tokens_seen": 0,
"num_train_epochs": 5,
"save_steps": 500,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": false
},
"attributes": {}
}
},
"total_flos": 32576631053856.0,
"train_batch_size": 16,
"trial_name": null,
"trial_params": null
}
|