KRLabsOrg/lettucedect-v2-qwen-2b
KRLabsOrg/lettucedect-v2-qwen-2b is a 2 billion parameter generative hallucination detection model based on Qwen3.5-2B, fine-tuned to localize and categorize hallucinated spans. It uniquely handles code, tool output, and prose across 14 languages, outperforming larger models and specialized detectors on code-agent tasks. This model provides span-level hallucination detection, returning structured JSON output for unsupported text segments.
Loading preview...
Overview of lettucedect-v2-qwen-2b
lettucedect-v2-qwen-2b is a 2 billion parameter generative model developed by KRLabsOrg, specifically designed for span-level hallucination detection. Unlike traditional token classifiers, this instruction-tuned model identifies and categorizes exact hallucinated text spans within answers, providing structured JSON output. It is built on the Qwen3.5-2B base model and was trained using LoRA supervised fine-tuning.
Key Capabilities & Differentiators
- Unified Hallucination Detection: It localizes and types hallucinated spans across diverse content types, including code, tool output, and prose, in a single pass.
- Multilingual Support: The model is trained on a unified benchmark spanning 14 languages, including English, making it versatile for global applications.
- Superior Performance on Code-Agent Tasks: It significantly outperforms larger models (e.g., 120B and 550B judges) and other off-the-shelf detectors on code-agent answers, achieving a span-F1 of 0.602 and example-F1 of 0.835.
- Competitive Prose Benchmarks: On established prose benchmarks like RAGTruth, it achieves an example-F1 of 0.818, surpassing previous LettuceDetect versions, fine-tuned Llama-2-13B, Luna, and GPT-4. It also performs strongly on PsiloQA across 14 languages.
- Detailed Taxonomy: Hallucinations are classified into 3 categories (contradiction, fabricated_reference, unsupported_addition) and 13 subcategories, providing granular insights.
Usage & Integration
The model outputs a JSON object detailing hallucinated spans, their categories, and subcategories. It can be served with vLLM and integrates with the LettuceDetect package for ease of use. It also supports an explanation variant for per-span reasoning. For production, strict JSON schema enforcement is recommended.