
要点
- Hugging Face blog (4 Nov 2026): “Dharma Field Extractor: Any Document In, Structured Fields in JSON Out”; built on DharmaOCR-LITE v1.1 (2B) plus a LoRA trained on 43,384 examples.
- Two request modes: open (no schema) and schema-directed (exact keys/types; missing fields return null, no invention).
- Bench: 546 documents × three scenarios = 1,638 cases; score = field-level F1 (path-matched, including table position) × Levenshtein on matched values × share of valid JSON.
- Held-out public sets SROIE and FUNSD were not in training; vendor shows correct all-18-field SROIE receipt and 12-boolean FUNSD checklist with handwritten Bates ID.
On 4 November 2026, Dharma-AI published a Hugging Face post for Dharma Field Extractor, a 2-billion-parameter model that takes a document image plus either an open request or an exact schema and returns typed JSON. OCR already returns faithful page text. Field extraction is a different job: named keys, typed values, nested tables, and nulls when the page lacks the field. The post’s usable claim is not that small models are generally smarter. On bounded, schema-directed field extraction, a 2B model trained close to that task can beat frontier generalist APIs on field-level F1 while running at roughly 6 to 147 times lower cost on a single L40S. If independent labs reverse that ranking on held-out public sets under matched schemas, or close the cost gap at equal F1, the claim fails.
[1]What shipped
The base is DharmaOCR-LITE v1.1, already specialized for OCR via SFT and DPO. A LoRA adapter trained on 43,384 examples covers English multi-domain web documents, Brazilian Portuguese internal documents, and a smaller multilingual share. Document types include receipts, invoices, forms, bank statements, IDs and synthetics.
Open mode invents no fixed vocabulary: it finds label-value pairs and tables from layout. Schema mode demands exact keys and types (string, number, boolean); absent fields return null. The authors stress that schema outputs match the requested shape with no extra keys, so they can land in a downstream system without a second mapping pass.
[1]Evidence hardness
The full bench covers 546 documents across three scenarios (all fields, partial real schema, schema with deliberate phantom fields) for 1,638 cases. The score multiplies field-level F1 by path (including table position), Levenshtein similarity on matched values, and the share of valid JSON outputs.
Against four frontier configurations with reasoning set low (Claude Opus 5 adaptive), the quality gap runs from 1.8 points (Opus 5 at 0.816 vs 0.834) to 9.3 points (GPT-5.6 Luna at 0.741). Cost uses measured average tokens per page against list prices versus GPU time on one L40S at $2.24/hour. The authors flag that self-hosted cost depends on hardware, volume and latency targets; the range is illustrative, not a sales SKU.
SROIE and FUNSD are held out from training. On a SROIE receipt the model returns all 18 requested fields correctly, including a multi-line unlabeled billing address and nulls for blank salesperson/ref. On a FUNSD photocopying variance form it marks the one checked box true, the other eleven false, reads a handwritten Bates ID, and nulls blank fields.
[1]Steelman and gaps
Steelman. Vendor benches favor the vendor. Frontier models were not fine-tuned on the same 43k set; a LoRA on Opus or GPT for this task might close the 1.8-point gap to Opus. $2.24/hour L40S amortization ignores idle capacity, engineering time and GPU procurement. Multilingual coverage beyond English and Portuguese looks thin. “Null instead of invent” is the right product behavior, but the post does not publish calibrated abstention rates across domains.
Those limits matter. They do not cancel the structural point: when the output contract is a fixed schema, specialization plus layout-aware training can beat a generalist asked to do the same job in-context. The earlier DharmaOCR paper (arXiv:2604.14314) made a parallel case for Brazilian Portuguese OCR; this release extends the pattern to field extraction with public held-outs named in the post.
What remains open: third-party re-runs of the 1,638-case protocol; comparison against document-specialist commercial APIs (not only frontier chat); latency and error modes on multi-page contracts; and whether schema-directed null behavior holds under adversarial blank fields.
[1]Who should care, and what to watch
Teams paying frontier rates to turn invoices, IDs and requisitions into database rows should price a self-hosted 2B extractor against their current token bill at equal field F1. Compliance buyers should treat “null on missing” as a requirement, not a nice-to-have. Model labs shipping generalist document agents should publish path-matched field F1 with phantom-field schemas, not only page-level OCR CER.
Watch next: independent scores on SROIE/FUNSD and the vendor’s three-scenario mix; whether the Opus 1.8-point gap survives a frontier LoRA trained on similar data; and production reports on multi-page nested tables where path-matched F1 usually collapses.
[1]Close
Dharma’s usable sentence is not that 2B models replace frontier systems. It is that for schema-directed field extraction, a specialist small model can lead on field F1 while the cost gap stays large enough to matter at volume. Six months on, either external benches will keep that ranking, or frontier fine-tunes and document APIs will erase both the quality and the price story.
[1]