DACTYL AI-Generated Text Detector, ONNX build
All credit for this model goes to the original authors. This repository is only a format conversion (PyTorch to ONNX) for CPU / onnxruntime inference. The weights and behaviour are unchanged from the original model.
Original model, please credit and cite
- DACTYL, AI-Generated Text Detector, by Shantanu Thorat (@ShantanuT01)
- Original model: https://huggingface.co/ShantanuT01/dactyl-ai-text-detector
- Paper: https://arxiv.org/abs/2508.00619
- Code: https://github.com/ShantanuT01/DACTYL
- Base model:
microsoft/deberta-v3-large - License: MIT (this conversion inherits the same license)
DACTYL is a DeBERTa-v3-large classifier fine-tuned with Empirical X-Risk Minimization (EXM) to optimise detection performance at low false-positive rates, with strong out-of-distribution generalisation to unseen models. Please see the original repository and paper for the full description, training data, and results.
What is in this repository
A faithful format conversion, nothing more:
onnx/model.onnx+onnx/model.onnx_data: the ONNX graph and weights (external-data format), exported withtorch.onnxat opset 17.tokenizer.json,tokenizer_config.json,config.json: copied unchanged from the original model.turbochick.json: small runtime metadata (max sequence length).
The model outputs a single logit; apply a sigmoid to obtain the probability that the text is machine-generated. The conversion was validated to match the original PyTorch model to within 1e-5 on a set of sample texts.
Usage (onnxruntime)
import onnxruntime as ort
from tokenizers import Tokenizer
tok = Tokenizer.from_file("tokenizer.json")
sess = ort.InferenceSession("onnx/model.onnx", providers=["CPUExecutionProvider"])
enc = tok.encode("some text to score")
import numpy as np
ids = np.array([enc.ids], dtype=np.int64)
mask = np.array([enc.attention_mask], dtype=np.int64)
logit = sess.run(None, {"input_ids": ids, "attention_mask": mask})[0]
prob_machine = 1 / (1 + np.exp(-logit[0][0]))
License and attribution
MIT, inherited from the original DACTYL model. If you use this conversion, please cite the DACTYL paper (arXiv:2508.00619) and credit the original authors. This repo performs the ONNX conversion only.
- Downloads last month
- 14
Model tree for GabeuxDev/dactyl-ai-text-detector-onnx
Base model
microsoft/deberta-v3-large