LettuceDetect ONNX (Base, English)

Pre-exported ONNX files for KRLabsOrg/lettucedect-base-modernbert-en-v1, a ModernBERT-based token classifier that detects hallucinations in RAG answers.

This repo exists so you can use the model without needing Python, torch, or transformers installed. Just download and run with any ONNX Runtime binding.

Files

File Size Description
model.onnx ~2.8 MB ONNX model graph
model.onnx.data ~598 MB Model weights (external data)
tokenizer.json ~3.6 MB HuggingFace tokenizer
tokenizer_config.json ~350 B Tokenizer config

Usage with Arcana (Elixir)

mix arcana.ground.setup

Downloads all files to priv/models/lettucedect/ and configures them for use with Arcana.Agent.ground/2.

How these were exported

from lettucedetect.models.inference import HallucinationDetector
import onnx

detector = HallucinationDetector(
    method="transformer",
    model_path="KRLabsOrg/lettucedect-base-modernbert-en-v1"
)

# export via torch
import torch
torch.onnx.export(detector.model, ..., "model.onnx", opset_version=14)

See scripts/export_lettuce_onnx.py in the Arcana repo for the full export script.

License

MIT, same as the original model.

Citation

@misc{Kovacs:2025,
      title={LettuceDetect: A Hallucination Detection Framework for RAG Applications},
      author={Ádám Kovács and Gábor Recski},
      year={2025},
      eprint={2502.17125},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
}
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

Model tree for georgeguimaraes/lettucedect-onnx

Paper for georgeguimaraes/lettucedect-onnx