Publish WebPromptFilter model
Browse filesFiles changed (6)
- .gitattributes+1
- README.mdAdded+17
- config.jsonAdded+142
- model.safetensorsAdded+3
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+21
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617---license: apache-2.0base_model: knowledgator/EdgeCoder-Multilingual-61Mpipeline_tag: token-classificationtags: [prompt-injection, deberta-v2, flashdeberta]datasets: [perplexity-ai/browsesafe-plus-plus]---
# WebPromptFilter EdgeCoder Markdown classifier
Fine-tuned EdgeCoder-Multilingual-61M on the BrowseSafe++ training partition for line-fragment prompt-injection classification. Input contains a task and Markdown fragments preceded by mask tokens. Read classification scores at the mask positions and map fragments back to source lines. The input and evaluation contract is documented at https://github.com/MaojieXu/WebPromptFilter/tree/codex/markdown-data-preparation .
Training used a group-aware 90:10 split of 29,500 pairs and a group-held-out validation subset of the training partition. Internal test derives from the original training split, not the upstream evaluation-only test set. One epoch, 5,204 steps, microbatch 3, four accumulation steps, AdamW learning rate 2e-5. Labels are automatically projected. Some attack pages could not be localized.
The unquantized checkpoint scored line-level precision 97.2058%, recall 95.9864%, F1 96.5922% at threshold 0.5 on supervised portions of internal test. 56 unresolved test pages were excluded. Results do not establish performance on all web content or unlabelled instructions.
Base model is Apache 2.0: https://huggingface.co/knowledgator/EdgeCoder-Multilingual-61M . Training data is BrowseSafe++ by Yuetian Chen, Kaiyuan Zhang, Yuntao Du, Thomas Li, Mark Tenenholtz, Kyle Polley, Jerry Ma, Denis Yarats and Ninghui Li: https://huggingface.co/datasets/perplexity-ai/browsesafe-plus-plus . Its training split is CC BY 4.0.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142{ "_attn_implementation_autoset": true, "architectures": [ "FlashDebertaV2ForTokenClassification" ], "attention_precision": "native", "attention_probs_dropout_prob": 0.1, "dtype": "bfloat16", "embedding_size": 128, "generator_config": { "_name_or_path": "", "add_cross_attention": false, "architectures": null, "attention_chunk_size": 512, "attention_probs_dropout_prob": 0.1, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "early_stopping": false, "embedding_size": 128, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 384, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "initializer_range": 0.02, "intermediate_size": 1536, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_eps": 1e-07, "legacy": true, "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 2048, "max_relative_positions": -1, "min_length": 0, "model_type": "deberta-v2", "no_repeat_ngram_size": 0, "norm_rel_ebd": "layer_norm", "num_attention_heads": 6, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 8, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": 0, "pooler_dropout": 0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 384, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 512, "prefix": null, "problem_type": null, "pruned_heads": {}, "relative_attention": true, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "share_att_key": true, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torch_dtype": null, "torchscript": false, "transformers_version": "4.52.4", "type_vocab_size": 0, "typical_p": 1.0, "unpad_inputs": true, "use_bfloat16": false, "vocab_size": 251000 }, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 384, "id2label": { "0": "BENIGN", "1": "INJECTION" }, "initializer_range": 0.02, "intermediate_size": 1536, "label2id": { "BENIGN": 0, "INJECTION": 1 }, "layer_norm_eps": 1e-07, "legacy": true, "max_position_embeddings": 2048, "max_relative_positions": -1, "model_type": "deberta-v2", "norm_rel_ebd": "layer_norm", "num_attention_heads": 6, "num_hidden_layers": 16, "pack_bucket": "auto", "pack_bucket_training": null, "pad_token_id": 0, "pooler_dropout": 0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 384, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 512, "relative_attention": true, "share_att_key": true, "transformers_version": "5.24.1", "type_vocab_size": 0, "unpad_inputs": true, "vocab_size": 251000}123version https://git-lfs.github.com/spec/v1oid sha256:feee406bed8ecd5df3bc14dfd593d0ba4a6864e84764d8173b9353fbef03411dsize 121960508123version https://git-lfs.github.com/spec/v1oid sha256:e500a074ca8e99adcd073731af29c0aff6611b957c84a67016b6f2e1b7e9692dsize 16018767123456789101112131415161718192021{ "add_prefix_space": true, "backend": "tokenizers", "bos_token": "[CLS]", "clean_up_tokenization_spaces": false, "cls_token": "[CLS]", "do_lower_case": false, "eos_token": "[SEP]", "is_local": true, "local_files_only": true, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "pad_token": "[PAD]", "sep_token": "[SEP]", "sp_model_kwargs": {}, "split_by_punct": false, "tokenizer_class": "DebertaV2Tokenizer", "unk_id": 3, "unk_token": "[UNK]", "vocab_type": "spm"}.gitattributes+1
README.mdAdded+17
config.jsonAdded+142
model.safetensorsAdded+3
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+21