Feat: Upload fine-tuned Requin-Agent security model
Browse files- .gitattributes +1 -0
- README.md +26 -0
- encoder/config.json +79 -0
- model.safetensors +3 -0
- rl_agent_config.json +27 -0
- tokenizer/tokenizer.json +3 -0
- tokenizer/tokenizer_config.json +26 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- decision-engine
|
| 5 |
+
- system-one
|
| 6 |
+
- laya
|
| 7 |
+
- requin-agent
|
| 8 |
+
- security
|
| 9 |
+
- prompt-injection
|
| 10 |
+
- web-attack
|
| 11 |
+
language:
|
| 12 |
+
- vi
|
| 13 |
+
- en
|
| 14 |
+
pipeline_tag: text-classification
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Requin-Agent Security Decision Engine (Fine-tuned Laya)
|
| 18 |
+
|
| 19 |
+
System 1 calibrated decision model for zero-latency threat triage:
|
| 20 |
+
- **OWASP LLM01**: Prompt Injection & Jailbreak detection
|
| 21 |
+
- **Web Exploits**: SQL Injection, XSS, Command Injection, SSRF
|
| 22 |
+
- **MITRE ATT&CK**: Privilege Escalation, Credential Access, Data Exfiltration
|
| 23 |
+
- **Latency**: ~35ms per request
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
encoder/config.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForMaskedLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 2,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 1,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "float32",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": 1,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"initializer_cutoff_factor": 2.0,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 1152,
|
| 25 |
+
"layer_norm_eps": 1e-05,
|
| 26 |
+
"layer_types": [
|
| 27 |
+
"full_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention"
|
| 49 |
+
],
|
| 50 |
+
"local_attention": 128,
|
| 51 |
+
"mask_token_id": 4,
|
| 52 |
+
"max_position_embeddings": 8192,
|
| 53 |
+
"mlp_bias": false,
|
| 54 |
+
"mlp_dropout": 0.0,
|
| 55 |
+
"model_type": "modernbert",
|
| 56 |
+
"norm_bias": false,
|
| 57 |
+
"norm_eps": 1e-05,
|
| 58 |
+
"num_attention_heads": 12,
|
| 59 |
+
"num_hidden_layers": 22,
|
| 60 |
+
"pad_token_id": 0,
|
| 61 |
+
"position_embedding_type": "sans_pos",
|
| 62 |
+
"repad_logits_with_grad": false,
|
| 63 |
+
"rope_parameters": {
|
| 64 |
+
"full_attention": {
|
| 65 |
+
"rope_theta": 160000,
|
| 66 |
+
"rope_type": "default"
|
| 67 |
+
},
|
| 68 |
+
"sliding_attention": {
|
| 69 |
+
"rope_theta": 160000,
|
| 70 |
+
"rope_type": "default"
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
"sep_token_id": 1,
|
| 74 |
+
"sparse_pred_ignore_index": -100,
|
| 75 |
+
"sparse_prediction": false,
|
| 76 |
+
"tie_word_embeddings": true,
|
| 77 |
+
"transformers_version": "5.0.0",
|
| 78 |
+
"vocab_size": 256000
|
| 79 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d53bd673e9cbe0dc31074c3306e8ba85e60825a4b09758914eb4834eb595eb0
|
| 3 |
+
size 643835524
|
rl_agent_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"encoder": "jhu-clsp/mmBERT-base",
|
| 3 |
+
"head_layers": 2,
|
| 4 |
+
"max_len": 512,
|
| 5 |
+
"head_max_len": 128,
|
| 6 |
+
"max_prefixes": 6,
|
| 7 |
+
"act_costs": {
|
| 8 |
+
"escalate": 0.5
|
| 9 |
+
},
|
| 10 |
+
"cost_wrong_act": 3.0,
|
| 11 |
+
"amp_dtype": "bf16",
|
| 12 |
+
"model_name": "requin-security-decision-engine",
|
| 13 |
+
"temperature": [
|
| 14 |
+
1.7374321222305298,
|
| 15 |
+
1.526764988899231,
|
| 16 |
+
1.8045654296875
|
| 17 |
+
],
|
| 18 |
+
"temperature_by_options": {},
|
| 19 |
+
"training": {
|
| 20 |
+
"updates": 15987,
|
| 21 |
+
"epochs_completed": 4,
|
| 22 |
+
"hours": 4.97,
|
| 23 |
+
"world_size": 1,
|
| 24 |
+
"fine_tuned_from_checkpoint": false
|
| 25 |
+
},
|
| 26 |
+
"fine_tuned": true
|
| 27 |
+
}
|
tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
|
| 3 |
+
size 34363188
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"cls_token": "<bos>",
|
| 6 |
+
"eos_token": "<eos>",
|
| 7 |
+
"extra_0": "<start_of_turn>",
|
| 8 |
+
"extra_1": "<end_of_turn>",
|
| 9 |
+
"is_local": true,
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_input_names": [
|
| 12 |
+
"input_ids",
|
| 13 |
+
"attention_mask"
|
| 14 |
+
],
|
| 15 |
+
"model_max_length": 8192,
|
| 16 |
+
"model_specific_special_tokens": {
|
| 17 |
+
"extra_0": "<start_of_turn>",
|
| 18 |
+
"extra_1": "<end_of_turn>"
|
| 19 |
+
},
|
| 20 |
+
"pad_token": "<pad>",
|
| 21 |
+
"padding_side": "right",
|
| 22 |
+
"sep_token": "<eos>",
|
| 23 |
+
"spaces_between_special_tokens": false,
|
| 24 |
+
"tokenizer_class": "TokenizersBackend",
|
| 25 |
+
"unk_token": "<unk>"
|
| 26 |
+
}
|