Text Classification
Transformers
Safetensors
English
distilbert
multi-label
toxic-comments
text-embeddings-inference
Instructions to use JD1714/ToxicityClassifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JD1714/ToxicityClassifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="JD1714/ToxicityClassifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("JD1714/ToxicityClassifier") model = AutoModelForSequenceClassification.from_pretrained("JD1714/ToxicityClassifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from JD1714/ToxicityClassifier: direct link, hf CLI and curl.
- Browser
- Download file 945 Bytes
-
https://huggingface.co/JD1714/ToxicityClassifier/resolve/main/config.json
- Command line
-
hf download hf://JD1714/ToxicityClassifier/config.json
-
curl -L -o config.json https://huggingface.co/JD1714/ToxicityClassifier/resolve/main/config.json
945 Bytes
| { | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForSequenceClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "bos_token_id": null, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "toxic", | |
| "1": "severe_toxic", | |
| "2": "obscene", | |
| "3": "threat", | |
| "4": "insult", | |
| "5": "identity_hate" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "identity_hate": 5, | |
| "insult": 4, | |
| "obscene": 2, | |
| "severe_toxic": 1, | |
| "threat": 3, | |
| "toxic": 0 | |
| }, | |
| "max_position_embeddings": 512, | |
| "model_type": "distilbert", | |
| "n_heads": 12, | |
| "n_layers": 6, | |
| "pad_token_id": 0, | |
| "problem_type": "multi_label_classification", | |
| "qa_dropout": 0.1, | |
| "seq_classif_dropout": 0.2, | |
| "sinusoidal_pos_embds": false, | |
| "tie_weights_": true, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.20.1", | |
| "use_cache": false, | |
| "vocab_size": 30522 | |
| } | |