Instructions to use wkinglin/HalluScope-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wkinglin/HalluScope-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="wkinglin/HalluScope-8B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("wkinglin/HalluScope-8B") model = AutoModelForMultimodalLM.from_pretrained("wkinglin/HalluScope-8B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wkinglin/HalluScope-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wkinglin/HalluScope-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wkinglin/HalluScope-8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/wkinglin/HalluScope-8B
- SGLang
How to use wkinglin/HalluScope-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "wkinglin/HalluScope-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wkinglin/HalluScope-8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "wkinglin/HalluScope-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wkinglin/HalluScope-8B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use wkinglin/HalluScope-8B with Docker Model Runner:
docker model run hf.co/wkinglin/HalluScope-8B
HalluScope-8B
HalluScope-8B is a diagnostic model for fine-grained hallucination diagnosis in multimodal large language models (MLLMs). Given an image and a model-generated response, it detects hallucinated spans, classifies each into one of 12 fine-grained types, and returns span-level annotations in a single pass. It is the larger, higher-accuracy variant of the HalluScope family.
- Base model: Qwen3-VL-8B-Instruct
- Training data: HalluScope-30K
- Task: span-level hallucination detection + classification
Output Format
The model wraps hallucinated spans with typed <hallucination> tags:
<Tagged_Text>
The <hallucination type="Color_Attribute">bright red</hallucination>
<hallucination type="Object">sports</hallucination> car is
<hallucination type="Spatial_Attribute">parked near a lake</hallucination>.
</Tagged_Text>
Hallucination Taxonomy
12 fine-grained types across two categories:
| Category | Types |
|---|---|
| Perception | Object, OCR, Numerical_Attribute, Color_Attribute, Shape_Attribute, Spatial_Attribute |
| Reasoning | Logical_Error, Calculation_Error, Knowledge_Error, Query_Misunderstanding, Numerical_Relation, Spatial_Relation |
Usage
from transformers import AutoModelForImageTextToText, AutoProcessor
from PIL import Image
model = AutoModelForImageTextToText.from_pretrained(
"wkinglin/HalluScope-8B", torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained("wkinglin/HalluScope-8B")
messages = [{
"role": "user",
"content": [
{"type": "image", "image": Image.open("example.jpg")},
{"type": "text", "text": "Analyze the response and tag hallucinated spans:\n<response to diagnose>"},
],
}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt",
).to(model.device)
out = model.generate(**inputs, max_new_tokens=2048)
print(processor.batch_decode(out, skip_special_tokens=True)[0])
For high-throughput inference, serve the model with vLLM and query it through the OpenAI-compatible API.
Related
- HalluScope-4B — the lightweight variant: wkinglin/HalluScope-4B
- Dataset — wkinglin/HalluScope-30K
Citation
@inproceedings{jin2026halluscope,
title = {HalluScope: Fine-grained Hallucination Diagnosis for Multimodal Large Language Models},
author = {Jin, Weilin and Wang, Mingyu and Li, Wenbo and Huang, Haoyang and Wu, Yifan and Li, Ying and Huang, Gang and Wu, Zhonghai},
booktitle = {Proceedings of the 34th ACM International Conference on Multimedia (MM '26)},
year = {2026}
}
- Downloads last month
- 16