
Dharma Field Extractor: Any Document In, Structured Fields in JSON Out
Dharma Field Extractor is a 2-billion-parameter document model that returns structured JSON, either open key-value extraction or a user-supplied typed schema, with null for absent fields. It is a LoRA adapter trained on 43,384 examples over DharmaOCR-LITE v1.1. On a 546-document, 1,638-case benchmark it scores 0.834, versus 0.816 for Claude Opus 5 and 0.741 for GPT-5.6 Luna. Self-hosted on one L40S, it costs 6 to 147 times less.
What it claims
Dharma-AI's Field Extractor is a 2-billion-parameter model that takes a document image and returns JSON. It runs in two request modes from one checkpoint, with no per-document-type fine-tuning. The authors report a benchmark score of 0.834, above four frontier API configurations, at 6 to 147 times lower cost per extraction.
How it works
The base model is DharmaOCR-LITE v1.1, a 2B model already tuned for OCR with supervised fine-tuning and DPO. It is smaller than the 3B DharmaOCR-LITE described in the April 2026 paper (arXiv:2604.14314). A LoRA adapter is trained on top using 43,384 examples that cover both modes.
- Open mode: no schema. The model infers fields from layout cues, such as a label followed by a value or a table with a header row, and returns all key-value pairs it finds.
- Schema mode: the caller supplies keys and a type for each. The supported types are string, number and boolean. Output uses exactly those keys, adds no extra fields, fills tables row by row, and returns null for fields absent from the document.
Training data comes from three streams, all annotated at the field level:
- English multi-domain documents collected from the public web.
- Internally sourced Brazilian Portuguese documents.
- A smaller multilingual share covering other European and Asian languages.
Document types include receipts, commercial invoices, forms, bank statements, ID documents and synthetic documents. Listed public sources include CORD, DocVQA, WildReceipt, BID and several invoice datasets.
Evidence
The benchmark has 546 documents run under three scenarios, for 1,638 cases:
- Full extraction with no schema.
- A partial schema naming only real fields.
- A schema that includes deliberately nonexistent fields.
The score multiplies three terms:
- Field-level F1, with fields matched by path, including position inside a table.
- Levenshtein similarity on the values that matched.
- The share of outputs that are valid JSON.
Claude Opus 5 scores 0.816, 1.8 points behind. GPT-5.6 Luna scores 0.741, 9.3 points behind. The page says four frontier configurations were tested, but it does not give the other scores or name the fourth. All frontier models ran with reasoning set to low. Claude Opus 5 used adaptive effort.
SROIE and FUNSD are held out of training. For them the page shows only one example each, not aggregate scores. On a SROIE receipt, the model returned all 18 fields correctly, with two blanks as null. On a FUNSD checklist with 12 booleans, it marked the single checked box and read a handwritten Bates ID.
How to use it
The page links to a hosted demo and to Dharma-AI's Hugging Face organization. It gives no model ID, install command, weights licence or input format.
The cost figures come from two different methods. Frontier cost uses measured input and output tokens per page, reasoning tokens included, at list prices. Dharma cost is GPU time on one self-hosted L40S at $2.24 per hour. The authors state this is not a sales price and that real cost depends on hardware, volume and latency targets.
Limits
- The authors ran the benchmark themselves. Per-scenario scores are not broken out, so performance on the phantom-field scenario cannot be read separately.
- Schema types are limited to string, number and boolean.
- The page reports no throughput, latency or failure cases.
- Results on held-out data appear only as two hand-picked examples.
Organisations named here
- Dharma-AI
- Hugging Face
- Anthropic
- OpenAI
- BID Dataset
- CORD
- DocVQA
- FUNSD
- HumynLabs Brazilian Bills and Invoices
- Katanaml Invoices
- line_items
- NAVER CLOVA
- NOVA IMS
- SROIE
- Tech4Humans BR-Doc Extraction
- WildReceipt
- Zenodo Invoices (PT)
Technologies named here
- Claude Opus 5
- GPT-5.6 Luna
- GPT-5.6 Sol
- Hugging Face
- Vision language model
- Dharma Field Extractor
- DharmaOCR-LITE
- DharmaOCR-LITE v1.1
- NVIDIA L40S
Techniques named here
- LoRA
- Supervised fine-tuning
- DPO
Concepts named here
- Domain specialization
- Open extraction
- Schema-directed extraction
- Sovereign SSLM
Related in models


