Skip to content

AI

A 2B-Parameter Model Wants Your Invoices, Not Your Job

Hugging Face's Dharma Field Extractor pulls the exact fields you ask for out of any document and hands back JSON. The team says it beats every frontier LLM it tested, at a fraction of the cost.

TL;DR

  1. Dharma Field Extractor: 2 billion parameters, any document in, requested fields out as JSON.
  2. Its makers say it outperforms every frontier LLM they tested on extraction.
  3. Cost is reportedly a fraction of frontier APIs, which is the part finance will read.

What happened

Hugging Face has published Dharma Field Extractor, a 2-billion-parameter model built for one narrow chore: you tell it which fields you want, hand it any document, and it returns exactly those fields as JSON. No essay, no commentary, just structured data a downstream system can eat.

The pitch, in the team's own words, is that it outperforms every frontier LLM they tested, at a fraction of the cost. That is a vendor claim from the people who built it, so treat the benchmark as theirs until someone else reproduces it.

The model follows DharmaOCR-LITE, released in April. That one was specialized for OCR across contracts, court filings, invoices, IDs and forms. Its accompanying paper made the case that a smaller model trained close to its task can beat general-purpose frontier APIs on that task.

Why it matters

OCR and extraction are different jobs. OCR gives you everything printed on the page, line by line, faithful to the original formatting. Great if you are digitizing a manuscript or reading a contract end to end.

But most business pipelines do not want the page. They want the patient name, exam type and date from a medical requisition, ready to schedule. They want every line item on an invoice as a list. They want the fields off an ID mapped to the columns of an employee record.

Run those documents through plain OCR and you get a wall of text with no hint of which string is the exam type. Someone, or something, still has to sort it out.

A small model trained for one job is going after the big general-purpose ones on that job's turf.

This is incremental, not a revolution. Domain-specific models are now routine. But routine is exactly how software eats back-office work: quietly, cheaply, one form at a time.

What to do with it

  • Audit your paperwork.List the documents your team re-types by hand, then note which fields actually matter.
  • Read the blog post.Hugging Face's write-up explains the method and the comparison against frontier models.
  • Run your own test.Feed it your ugliest real documents and compare against whatever API you pay for now, on accuracy and price.
  • Do the cost math.If extraction is a high-volume job, a small specialized model versus a frontier API is where the budget conversation starts.

Ciao, sapiens. The robots are coming for the data entry, but at least they will not complain about the invoices.