PrismVerify-4B
local model for hallucination detection in RAG
2 min readupdated
The model by Flintglass Labs based on Qwen/Qwen3-4B-Instruct-2507 is built for fact-checking in retrieval-augmented generation (RAG) systems. It outputs structured JSON with step-by-step logical reasoning, exact quotes of unsupported fragments, error classification, and a final verdict. The new model is trained using a two-stage pipeline (SFT and RLVR-DPO) and outperforms the base version and alternatives on key metrics. It will be useful for RAG pipeline developers who value strict accuracy and local response verification.
Key features
- High accuracy: Outperforms the base model and alternatives on RAGTruth and DocNLI benchmarks.
- Two-stage training: Full-size SFT and RLVR-DPO (direct preference optimization with verification).
- Production ready: GGUF quantizations are available with low memory consumption (~2.4 GB VRAM).
- Strict JSON format: Ensures near 100% schema compliance and high citation accuracy.
What you can do
- RAG integration: Connect the model as a judge to filter out hallucinations before sending responses to the user.
- Response auditing: Use it for automated detection of contradictions and inaccuracies in corporate knowledge bases.
- Local deployment: Run the model via
vllm,transformers, or as a GGUF version to save resources.
Example
import json, torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismVerify-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
print(f"Модель {model_id} успешно загружена!")Read more
Details• Metrics: 0.821 F1 on RAGTruth-Test, 0.739 F1 on DocNLI-Test, and 0.955 F1 on LongRAG-8K.
• Requirements: ~2.4 GB VRAM/RAM for Q4_K_M quantization.
• Features: Apache 2.0 license, support for long context up to 6,500 tokens.
• Details: Trained on 21,603 verification examples and fine-tuned via On-Policy DPO.










Comments