Text Classification
Transformers.js
ONNX
English
distilbert
content-moderation
comment-moderation
text-moderation
Instructions to use onnx-community/Comment-Moderation-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/Comment-Moderation-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'onnx-community/Comment-Moderation-ONNX');
Download config.json from onnx-community/Comment-Moderation-ONNX: direct link, hf CLI and curl.
- Browser
- Download file 848 Bytes
-
https://huggingface.co/onnx-community/Comment-Moderation-ONNX/resolve/main/config.json
- Command line
-
hf download hf://onnx-community/Comment-Moderation-ONNX/config.json
-
curl -L -o config.json https://huggingface.co/onnx-community/Comment-Moderation-ONNX/resolve/main/config.json
848 Bytes
| { | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForSequenceClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "S", | |
| "1": "H", | |
| "2": "V", | |
| "3": "HR", | |
| "4": "SH", | |
| "5": "S3", | |
| "6": "H2", | |
| "7": "V2", | |
| "8": "OK" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "H": 1, | |
| "H2": 6, | |
| "HR": 3, | |
| "OK": 8, | |
| "S": 0, | |
| "S3": 5, | |
| "SH": 4, | |
| "V": 2, | |
| "V2": 7 | |
| }, | |
| "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, | |
| "transformers_version": "4.57.6", | |
| "vocab_size": 30522 | |
| } | |