DISTILLSEQ - MISTRAL - Regression

Toxicity prediction model trained on the MISTRAL dataset.

Property Value
Model DISTILLSEQ
Task Regression
Dataset mistral
Framework PyTorch / PyTorch Lightning

Model Information

See the ToxicThesis repository for model class documentation.

Usage

from huggingface_hub import hf_hub_download
import torch

checkpoint_path = hf_hub_download(
    repo_id="simocorbo/toxicthesis-mistral-distillseq-regression",
    filename="checkpoints/best.pt"
)

checkpoint = torch.load(checkpoint_path, map_location='cpu', weights_only=False)
print("Checkpoint keys:", checkpoint.keys())

# See ToxicThesis repository for model implementation
# git clone https://github.com/simo-corbo/ToxicThesis

Score Interpretation

Output Range Meaning
score [0, 1] Continuous toxicity score. Higher = more toxic.

Thresholding: Use score >= 0.5 for binary toxic/non-toxic decision.

Files

File Description
checkpoints/best.pt Model checkpoint (best validation loss)
hparams.yaml Hyperparameters used for training
train.csv Training metrics per epoch
val.csv Validation metrics per epoch
vocab_stanza_hybrid.pkl Vocabulary (for tree-based models)

Installation

# Clone ToxicThesis for full model implementations
git clone https://github.com/simo-corbo/ToxicThesis
cd ToxicThesis
pip install -r requirements.txt

# Or install dependencies directly
pip install torch transformers huggingface_hub fasttext-wheel stanza

Citation

@software{toxicthesis2025,
  title={ToxicThesis},
  author={Corbo, Simone},
  year={2025},
  url={https://github.com/simo-corbo/ToxicThesis}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support