Instructions to use Xenova/toxic-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/toxic-bert with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'Xenova/toxic-bert');
Download quantize_config.json from Xenova/toxic-bert: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/Xenova/toxic-bert/resolve/main/quantize_config.json
- Command line
-
hf download hf://Xenova/toxic-bert/quantize_config.json
-
curl -L -o quantize_config.json https://huggingface.co/Xenova/toxic-bert/resolve/main/quantize_config.json
722 Bytes
| { | |
| "per_channel": true, | |
| "reduce_range": true, | |
| "per_model_config": { | |
| "model": { | |
| "op_types": [ | |
| "Reshape", | |
| "Slice", | |
| "Sqrt", | |
| "Unsqueeze", | |
| "Gather", | |
| "ReduceMean", | |
| "Concat", | |
| "Gemm", | |
| "Constant", | |
| "Pow", | |
| "Erf", | |
| "Add", | |
| "Transpose", | |
| "Shape", | |
| "Sub", | |
| "MatMul", | |
| "Softmax", | |
| "Cast", | |
| "Tanh", | |
| "Div", | |
| "Mul" | |
| ], | |
| "weight_type": "QInt8" | |
| } | |
| } | |
| } |