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
Download config.json from oddadmix/Nawah-Guard-500K: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/oddadmix/Nawah-Guard-500K/resolve/main/config.json
- Command line
-
hf download hf://oddadmix/Nawah-Guard-500K/config.json
-
curl -L -o config.json https://huggingface.co/oddadmix/Nawah-Guard-500K/resolve/main/config.json
1.42 kB
| { | |
| "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 | |
| } | |