Dharma-AI launches 2B Field Extractor, says it beats frontier LLMs on document fields

Dharma-AI has published a Hugging Face blog post introducing the Dharma Field Extractor, a 2-billion-parameter model that takes a document image and returns structured JSON. The pitch is that OCR gives you everything printed on a page but leaves someone to write code mapping each string to the right field, while a general-purpose LLM can do the extraction with careful prompting but becomes expensive at high volume. The company says it built a dedicated model instead.
The model accepts two kinds of request. In the open mode no schema is supplied: the model works out from context and layout which parts of the page are structured fields (a label followed by a value, a table with a header row) and returns everything it finds as key-value pairs. In the schema-directed mode the user specifies the exact shape wanted, field by field, with a type for each (string, number or boolean) under the key names their own system uses. The output then follows the schema exactly, with the same keys and no extra fields, and a field that is not on the document comes back as null rather than an invented value. Tables are filled row by row and column by column. Invoices come back with line items as an ordered list, each with its own quantity and value, alongside the totals. The same checkpoint handles all document types, with no per-type fine-tuning.
On training: the base is DharmaOCR-LITE v1.1, a new 2-billion-parameter version, optimized from the 3-billion-parameter model in the company's April OCR paper and already specialized for OCR through supervised fine-tuning and DPO. On top of it the team trained a LoRA adapter on 43,384 examples covering both request modes. The data has three streams, all annotated at the field level: English multi-domain documents collected from the public web, real Brazilian documents in Portuguese sourced internally, and a smaller multilingual share covering other European and Asian languages. The mix spans receipts, commercial invoices, forms, bank statements, ID documents and synthetic documents.
The benchmark covers 546 documents across three request scenarios, 1,638 cases in total: extracting every field with no schema, a partial schema naming only real fields, and a schema that also includes deliberately nonexistent fields. The score is field-level F1 (matched by path, including position inside a table), multiplied by the Levenshtein similarity on the values that matched and by the share of outputs that are valid JSON. Dharma-AI ran it against four general-purpose frontier configurations. The Field Extractor scored 0.834; Claude Opus 5, the closest, scored 0.816 and GPT-5.6 Luna, the lowest named, scored 0.741. That is a gap of 1.8 points to 9.3 points. The post gives no scores for GPT-5.6 Sol or for the fourth configuration.
On cost, the post says the Field Extractor is roughly 6 times cheaper per extraction than GPT-5.6 Luna and roughly 147 times cheaper than GPT-5.6 Sol. The two sides are priced differently. Frontier figures come from measured average input and output tokens per page, reasoning tokens included, against each provider's published list pricing, with every frontier model run at low reasoning (Claude Opus 5 on adaptive effort). The Field Extractor is not billed per token: its figure is GPU time on a single L40S at $2.24 per hour, self-hosted. The authors say this is not a sales price and that self-hosted cost depends on hardware, volume and latency; they present the comparison as evidence that a self-deployed small specialized model is a real alternative to frontier APIs.
Two held-out examples illustrate generalization. SROIE and FUNSD are in the benchmark but were not used in training. On a SROIE receipt, the authors asked for all 18 printed fields and report every one correct, including a multi-line unlabeled billing address captured as one field and two blank fields (salesperson and ref) returned as null, with every number matching to the cent. On a FUNSD photocopying variance form, a checklist of twelve boolean fields with one nested group of five sub-options, the model marked the single checked box (poor quality original, with a handwritten "faded" note) as true and the other eleven as false. It also read the handwritten Bates ID correctly and returned null for two blank fields.
The authors tie the result to their thesis: on a bounded task, a small model trained close to that task beats a frontier model asked to do the same thing in general. They note that the first DharmaOCR-LITE, a 3-billion-parameter model, beat commercial frontier APIs on Brazilian Portuguese in their OCR paper, and that three months later, when newer models arrived, the gap held.
Key facts
- The Dharma Field Extractor is a 2-billion-parameter model that turns a document image into typed JSON, either open (no schema) or filling an exact schema of string, number and boolean fields; absent fields return null.
- On Dharma-AI's own benchmark (546 documents, 1,638 cases) it scores 0.834, versus 0.816 for Claude Opus 5 and 0.741 for GPT-5.6 Luna, among four frontier configurations tested.
- The company reports cost per extraction roughly 6 times lower than GPT-5.6 Luna and roughly 147 times lower than GPT-5.6 Sol, but compares self-hosted GPU time (a single L40S at $2.24 per hour) with API list pricing.
- It is a LoRA adapter trained on 43,384 field-annotated examples on top of DharmaOCR-LITE v1.1, with English, Brazilian Portuguese and multilingual data.
- SROIE and FUNSD, held out from training, are shown as examples: all 18 receipt fields correct, and a twelve-checkbox form read exactly.
Why it matters
Pulling specific fields out of documents, such as invoice totals, due dates or ID details, is a high-volume business task, and plain OCR leaves the mapping work to custom code. Dharma-AI argues a small specialized model can do this job at higher measured quality than frontier LLMs and at lower cost per extraction. The post presents this as a third data point for its thesis that on a bounded task a small model trained close to the task beats a general frontier model, after its April OCR paper and a follow-up three months later.
Who it affects
Teams that run recurring document pipelines: supplier invoices, medical requisitions going into a scheduler, contracts feeding a compliance system, ID documents mapped to employee records. The training mix leans toward English and Brazilian Portuguese documents, with a smaller multilingual share, so organisations working in those languages are the most directly addressed. Frontier API vendors are the benchmark's comparison point.
How to use it
Send a document image with one of two requests. Use the open mode when you do not know what the document holds; the model returns every key-value pair and table it can find. Use the schema mode when the output must match an existing shape: name each field, give it a type (string, number or boolean) and use your own key names; the output comes back with exactly those keys. Fields not on the document return null. The post links a demo to try on your own documents. It says the model is deployed self-hosted, with the cost figure based on a single L40S GPU. The post does not state a licence or whether the Field Extractor weights are openly downloadable.
How solid is it
All numbers come from Dharma-AI's own benchmark, run by the company itself; the post does not say the benchmark is public, and there is no independent evaluation. The benchmark is sizeable (546 documents, three scenarios) and uses a composite score of field-level F1, value similarity and valid-JSON share. The post gives scores only for Claude Opus 5 (0.816) and GPT-5.6 Luna (0.741); it does not give the scores for GPT-5.6 Sol or the fourth configuration, which is not named. There is no per-scenario breakdown, no confidence intervals and no number of runs. The two public-dataset examples were held out from training, but they are single illustrations, not aggregate results.
Risks and caveats
The cost comparison is not like for like: the 6x to 147x figure sets self-hosted GPU time against API list pricing, and the authors themselves say it is not a sales price and depends on hardware, volume and latency. No absolute per-extraction costs or latency numbers are given. Frontier models were run with reasoning set to low (Claude Opus 5 on adaptive effort), so results could differ at other settings. The post is vendor marketing for Dharma-AI's own models and ends with a sales framing, so the claims are best treated as unverified until independent tests appear.
“on a bounded task, a small model trained close to that task beats a frontier model asked to do the same thing in general”
— Dharma-AI, Hugging Face blog post