Run this model with HF Jobs

Run IlyaGusev/rubertconv_toxic_editor on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/IlyaGusev/rubertconv_toxic_editor. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/IlyaGusev/rubertconv_toxic_editor on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("token-classification", model="IlyaGusev/rubertconv_toxic_editor")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("IlyaGusev/rubertconv_toxic_editor")
model = AutoModelForTokenClassification.from_pretrained("IlyaGusev/rubertconv_toxic_editor", device_map="auto")
Quick Links

RuBERTConv Toxic Editor

Model description

Tagging model for detoxification based on rubert-base-cased-conversational.

4 possible classes:

  • Equal = save tokens
  • Replace = replace tokens with mask
  • Delete = remove tokens
  • Insert = insert mask before tokens

Use in pair with mask filler.

Intended uses & limitations

How to use

Colab: link

import torch
from transformers import AutoTokenizer, pipeline

tagger_model_name = "IlyaGusev/rubertconv_toxic_editor"

device = "cuda" if torch.cuda.is_available() else "cpu"
device_num = 0 if device == "cuda" else -1
tagger_pipe = pipeline(
    "token-classification",
    model=tagger_model_name,
    tokenizer=tagger_model_name,
    framework="pt",
    device=device_num,
    aggregation_strategy="max"
)

text = "..."
tagger_predictions = tagger_pipe([text], batch_size=1)
sample_predictions = tagger_predictions[0]
print(sample_predictions)

Training data

Training procedure

Eval results

TBA

Downloads last month
73
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support