Downloads · 30 days
51.2K
3% of all-time downloads
protectai/unbiased-toxic-roberta-onnx
unbiased-toxic-roberta-onnx is a token classification model from protectai. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
[!WARNING] THIS PROJECT HAS BEEN ARCHIVED. This project and its associated code on GitHub are no longer under active development or maintained.
Downloads · 30 days
51.2K
3% of all-time downloads
All-time downloads
1.8M
Public
Repo size
624 MB
Likes
8
Public
Click a slice to open those files.
.onnx624 MB · 99%
From the Hugging Face model README
[!WARNING] THIS PROJECT HAS BEEN ARCHIVED.
This project and its associated code on GitHub are no longer under active development or maintained.
This model is a conversion of unitary/unbiased-toxic-roberta to ONNX format using the 🤗 Optimum library.
Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification.
Built by Laura Hanu at Unitary.
⚠️ Disclaimer: The huggingface models currently give different results to the detoxify library (see issue here).
All challenges have a toxicity label. The toxicity labels represent the aggregate ratings of up to 10 annotators according the following schema:
More information about the labelling schema can be found here.
This challenge includes the following labels:
toxicsevere_toxicobscenethreatinsultidentity_hateThis challenge has 2 types of labels: the main toxicity labels and some additional identity labels that represent the identities mentioned in the comments.
Only identities with more than 500 examples in the test set (combined public and private) are included during training as additional labels and in the evaluation calculation.
toxicitysevere_toxicityobscenethreatinsultidentity_attacksexual_explicitIdentity labels used:
malefemalehomosexual_gay_or_lesbianchristianjewishmuslimblackwhitepsychiatric_or_mental_illnessA complete list of all the identity labels available can be found here.
Loading the model requires the 🤗 Optimum library installed.
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("laiyer/unbiased-toxic-roberta-onnx")
model = ORTModelForSequenceClassification.from_pretrained("laiyer/unbiased-toxic-roberta-onnx")
classifier = pipeline(
task="text-classification",
model=model,
tokenizer=tokenizer,
)
classifier_output = ner("It's not toxic comment")
print(classifier_output)
Join our Slack to give us feedback, connect with the maintainers and fellow users, ask questions, or engage in discussions about LLM security!
<a href="https://join.slack.com/t/laiyerai/shared_invite/zt-28jv3ci39-sVxXrLs3rQdaN3mIl9IT~w"><img src="https://github.com/laiyer-ai/llm-guard/blob/main/docs/assets/join-our-slack-community.png?raw=true" width="200"></a>