Downloads · 30 days
20
19% of all-time downloads
GabeuxDev/dactyl-ai-text-detector-onnx
dactyl-ai-text-detector-onnx is a text classification model from GabeuxDev. Use it when you need a label for a piece of text. It is set up for onnx. The card lists the license as mit.
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.
Downloads · 30 days
20
19% of all-time downloads
All-time downloads
105
Public
Repo size
1.7 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data1.7 GB · 99%
From the Hugging Face model README
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.
microsoft/deberta-v3-largeDACTYL 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.
A faithful format conversion, nothing more:
onnx/model.onnx + onnx/model.onnx_data: the ONNX graph and weights
(external-data format), exported with torch.onnx at 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.
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]))
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.