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
File size: 453 Bytes
115e6b1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | {
"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>"
}
|