Dharma Field Extractor Transforms Any Document into Structured Fields in JSON Format

Dharma Field Extractor Transforms Any Document into Structured Fields in JSON Format
3 min read

Dharma-AI presents Field Extractor, a 2-billion-parameter model that extracts requested fields from a document and returns them as structured data. According to the company, it outperforms all state-of-the-art models tested on its benchmark, for a significantly lower execution cost.

  • Dharma-AI launches Field Extractor, a 2-billion-parameter model that returns requested fields as structured data.
  • The model scores 0.834 on its benchmark, ahead of Claude Opus 5 at 0.816.
  • It returns null for missing fields instead of inventing values.
  • Dharma-AI claims it costs 6 to 147 times less than generalist APIs, though this is not a sale price.

The model is based on DharmaOCR-LITE, released in April and specialized in text recognition (OCR) on various documents, from contracts and invoices to identity papers and forms. While OCR returns the full text of a page, Field Extractor targets a different need: retrieving specific information in a format directly usable by software. In the source, Dharma-AI cites, for example, each line of an invoice, as a list, or the patient’s name, type of exam, and date on a medical request. With a standard OCR, these values arrive unlabeled, and code must still be written to link them to the correct fields. A large language model (LLM, a system trained to manipulate text) can accomplish this task with carefully crafted instructions, but the company believes this approach becomes costly when repeated at high volume.

Two Ways to Request Fields

Field Extractor accepts two types of queries. In open mode, no schema is provided: the model itself identifies the structured parts of the document, based on context and layout, and returns the key-value pairs it finds. In schema-driven mode, the user specifies the desired fields, their type (string, number, or boolean), and the key names used by their system. If a requested field does not exist in the document, the model returns null instead of inventing a value.

The base model, DharmaOCR-LITE v1.1, was trained on 43,384 examples covering these two modes, using a LoRA adapter, a small learning layer added to the existing model. The data comes from three sets: English documents collected from the public web, Brazilian documents in Portuguese, and a smaller portion of multilingual data in other European and Asian languages.

Benchmark Results

The benchmark covers 546 documents, totaling 1,638 cases, divided between full extraction without a schema, partial schema, and schema including deliberately non-existent fields. The model achieves a score of 0.834, compared to 0.816 for Claude Opus 5, 0.741 for GPT-5.6 Luna, and the other configurations tested. The gap with generalist models ranges from 1.8 points (Claude Opus 5) to 9.3 points (GPT-5.6 Luna).

Dharma-AI also indicates a lower cost. For generalist APIs, the calculation is based on the average tokens measured per page and the public pricing of each provider; the cost of Field Extractor corresponds to the computation time on a single L40S GPU, billed at $2.24 per hour. According to the company, the model costs between 6 and 147 times less than the APIs compared. However, it clarifies that this is not a sale price, as the cost of a self-hosted deployment depends on hardware, volume, and target latency.

On public datasets not used for training, SROIE and FUNSD, the source presents two examples. On an SROIE receipt, the 18 requested fields are returned correctly, including two empty fields returned as null. On a FUNSD form, the model correctly ticks the box that is ticked, out of twelve boolean fields, and correctly reads a handwritten Bates identifier.

Dharma-AI notes that its research paper had already placed an earlier version of DharmaOCR-LITE, a 3-billion-parameter model, above the commercial APIs tested on Brazilian Portuguese. The model can be tried online on a dedicated portal, and its open versions are available on Hugging Face.

S’abonner
Notification pour
guest

0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
0
Nous aimerions avoir votre avis, veuillez laisser un commentaire.x