OmniDetect-27B
OmniDetect detects hallucinated words in vision-language model responses. Given an image, a question, and an existing response, it predicts a hallucination probability for each annotated word. A shared detector can evaluate responses from different VLMs.
Model
OmniDetect combines a Qwen3.8-27B backbone with LoRA and a linear word classifier. It uses the final-layer hidden state of each word's last subtoken. The classifier maps the 5,120-dimensional representation to a binary hallucination score. Post-training uses word-level supervision and KL distillation.
| Setting | Value |
|---|---|
| LoRA rank / alpha | 16 / 32 |
| Classification head | Linear(5120, 1) + sigmoid |
| Decision threshold | 0.40 |
| Maximum sequence length | 8,192 |
| Maximum image pixels | 1,048,576 |
Usage
Download the adapter and classifier:
from huggingface_hub import snapshot_download
snapshot_download(
"SnowRainsdy/OmniDetect-27B",
local_dir="OmniDetect-27B",
token=True,
)
Use the vlm_methods/omnidetect implementation in the HalluWord code repository. From vlm_methods:
pip install -r omnidetect/requirements.txt
CUDA_VISIBLE_DEVICES=0 python omnidetect/evaluate.py \
--benchmark /path/to/benchmark \
--model-path /path/to/Qwen3.8-27B \
--weights /path/to/OmniDetect-27B \
--output outputs/omnidetect
--benchmark points to the HalluWord evaluation directory containing questions.jsonl, responses.jsonl, and images. The evaluator writes word probabilities and predictions to predictions.jsonl, and F1, Precision, Recall, Accuracy, AUROC, and AP to metrics.json.
Files
adapter_model.safetensors: LoRA parameters and word classification head.adapter_config.json: LoRA configuration.config.json: detector architecture and inference settings.
- Downloads last month
- 2