Source: huggingface.co/blog/Dharma-AI/dharma-field-extractor
Field Extractor takes a document image and returns typed JSON. It works in two modes: an open mode where the model decides which fields exist, and a schema mode where the caller supplies key names and types. In schema mode, the output keys match the names given, no extra fields are added, and missing values come back as null.
The model is built on DharmaOCR-LITE v1.1 with a LoRA adapter trained on 43,384 examples in English, Brazilian Portuguese and other European and Asian languages. The training data covers receipts, invoices, forms, bank statements and ID documents. On a 546-document benchmark with 1,638 test cases, Dharma-AI reports a score of 0.834, ahead of Claude Opus 5 at 0.816 and GPT-5.6 Luna at 0.741, with the frontier models run at low reasoning effort.
Dharma-AI says the model is self-hosted and estimates its cost from GPU time on a single L40S priced at $2.24 per hour, which it places at roughly 6 to 147 times lower than the frontier APIs tested. The company notes that this is not a sales price and that real self-hosted costs depend on hardware, volume and latency. SROIE and FUNSD were used only for evaluation and were held out from training.
Why it matters if you build agents
If your agent extracts fields from invoices, IDs or forms, a schema-constrained extractor can return keys that match your database, which can cut the mapping code you would otherwise write. The benchmark results are the authors' own, so test the model on your document types before replacing an existing API call. Self-hosting moves the cost from per-token billing to GPU hours, which changes the math at high volume.
Get stories like this every weekday
One short email with the day's agent tooling news.