Complete AI Training
Start for Free

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI news ·

A 2-billion-parameter model extracts structured fields from any document, outperforms frontier LLMs and costs a fraction to run

Dharma-AI's 2-billion-parameter model extracts structured JSON fields from any document image at 6 to 147 times lower cost per extraction than frontier LLMs.

Dharma-AI released a 2-billion-parameter model on November 4, 2026, that extracts structured fields from any document image and returns them as typed JSON. The model, called Dharma Field Extractor, outperformed every frontier LLM tested on the same benchmark while running at a fraction of the cost - from 6 to 147 times lower per extraction, depending on the API compared.

The company published a paper earlier this year making a case for domain specialization: a smaller model trained close to its task can beat general-purpose APIs on that task. The new release extends that argument from OCR to field extraction, a use case where businesses need specific values pulled from high volumes of documents and pushed directly into downstream systems.

Two ways to ask for fields

The model accepts two request modes. In open mode, no schema is supplied. The model reads the page, identifies structured fields from context and layout, and returns everything it finds as key-value pairs. In schema-directed mode, the user specifies the exact shape required - field names, types, and nesting - and the output follows that schema precisely. Fields not present on the document return null rather than invented values.

"You don't need the page, you need certain fields," the team wrote. An invoice comes back with every line item as an ordered list, each with its own quantity and value. An ID returns the fields under the key names the user's system already expects. The same checkpoint handles all document types with no per-type fine-tuning.

Training on multi-domain field-level data

The base model is DharmaOCR-LITE v1.1, a 2-billion-parameter checkpoint already specialized for OCR through supervised fine-tuning and DPO. On top of that, the team trained a LoRA adapter on 43,384 examples across three data streams: English multi-domain documents from the public web, Brazilian domain data in Portuguese sourced internally, and a smaller multilingual share covering European and Asian languages.

All examples were annotated at the field level. The mix spans receipts, commercial invoices, forms, bank statements, ID documents, and synthetic documents rather than a single filing type. The deliberate variety pushes the model to generalize across layouts and languages.

Benchmark results against frontier models

The benchmark covered 546 documents across three request scenarios - open extraction, partial schema with real fields, and schema with deliberately nonexistent fields - for 1,638 total cases. Scoring used field-level F1 matched by path, multiplied by Levenshtein similarity on matched values and by the share of outputs returned as valid JSON.

Dharma Field Extractor scored 0.834. Claude Opus 5, the closest frontier model, scored 0.816. GPT-5.6 Luna scored 0.741. The cost comparison used measured average tokens per page against each provider's published list pricing, with reasoning set to low on all frontier models. The Dharma model ran self-hosted on a single L40S GPU at $2.24 per hour.

The team also tested on two public datasets held out from training: SROIE and FUNSD. On a SROIE receipt requesting all 18 printed fields, every value returned correctly - including a multi-line billing address captured as a single field, two blank fields returned as null, and all amounts matching to the cent. On a FUNSD form with twelve boolean fields, the model marked exactly the one checked box as true and the other eleven as false, read a handwritten Bates ID correctly, and returned null for the two blank fields.

Why this matters for writers, creatives, and support teams

If your work involves processing forms, invoices, receipts, or ID documents - common in customer support, event registration, or contract workflows - this model removes the step where someone manually maps OCR output to database fields. Instead of getting back a wall of text and writing extraction code, you send a document and a schema and get back JSON your system can consume directly. For teams handling high document volumes on tight budgets, the cost difference matters: running a specialized model on your own infrastructure, rather than paying per-token API rates, changes the economics of document automation at scale. Professionals building these pipelines can explore the techniques behind such models through AI Engineering Courses or broader Generative AI Courses that cover model selection and deployment for bounded tasks.

Share