Text Classification
Transformers
Safetensors
English
llama
safety
content-moderation
tiny-language-model
from-scratch
text-embeddings-inference
Instructions to use KucLab/Censer.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Censer.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Censer.1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Censer.1") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Censer.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload Censer.1
Browse files
README.md
CHANGED
|
@@ -26,6 +26,27 @@ metrics:
|
|
| 26 |
A 1.1M parameter decoder-only transformer trained **from scratch** that classifies
|
| 27 |
English text as unsafe (`1`) or safe (`0`).
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
It is not a fine-tuned encoder and not an API wrapper. It is a small transformer
|
| 30 |
trained on safety-labelled data, with a custom byte-level BPE tokenizer. The model
|
| 31 |
predicts a single answer token and never generates free text.
|
|
|
|
| 26 |
A 1.1M parameter decoder-only transformer trained **from scratch** that classifies
|
| 27 |
English text as unsafe (`1`) or safe (`0`).
|
| 28 |
|
| 29 |
+
## Download
|
| 30 |
+
|
| 31 |
+
The whole model is `model.safetensors` (4.5 MB). Grab the files directly:
|
| 32 |
+
|
| 33 |
+
| File | Download |
|
| 34 |
+
| --- | --- |
|
| 35 |
+
| **model.safetensors** | [download](https://huggingface.co/KucLab/Censer.1/resolve/main/model.safetensors?download=true) |
|
| 36 |
+
| config.json | [download](https://huggingface.co/KucLab/Censer.1/resolve/main/config.json?download=true) |
|
| 37 |
+
| tokenizer.json | [download](https://huggingface.co/KucLab/Censer.1/resolve/main/tokenizer.json?download=true) |
|
| 38 |
+
| censer.py | [download](https://huggingface.co/KucLab/Censer.1/resolve/main/censer.py?download=true) |
|
| 39 |
+
|
| 40 |
+
Or fetch everything at once:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
pip install -U huggingface_hub
|
| 44 |
+
hf download KucLab/Censer.1 --local-dir Censer.1
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
A single file (`README.md`, `config.json`, ...) can also be downloaded from the
|
| 48 |
+
**Files and versions** tab, using the download icon on its row.
|
| 49 |
+
|
| 50 |
It is not a fine-tuned encoder and not an API wrapper. It is a small transformer
|
| 51 |
trained on safety-labelled data, with a custom byte-level BPE tokenizer. The model
|
| 52 |
predicts a single answer token and never generates free text.
|