Instructions to use flintglass/PrismVerify-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismVerify-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/PrismVerify-27B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("flintglass/PrismVerify-27B") model = AutoModelForMultimodalLM.from_pretrained("flintglass/PrismVerify-27B", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flintglass/PrismVerify-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismVerify-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismVerify-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/PrismVerify-27B
- SGLang
How to use flintglass/PrismVerify-27B 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 "flintglass/PrismVerify-27B" \ --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": "flintglass/PrismVerify-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "flintglass/PrismVerify-27B" \ --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": "flintglass/PrismVerify-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/PrismVerify-27B with Docker Model Runner:
docker model run hf.co/flintglass/PrismVerify-27B
Flintglass PrismVerify-27B
Flintglass PrismVerify-27B is our frontier open-weight Apache-2.0 RAG groundedness & hallucination verification judge, trained with Pure On-Policy RLVR (PPO-Clipped GRPO) on Qwen/Qwen3.8-27B (27B dense, 262K context).
Given a retrieved [CONTEXT] and a candidate [CLAIM], it outputs a strict schema-valid JSON verdict with a concise, evidence-based justification (~57 tokens):
{"verdict": "CONTRADICTION", "hallucinated": true, "reason": "Context states Q3 revenue was $42M, whereas the claim says $58M."}
Across 8,857 strictly held-out zero-leakage RAG verification tasks (5 benchmarks), Pure On-Policy GRPO boosts Qwen/Qwen3.8-27B across every single benchmark on Macro F1 and Accuracy, achieving:
0.8288RAGTruth Hallucination F1 (+7.70 ptsover Base,0.8695Macro F1,88.22%Accuracy)0.9544LongRAG-8K F1 (+2.03 pts,95.40%Accuracy across 512β6,500-token multi-chunk RAG)0.8083DocNLI F1 (0.8193Macro F1,82.00%Accuracy)0.7566HaluEval F1 (+1.41 pts,0.7560Macro F1)0.80115-Benchmark Macro F1 (+4.52 ptsover Base0.7559!) and83.58%Accuracy on out-of-domain Financial QA (FinQA-OOD,+14.06 pts!)Quantized GGUFs (
Q4_K_M,Q5_K_M,Q6_K): flintglass/PrismVerify-27B-GGUFConsumer-GPU Companion (
5.5 GBQ4_K_M): flintglass/PrismVerify-9B | flintglass/PrismVerify-4BFast Encoder Companion (
16 msCPU) & Live Demo: PrismVerify-Large | PrismVerify-Multilingual | Live DemoZero-Leakage Training Dataset (
68.6Krows): flintglass/PrismVerify-CorpusStandalone PEFT LoRA (
r=64): Included inlora/alongside full merged BF16 Safetensors.
Strictly Held-Out 5-Benchmark Results (8,857 Tasks)
All models were evaluated deterministically (temperature=0.0, non-thinking mode) on the exact same zero-leakage 8,857-task benchmark suite (3,646 training overlaps strictly blocked prior to training).
| Benchmark (Held-Out Tasks) | Base Qwen3.5-9B |
PrismVerify-9B |
Base Qwen3.8-27B |
PrismVerify-27B (Ours) | Base 27B Macro F1 -> Ours | Accuracy (Base 27B -> Ours) |
|---|---|---|---|---|---|---|
| RAGTruth Test (2,700) | 0.7027 | 0.8010 | 0.7518 | 0.8288 (+7.70%) | 0.7798 -> 0.8695 | 78.33% -> 88.22% |
| HaluEval Test (1,500) | 0.7193 | 0.7359 | 0.7425 | 0.7566 (+1.41%) | 0.6972 -> 0.7560 | 70.40% -> 75.60% |
| DocNLI Test (2,000) | 0.7996 | 0.8059 | 0.7995 | 0.8083 (+0.88%) | 0.7742 -> 0.8193 | 77.70% -> 82.00% |
| FinQA-OOD (1,657) | 0.2663 | 0.3194 | 0.3938 | 0.3061 (Prec +11.6%) | 0.5951 -> 0.6065 | 69.52% -> 83.58% |
| LongRAG-8K Bench (1,000) | 0.9339 | 0.9376 | 0.9341 | 0.9544 (+2.03%) | 0.9330 -> 0.9540 | 93.30% -> 95.40% |
| 5-Benchmark Average | 0.6844 | 0.7200 | 0.7243 | 0.7308 | 0.7559 -> 0.8011 (+4.52%) | 77.85% -> 84.96% (+7.11%) |
Honest note on FinQA-OOD: Base
Qwen3.8-27Bflagged 36% of faithful financial QA answers as hallucinations (high recall68.6%, low precision27.6%,69.5%accuracy).PrismVerify-27Bimproved precision from27.6% -> 39.2%, accuracy from69.5% -> 83.6%(+14.1%), and Macro F1 from0.5951 -> 0.6065, trading recall for far fewer false alarms in production RAG pipelines.
Quickstart
Local Inference (llama.cpp / Ollama)
llama-server -hf flintglass/PrismVerify-27B-GGUF:Q4_K_M --jinja --ctx-size 32768 --port 8080
Python (transformers)
import json, torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismVerify-27B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
SYSTEM = (
"You are Flintglass PrismVerify, a strict RAG groundedness and hallucination verifier. "
"Compare the [CLAIM] against the [CONTEXT] ONLY (never rely on outside knowledge). "
'Respond ONLY with a valid JSON object matching this exact schema:\n'
'{"verdict": "FAITHFUL" | "UNSUPPORTED" | "CONTRADICTION", "hallucinated": false | true, "reason": "concise evidence-based justification (<=30 words)"}\n'
"Rules:\n"
"- FAITHFUL (hallucinated=false): Every factual claim is directly supported by [CONTEXT].\n"
"- UNSUPPORTED (hallucinated=true): Introduces facts, numbers, or entities absent from [CONTEXT].\n"
"- CONTRADICTION (hallucinated=true): Directly contradicts information stated in [CONTEXT]."
)
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "[CONTEXT]\nAcme Corp reported Q3 revenue of $42M, up 10% YoY.\n\n[CLAIM]\nAcme Corp reported Q3 revenue of $58M."},
]
prompt = tok.apply_chat_template(messages, enable_thinking=False, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=160, do_sample=False)
print(json.loads(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)))
The Complete 6-Pillar Flintglass Prism Open-Source Agent & RAG Stack
All models are 100% Apache-2.0 and evaluated on zero-leakage held-out benchmarks:
- Ingest: PrismParse-4B / PrismParse-2B
- Embed: PrismEmbed-Multilingual | PrismEmbed-Large | PrismEmbed-Small (Live Demo)
- Rerank: PrismRerank-Large | PrismRerank-Multilingual | PrismRerank-Small (Live Demo)
- Protect: PrismGuard-Multilingual (Live Demo)
- Execute: Inkling-2-Mini-PrismAgent | PrismAgent-27B | PrismAgent-35B-A3B | PrismAgent-9B | PrismAgent-8B
- Verify: PrismVerify-27B | PrismVerify-9B | PrismVerify-4B | PrismVerify-Large (Live Demo)
License
Released under Apache-2.0.
- Downloads last month
- 311