Instructions to use flintglass/PrismVerify-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismVerify-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/PrismVerify-9B") 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-9B") model = AutoModelForMultimodalLM.from_pretrained("flintglass/PrismVerify-9B", 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-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismVerify-9B" # 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-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/PrismVerify-9B
- SGLang
How to use flintglass/PrismVerify-9B 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-9B" \ --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-9B", "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-9B" \ --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-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/PrismVerify-9B with Docker Model Runner:
docker model run hf.co/flintglass/PrismVerify-9B
Flintglass PrismVerify-9B
Flintglass PrismVerify-9B is a Pure On-Policy RLVR (PPO-Clipped GRPO) RAG groundedness & hallucination verification judge built on Qwen/Qwen3.5-9B (9.65B params, 262K context, Apache-2.0).
Given a retrieved [CONTEXT] and a candidate [CLAIM], it outputs a strict, 100% schema-valid JSON verdict with a concise, evidence-based justification (~55 tokens, <1s on consumer GPUs):
{"verdict": "CONTRADICTION", "hallucinated": true, "reason": "Context reports Q3 revenue of $42M, whereas the claim states $58M."}
Across 8,857 strictly held-out zero-leakage RAG verification tasks (5 benchmarks), Pure On-Policy GRPO boosts Qwen/Qwen3.5-9B by +9.83 pts on RAGTruth F1 (0.7027 -> 0.8010), +8.98 pts on 5-Benchmark Macro F1 (0.6802 -> 0.7700), and +5.31 pts on out-of-domain Financial QA (FinQA-OOD), improving every single benchmark simultaneouslyβand outperforming 3Γ larger Base Qwen/Qwen3.8-27B on RAGTruth (+4.92 pts), DocNLI, LongRAG-8K, and overall 5-Benchmark Macro F1 (0.7700 vs 0.7559)!
- Quantized GGUFs (
Q4_K_M,Q5_K_M,Q6_K,Q8_0): flintglass/PrismVerify-9B-GGUF - Zero-Leakage Training Dataset (
68.6Krows): flintglass/PrismVerify-Corpus - Fast Encoder Companion (
16 msCPU) & Live Demo: PrismVerify-Large | PrismVerify-Multilingual | Live Demo - Standalone PEFT LoRA (
r=64): Included inlora/alongside full merged BF16 Safetensors.
Strictly Held-Out 5-Benchmark Results (8,857 Tasks)
All evaluations were run 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 F1 |
Base Qwen3.8-27B (3Γ Larger) F1 |
PrismVerify-9B F1 | Delta vs 9B Base | PrismVerify-9B Macro F1 | Valid JSON | Avg Tok |
|---|---|---|---|---|---|---|---|
| RAGTruth Test (2,700) | 0.7027 | 0.7518 | 0.8010 | +9.83% | 0.8447 | 99.96% | 52.9 |
| HaluEval Test (1,500) | 0.7193 | 0.7425 | 0.7359 | +1.66% | 0.7249 | 100.0% | 45.5 |
| DocNLI Test (2,000) | 0.7996 | 0.7995 | 0.8059 | +0.63% | 0.8085 | 100.0% | 54.7 |
| FinQA-OOD (1,657) | 0.2663 | 0.3938 | 0.3194 | +5.31% | 0.5361 | 99.88% | 57.6 |
| LongRAG-8K Bench (1,000) | 0.9339 | 0.9341 | 0.9376 | +0.37% | 0.9360 | 100.0% | 53.8 |
| 5-Benchmark Average | 0.6844 | 0.7243 | 0.7200 | +3.56% | 0.7700 (+8.98% vs 9B, +1.41% vs 27B) | 99.97% | 52.9 |
Why Macro F1 jumped +8.98%: Base
Qwen/Qwen3.5-9Bover-flagged faithful responses onRAGTruthandFinQA-OOD. Pure On-Policy GRPO sharply calibrated both precision and recall across all 5 benchmarks while maintaining~99.9%strict JSON schema validity.
Quickstart
Local Inference (llama.cpp / Ollama β 5.5 GB VRAM!)
llama-server -hf flintglass/PrismVerify-9B-GGUF:Q4_K_M --jinja --ctx-size 32768 --port 8080
Python (transformers)
import json, torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismVerify-9B"
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)
verdict = json.loads(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
print(verdict)
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-9B | PrismVerify-4B | PrismVerify-Large | PrismVerify-Multilingual (Live Demo)
License
Released under Apache-2.0.
- Downloads last month
- 142
docker model run hf.co/flintglass/PrismVerify-9B