Downloads · 30 days
8
8% of all-time downloads
zonn-ai/modernbert-ai-detection-raid-mage-ONNX
modernbert-ai-detection-raid-mage-ONNX is a text classification model from zonn-ai. Use it when you need a label for a piece of text. It is set up for transformers.js. The card lists the license as apache-2.0.
This is an ONNX version of GeorgeDrayson/modernbert-ai-detection-raid-mage. It was automatically converted and uploaded using this Hugging Face Space.
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
96
Public
Repo size
1.8 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.9 GB · 100%
From the Hugging Face model README
This is an ONNX version of GeorgeDrayson/modernbert-ai-detection-raid-mage. It was automatically converted and uploaded using this Hugging Face Space.
See the pipeline documentation for text-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextClassificationPipeline
This model is part of the research presented in the paper Machine-generated text detection prevents language model collapse, which proposes an approach to prevent model collapse based on importance sampling from a machine-generated text detector. The official implementation and training scripts are available in the GitHub repository: GeorgeDrayson/model_collapse
The model is trained on the MAGE and RAID datasets.
To use the model for detecting machine-generated text:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("GeorgeDrayson/modernbert-raid-mage")
model = AutoModelForSequenceClassification.from_pretrained("GeorgeDrayson/modernbert-raid-mage")
text = "Your input text here."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
print(f"Probability of machine-generated text: {probabilities[0][1].item():.4f}")
If you use this model or find the research helpful, please cite:
@article{drayson2025machine,
title={Machine-generated text detection prevents language model collapse},
author={Drayson, George and Yilmaz, Emine and Lampos, Vasileios},
journal={arXiv preprint arXiv:2502.15654},
year={2025}
}