Text Classification
Transformers
Safetensors
English
llama
safety
content-moderation
tiny-language-model
from-scratch
text-embeddings-inference
Instructions to use KucLab/Censer.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.2") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from KucLab/Censer.2: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/KucLab/Censer.2/resolve/main/config.json
- Command line
-
hf download hf://KucLab/Censer.2/config.json
-
curl -L -o config.json https://huggingface.co/KucLab/Censer.2/resolve/main/config.json
858 Bytes
| { | |
| "architectures": [ | |
| "LlamaForSequenceClassification" | |
| ], | |
| "model_type": "llama", | |
| "num_labels": 2, | |
| "id2label": { | |
| "0": "safe", | |
| "1": "unsafe" | |
| }, | |
| "label2id": { | |
| "safe": 0, | |
| "unsafe": 1 | |
| }, | |
| "vocab_size": 4096, | |
| "hidden_size": 256, | |
| "intermediate_size": 1024, | |
| "num_hidden_layers": 6, | |
| "num_attention_heads": 8, | |
| "num_key_value_heads": 8, | |
| "head_dim": 32, | |
| "max_position_embeddings": 256, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_type": "default", | |
| "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.2", | |
| "max_chars": 500, | |
| "answer_ids": [ | |
| 19, | |
| 20 | |
| ], | |
| "special_tokens": [ | |
| "[PAD]", | |
| "[BOS]", | |
| "[USER]", | |
| "[ASSISTANT]" | |
| ], | |
| "threshold": 0.5 | |
| } |