Text Classification
Transformers
ONNX
Safetensors
Transformers.js
modernbert
abacusai
toxicity
content-moderation
trust-and-safety
perspective-api
hate-speech
multi-label-classification
text-embeddings-inference
Instructions to use abacusai/Toxicity-Lens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abacusai/Toxicity-Lens with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="abacusai/Toxicity-Lens")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("abacusai/Toxicity-Lens") model = AutoModelForSequenceClassification.from_pretrained("abacusai/Toxicity-Lens", device_map="auto") - Transformers.js
How to use abacusai/Toxicity-Lens with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'abacusai/Toxicity-Lens'); - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from abacusai/Toxicity-Lens: direct link, hf CLI and curl.
- Browser
- Download file 453 Bytes
-
https://huggingface.co/abacusai/Toxicity-Lens/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://abacusai/Toxicity-Lens/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/abacusai/Toxicity-Lens/resolve/main/tokenizer_config.json
453 Bytes
| { | |
| "backend": "tokenizers", | |
| "bos_token": "<bos>", | |
| "clean_up_tokenization_spaces": false, | |
| "cls_token": "<bos>", | |
| "eos_token": "<eos>", | |
| "mask_token": "<mask>", | |
| "model_input_names": [ | |
| "input_ids", | |
| "attention_mask" | |
| ], | |
| "model_max_length": 256, | |
| "pad_token": "<pad>", | |
| "padding_side": "right", | |
| "sep_token": "<eos>", | |
| "spaces_between_special_tokens": false, | |
| "tokenizer_class": "PreTrainedTokenizerFast", | |
| "unk_token": "<unk>" | |
| } | |