Text Classification
Transformers
Safetensors
Arabic
llama
arabic
guardrail
safety
jailbreak
prompt-injection
content-moderation
text-embeddings-inference
Instructions to use oddadmix/Nawah-Guard-500K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use oddadmix/Nawah-Guard-500K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="oddadmix/Nawah-Guard-500K")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("oddadmix/Nawah-Guard-500K") model = AutoModelForSequenceClassification.from_pretrained("oddadmix/Nawah-Guard-500K", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,418 Bytes
499ff77 | 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 | {
"architectures": [
"LlamaForSequenceClassification"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 0,
"dtype": "float32",
"eos_token_id": 2,
"head_dim": 8,
"hidden_act": "silu",
"hidden_size": 16,
"id2label": {
"0": "hate_harassment",
"1": "jailbreak",
"2": "misinformation",
"3": "nonviolent_crime",
"4": "privacy_pii",
"5": "prompt_injection",
"6": "safe",
"7": "safe_sensitive",
"8": "self_harm",
"9": "sexual_content",
"10": "specialized_advice",
"11": "violent_weapons"
},
"initializer_range": 0.02,
"intermediate_size": 48,
"label2id": {
"hate_harassment": 0,
"jailbreak": 1,
"misinformation": 2,
"nonviolent_crime": 3,
"privacy_pii": 4,
"prompt_injection": 5,
"safe": 6,
"safe_sensitive": 7,
"self_harm": 8,
"sexual_content": 9,
"specialized_advice": 10,
"violent_weapons": 11
},
"max_position_embeddings": 2048,
"mlp_bias": false,
"model_type": "llama",
"num_attention_heads": 2,
"num_hidden_layers": 2,
"num_key_value_heads": 1,
"pad_token_id": 1,
"pretraining_tp": 1,
"problem_type": "single_label_classification",
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 10000,
"rope_type": "default"
},
"tie_word_embeddings": true,
"transformers_version": "5.15.1",
"use_cache": false,
"vocab_size": 32000
}
|