toxic-bert text toxicity classifier (6 labels)

Browser-ready import artifacts for text-classification, produced by SkillSafe's reproducible converter (models/ in skillsafe.ai) from a pinned upstream source. Every byte here is derivable from that source plus the recipe below; nothing was edited by hand.

Provenance

Upstream https://huggingface.co/Xenova/toxic-bert/tree/65cbc2607cb7fad64f98d1e8a5a3d1f8577895fd
Upstream SHA-256 / commit 65cbc2607cb7fad64f98d1e8a5a3d1f8577895fd
Recipe recipes/toxic-bert.yaml โ€” sha256 733756f7d1c1e0a88e272dc1d43d245a48f80f489b1768e8c27672a10ca6198d
Toolchain Python 3.12.13, torch 2.10.0, onnx 1.23.0, onnxruntime 1.30.0 on Darwin 25.6.0 arm64
Converted 2026-09-22T20:38:30+00:00

Files

file class size SHA-256
config.json bundle 0.00 MB e2c6937717530ce48ea753182c5558c8b285a0e1dd7824759d63a81adce28447
onnx/model.onnx registry 417.91 MB a092927576be0a4884f791415fd375a702c09f1f10411295c56728404a5ff3e2
onnx/model_quantized.onnx registry 105.59 MB 620012c9bed13e3c58b9c959d160d955ff033a1a27528212b9da5b0aa4ac3f73
special_tokens_map.json bundle 0.00 MB b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3
tokenizer.json bundle 0.68 MB d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66
tokenizer_config.json bundle 0.00 MB 9261e7d79b44c8195c1cada2b453e55b00aeb81e907a6664974b4d7776172ab3
vocab.txt bundle 0.22 MB 07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3

registry files are parameter files served from models.skillsafe.ai once vetted; bundle files ship inside an app; registry-shared is a runtime library reused by every model of the same architecture.

Verification

Imported as published upstream (no conversion). Each file is pinned by SHA-256 to its source; every ONNX file passed onnx.checker and a CPU smoke run under onnxruntime with zero-filled inputs at the declared shapes:

file inputs outputs ms
onnx/model.onnx input_ids[1, 8], attention_mask[1, 8], token_type_ids[1, 8] logits[1, 6] 4.4
onnx/model_quantized.onnx input_ids[1, 8], attention_mask[1, 8], token_type_ids[1, 8] logits[1, 6] 3.1

Use in the browser

import * as ort from "onnxruntime-web";
const session = await ort.InferenceSession.create("https://huggingface.co/skillsafe-ai/toxic-bert/resolve/main/onnx/model.onnx", { executionProviders: ["webgpu", "wasm"] });

Contract (onnx/model.onnx): input input_ids int64 ['batch_size', 'sequence_length'], attention_mask int64 ['batch_size', 'sequence_length'], token_type_ids int64 ['batch_size', 'sequence_length'] โ†’ output logits float32 ['batch_size', 6]. Opset 11.

Licence and attribution

toxic-bert: Unitary (Detoxify), Apache License 2.0. https://github.com/unitaryai/detoxify โ€” ONNX export by Xenova (https://huggingface.co/Xenova/toxic-bert).

Licence: Apache-2.0 โ€” notice: https://github.com/unitaryai/detoxify/blob/master/LICENSE. The conversion recipe and this model card are part of the SkillSafe repository and carry its licence; the weights remain under the upstream licence above.

The full manifest.json in this repo records the recipe, sources, toolchain (including the uv.lock hash) and per-file verification numbers.

Downloads last month
97
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for skillsafe-ai/toxic-bert

Quantized
(1)
this model