Dharma Field Extractor: Any Document In, Structured Fields in JSON Out
The Dharma Field Extractor is a 2‑billion‑parameter model that extracts user‑specified fields from any document image and returns typed, nested JSON, outperforming frontier LLMs on this task at a fraction of the cost. It can operate in an open mode (no schema) or a schema‑directed mode where exact field names and types are supplied. This enables high‑volume, low‑latency extraction pipelines without per‑type fine‑tuning. Engineers can replace generic OCR + prompting stacks with a single model checkpoint that directly produces downstream‑ready data.
⚡ Key Takeaways
- 2‑billion‑parameter model that outperforms frontier LLMs on field extraction while costing less.
- Supports two request patterns: open (no schema) and schema‑directed (exact field names and types).
- Returns fully typed JSON with nested structures, including ordered lists for tables and null for missing fields.
- No per‑document‑type fine‑tuning required; the same checkpoint handles invoices, IDs, medical requisitions, contracts, etc.
By delivering structured data directly from images, the Field Extractor eliminates the OCR + prompting loop, cutting latency and cost for high‑throughput enterprise workflows such as invoice processing or medical scheduling.
✅ Practical Steps
- Send a document image to the Field Extractor API, optionally including a JSON schema that defines the desired fields and their types, to receive structured JSON output.
- Choose open mode when the document’s contents are unknown, and schema‑directed mode when the downstream system requires exact field keys.
Want the full story? Read the original article.
Read on Hugging Face Blog ↗