Minuva Models
Collection
Fast and light models for conversational data. โข 10 items โข Updated โข 1
Run minuva/MiniLMv2-toxic-jigsaw-lite 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:
Use HF Jobs to fine-tune https://huggingface.co/minuva/MiniLMv2-toxic-jigsaw-lite. 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.
Use HF Jobs to run batch inference with https://huggingface.co/minuva/MiniLMv2-toxic-jigsaw-lite 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 minuva/MiniLMv2-toxic-jigsaw-lite with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="minuva/MiniLMv2-toxic-jigsaw-lite") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("minuva/MiniLMv2-toxic-jigsaw-lite")
model = AutoModelForSequenceClassification.from_pretrained("minuva/MiniLMv2-toxic-jigsaw-lite", device_map="auto")This model is a fined-tuned version of MiniLMv2-L6-H384 on the on the Jigsaw 1st Kaggle competition dataset using unitary/toxic-bert as teacher model. The quantized version in ONNX format can be found here.
The model contains two labels only (toxicity and severe toxicity). For the model with all labels refer to this page
from transformers import pipeline
pipe = pipeline(model='minuva/MiniLMv2-toxic-jigsaw-lite', task='text-classification')
pipe("This is pure trash")
# [{'label': 'toxic', 'score': 0.887}]
The following hyperparameters were used during training:
| Teacher (params) | Student (params) | Set (metric) | Score (teacher) | Score (student) |
|---|---|---|---|---|
| unitary/toxic-bert (110M) | MiniLMv2-toxic-jigsaw-lite (23M) | Test (ROC_AUC) | 0.982677 | 0.9815 |
Check our fast-nlp-text-toxicity repository for a FastAPI and ONNX based server to deploy this model on CPU devices.