Text Classification
Transformers
ONNX
Safetensors
llama
safety
content-moderation
multi-label
multilingual
tiny-language-model
from-scratch
distilled
text-embeddings-inference
Instructions to use KucLab/Censer.9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.9")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.9") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.9", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from KucLab/Censer.9: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/KucLab/Censer.9/resolve/main/config.json
- Command line
-
hf download hf://KucLab/Censer.9/config.json
-
curl -L -o config.json https://huggingface.co/KucLab/Censer.9/resolve/main/config.json
2.27 kB
| { | |
| "architectures": [ | |
| "LlamaForSequenceClassification" | |
| ], | |
| "model_type": "llama", | |
| "num_labels": 12, | |
| "id2label": { | |
| "0": "safe", | |
| "1": "unsafe", | |
| "2": "violence", | |
| "3": "weapons_explosives", | |
| "4": "drugs", | |
| "5": "hate_harassment", | |
| "6": "sexual_abuse", | |
| "7": "self_harm", | |
| "8": "cybercrime_fraud", | |
| "9": "jailbreak_injection", | |
| "10": "illegal_marketplace", | |
| "11": "other_unsafe" | |
| }, | |
| "label2id": { | |
| "safe": 0, | |
| "unsafe": 1, | |
| "violence": 2, | |
| "weapons_explosives": 3, | |
| "drugs": 4, | |
| "hate_harassment": 5, | |
| "sexual_abuse": 6, | |
| "self_harm": 7, | |
| "cybercrime_fraud": 8, | |
| "jailbreak_injection": 9, | |
| "illegal_marketplace": 10, | |
| "other_unsafe": 11 | |
| }, | |
| "problem_type": "multi_label_classification", | |
| "vocab_size": 2048, | |
| "hidden_size": 128, | |
| "intermediate_size": 384, | |
| "num_hidden_layers": 3, | |
| "num_attention_heads": 4, | |
| "num_key_value_heads": 4, | |
| "head_dim": 32, | |
| "max_position_embeddings": 4096, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_type": "linear", | |
| "factor": 8.0, | |
| "rope_theta": 10000.0 | |
| }, | |
| "attention_bias": false, | |
| "mlp_bias": false, | |
| "tie_word_embeddings": true, | |
| "pad_token_id": 0, | |
| "bos_token_id": 1, | |
| "eos_token_id": 3, | |
| "name": "Censer.9", | |
| "max_chars": 4000, | |
| "answer_ids": [ | |
| 19, | |
| 20, | |
| 68, | |
| 69, | |
| 70, | |
| 71, | |
| 72, | |
| 73, | |
| 74, | |
| 75, | |
| 76, | |
| 77 | |
| ], | |
| "special_tokens": [ | |
| "[PAD]", | |
| "[BOS]", | |
| "[USER]", | |
| "[ASSISTANT]" | |
| ], | |
| "threshold": 0.5, | |
| "cat_thresholds": { | |
| "violence": 0.59, | |
| "weapons_explosives": 0.48, | |
| "drugs": 0.38, | |
| "hate_harassment": 0.2, | |
| "sexual_abuse": 0.36, | |
| "self_harm": 0.2, | |
| "cybercrime_fraud": 0.28, | |
| "jailbreak_injection": 0.3, | |
| "illegal_marketplace": 0.21, | |
| "other_unsafe": 0.26 | |
| }, | |
| "temperature": 0.7130213677881275, | |
| "must_catch_override": { | |
| "self_harm": 0.3, | |
| "sexual_abuse": 0.3 | |
| }, | |
| "cat_experimental": [ | |
| "violence", | |
| "weapons_explosives", | |
| "drugs", | |
| "sexual_abuse", | |
| "self_harm", | |
| "cybercrime_fraud", | |
| "jailbreak_injection", | |
| "illegal_marketplace" | |
| ], | |
| "lang_thresholds": { | |
| "default": 0.5, | |
| "de": 0.92, | |
| "en": 0.79, | |
| "es": 0.5, | |
| "fr": 0.89, | |
| "hin": 0.87, | |
| "it": 0.9 | |
| } | |
| } |