Dharma Field Extractor: Any Document In, Structured Fields in JSON Out
huggingface ·
Dharma-AI has released the Dharma Field Extractor, a specialized 2-billion-parameter model designed to convert unstructured document images into structured JSON data. Unlike general-purpose OCR or large language models that return raw text, this tool extracts specific fields based on user-defined schemas or identifies them automatically from context. The model was trained on over 43,000 examples across English, Portuguese, and other languages, covering diverse document types such as invoices, IDs, and medical forms. In benchmark tests involving 546 documents, the extractor outperformed frontier LLMs like Claude Opus 5 and GPT-5.6 Luna in field-level accuracy. Additionally, running the model self-hosted on an L40S GPU costs between six and 147 times less than using commercial API alternatives. The system handles both open-ended extraction and schema-directed requests, returning null values for missing data rather than hallucinating information. This release reinforces Dharma-AI's thesis that small, task-specific models can surpass larger generalist models in efficiency and cost-effectiveness.
huggingface