Instructions to use unitary/multilingual-toxic-xlm-roberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unitary/multilingual-toxic-xlm-roberta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="unitary/multilingual-toxic-xlm-roberta")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("unitary/multilingual-toxic-xlm-roberta") model = AutoModelForSequenceClassification.from_pretrained("unitary/multilingual-toxic-xlm-roberta", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +2 -3
config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "None",
|
| 3 |
"architectures": [
|
| 4 |
"XLMRobertaForSequenceClassification"
|
| 5 |
],
|
|
@@ -11,12 +10,12 @@
|
|
| 11 |
"hidden_dropout_prob": 0.1,
|
| 12 |
"hidden_size": 768,
|
| 13 |
"id2label": {
|
| 14 |
-
"0": "
|
| 15 |
},
|
| 16 |
"initializer_range": 0.02,
|
| 17 |
"intermediate_size": 3072,
|
| 18 |
"label2id": {
|
| 19 |
-
"
|
| 20 |
},
|
| 21 |
"layer_norm_eps": 1e-05,
|
| 22 |
"max_position_embeddings": 514,
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"XLMRobertaForSequenceClassification"
|
| 4 |
],
|
|
|
|
| 10 |
"hidden_dropout_prob": 0.1,
|
| 11 |
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
+
"0": "toxic"
|
| 14 |
},
|
| 15 |
"initializer_range": 0.02,
|
| 16 |
"intermediate_size": 3072,
|
| 17 |
"label2id": {
|
| 18 |
+
"toxic": 0
|
| 19 |
},
|
| 20 |
"layer_norm_eps": 1e-05,
|
| 21 |
"max_position_embeddings": 514,
|