Instructions to use flintglass/PrismParse-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismParse-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="flintglass/PrismParse-8B")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("flintglass/PrismParse-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flintglass/PrismParse-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismParse-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismParse-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flintglass/PrismParse-8B
- SGLang
How to use flintglass/PrismParse-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 "flintglass/PrismParse-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismParse-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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/PrismParse-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismParse-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flintglass/PrismParse-8B with Docker Model Runner:
docker model run hf.co/flintglass/PrismParse-8B
Flintglass PrismParse-8B
Full-Parameter Fine-Tuned Qwen/Qwen3-VL-8B-Instruct Document, Table, Receipt, Invoice & Math OCR VLM — trained via Full-Parameter BF16 ZeRO-1 DDP on Apache-2.0 Qwen/Qwen3-VL-8B-Instruct across our strictly permissive 43,895-sample 6-domain structured document parsing corpus.
Delivers a massive +38.05 pt jump across 5 strictly held-out document benchmarks (2,244 images):
- 5-Benchmark Average:
52.51%->90.56%(+38.05 pts!) - CORD Receipts Strict JSON Extraction (100 images):
3.22%->90.19%Field F1 (+86.97 pts,100.0%Valid JSON,47.0%Exact JSON!) - Complex Invoice Strict JSON Extraction (76 images):
2.97%->90.70%Field F1 (+87.73 pts,100.0%Valid JSON!) - PubTabNet HTML Table Parsing (500 images):
76.42%->85.37%Cell F1 (+8.95 pts) ·93.09%HTML 1-NED (+20.09 pts!) - LaTeX Formula OCR (568 printed + handwritten images):
86.36%->94.95%1-NED (+8.59 pts, Exact Match doubled27.64% -> 56.51%, Handwritten Exact66.18%!) - DocVQA (1,000 images):
91.60%ANLS (85.3%Exact Match)
Part of the Flintglass Prism Open-Source Agent & RAG Stack · Complete PrismParse Family:
PrismParse-2B(88.44%) ·PrismParse-4B(90.05%) ·PrismParse-8B(90.56%,Qwen3-VL) ·PrismParse-9B(91.16%) · GGUF Quantizations:flintglass/PrismParse-8B-GGUF(Q4_K_M,Q6_K,Q8_0+mmproj-F16)
Verified 5-Benchmark Document Parsing Leaderboard (2,244 Held-Out Images)
Evaluated deterministically (do_sample=False) across 5 strictly held-out benchmarks (zero overlap with training images):
| Model | Base | CORD Receipts (Field F1) | Invoices (Field F1) | PubTabNet Tables (Cell F1 / 1-NED) | LaTeX OCR (1-NED / Exact) | DocVQA (ANLS) | 5-Bench Avg |
|---|---|---|---|---|---|---|---|
Qwen/Qwen3-VL-8B-Instruct (Base) |
Qwen3-VL-8B | 3.22% | 2.97% | 76.42% / 73.00% | 86.36% / 27.64% | 93.56% | 52.51% |
flintglass/PrismParse-8B |
Qwen3-VL-8B | 90.19% | 90.70% | 85.37% / 93.09% | 94.95% / 56.51% | 91.60% | 90.56% |
| Delta vs Base | — | +86.97 | +87.73 | +8.95 / +20.09 | +8.59 / +28.87 | -1.96 | +38.05 |
LaTeX Breakdown
- Printed Formulas (500 images):
86.37%->95.42%1-NED, Exact Match24.00%->55.20%(+31.20 pts!) - Handwritten Formulas (68 images):
86.25%->91.48%1-NED, Exact Match54.41%->66.18%(+11.77 pts!)
Quickstart (transformers)
import torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "flintglass/PrismParse-8B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto").eval()
image = Image.open("receipt.jpg").convert("RGB")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "Extract all line items, subtotals, tax, and total from this receipt as a single strict JSON object."},
],
}
]
inputs = processor.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt").to(model.device)
with torch.inference_mode():
out = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Training & Provenance
- Base Model:
Qwen/Qwen3-VL-8B-Instruct(Apache-2.0) - Method: 2-epoch Full-Parameter BF16 ZeRO-1 DDP VLM SFT with exact assistant-only loss masking (
Best val_loss = 0.0662). - Training Domains: Receipts (CORD), Invoices, Scientific HTML Tables (PubTabNet), Printed & Handwritten LaTeX Formulas, Document VQA, and Full-Page OCR (strictly permissive commercial-safe sources; zero leakage into the 2,244 held-out evaluation images).
- License: Apache-2.0
Model tree for flintglass/PrismParse-8B
Base model
Qwen/Qwen3-VL-8B-Instruct