Flintglass PrismParse-9B: Accurate document, receipt, and formula parsing from images
2 min readupdated
The Flintglass PrismParse-9B model based on Qwen/Qwen3.5-9B is built for document parsing and structured data extraction. Trained on over 40,000 cleanly licensed images of receipts, invoices, scientific tables, and mathematical formulas, it outputs strictly valid JSON or clean HTML. The new model significantly outperforms the base version in structuring tasks and is well-suited for automating accounting, digitizing scans, and processing academic PDFs. GGUF quantizations for llama.cpp, Ollama, and LM Studio are available for local execution.
Key features
- High accuracy: Average accuracy of 91.16% on a held-out benchmark of 2,244 documents.
- Flawless JSON: 100% valid JSON responses when processing receipts and invoices.
- Table handling: Precise transfer of tables from academic PDFs into HTML markup.
- Formula recognition: Conversion of handwritten and printed mathematical expressions into LaTeX code.
- Apache-2.0 license: A fully open model suitable for commercial use.
What you can do
- Receipt digitization: Automatically extract line items, prices, and totals into clean JSON.
- Table conversion: Transform scans of research papers and reports into ready-to-use HTML tables.
- Math recognition: Convert complex formulas from images into precise LaTeX syntax.
- Invoice parsing: Automate the processing of accounting invoices and bills within services or bots.
Example
import torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "flintglass/PrismParse-9B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
image = Image.open("table_or_receipt.png").convert("RGB")
prompt = (
"Convert this table image into clean, accurate HTML table markup "
"(......). Output ONLY the HTML table."
)
messages = [{"role": "user", "content": [{"type": "image", "image": image}, {"type": "text", "text": prompt}]}]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True,
return_dict=True, return_tensors="pt", enable_thinking=False
).to(model.device)
out = model.generate(**inputs, max_new_tokens=1536, do_sample=False)
print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))Read more
Details• Average benchmark (5 tasks): 91.16% (+37.10 percentage points over base)
• PubTabNet (Cell F1 / HTML 1-NED): 85.50% / 93.87%
• GGUF sizes: Q4_K_M (5.3 GB), Q6_K (6.9 GB), Q8_0 (8.9 GB)
• Training: Full-parameter BF16 fine-tuning (2 epochs on 4x NVIDIA B200)
• Compact versions: PrismParse-4B and PrismParse-2B










Comments