# Dharma-AI releases 2B-parameter open document field extractor model on Hugging Face

> **Key takeaway:** A 2-billion-parameter specialized model with publicly released weights outperforms frontier LLMs on structured document extraction at 6-147x lower cost.

**Published:** 2026-11-04T17:50:10+00:00 
**Source:** Hugging Face Blog &amp; Announcements 
**Category:** ai-open-models 
**Canonical URL:** https://fosswire.org/news/dharma-ai-releases-2b-parameter-open-document-field-extracto.html 

## Summary
Dharma-AI has released the Dharma Field Extractor, a 2-billion-parameter vision-language model that converts document images directly into structured JSON output without requiring per-document-type fine-tuning. The model builds on the previously released DharmaOCR-LITE v1.1 base through a LoRA adapter trained on 43,384 field-annotated examples spanning English, Portuguese, and multilingual documents including receipts, invoices, forms, bank statements, and ID documents. Users can operate it in two modes: an open mode that discovers all structured fields automatically, or a schema-directed mode that enforces exact output shapes with typed fields, nested tables, and null values for missing data. The model weights and inference code are available through Hugging Face, enabling self-hosted deployment on a single L40S GPU rather than reliance on proprietary API services.

The release includes a 546-document benchmark measuring field-level F1 multiplied by Levenshtein similarity and valid JSON rate, tested against Claude Opus 5, GPT-5.6 Luna, GPT-5.6 Sol, and another frontier configuration. The Field Extractor scored 1.8 points higher than the nearest competitor (Claude Opus 5) and up to 9.3 points above GPT-5.6 Luna, while operating at cost reductions ranging from 6x to 147x compared to token-based API pricing. The training data deliberately mixes domains and languages rather than specializing on a single document type, and the architecture uses a single checkpoint for all document varieties.

## Model architecture and training approach
- **Base model and adaptation:** The Field Extractor starts from DharmaOCR-LITE v1.1, a 2-billion-parameter OCR-specialized model, and adds a LoRA adapter rather than full fine-tuning, preserving the base capabilities while adding structured field extraction.
- **Training data composition:** 43,384 examples split across three streams: English multi-domain web documents, real Brazilian Portuguese documents sourced internally, and a smaller multilingual set covering European and Asian languages, all with field-level annotations.
- **Dual inference modes:** Open mode performs unsupervised field discovery from layout and context; schema-directed mode accepts user-specified JSON shapes with typed fields (string, number, boolean), nested structures, and table extraction, returning null for requested but absent fields.
- **Benchmark methodology:** Evaluation uses 546 documents across 1,638 test cases covering three scenarios (no schema, partial schema, schema with nonexistent fields), scoring field-level F1 by path including table position, multiplied by Levenshtein value similarity and valid JSON rate.
- **Deployment economics:** Self-hosted inference on a single NVIDIA L40S at $2.24/hour is compared against measured token consumption (including reasoning tokens at low setting) for frontier APIs, with cost ratios computed from published list pricing.

## Why it matters
For Linux-based document processing pipelines and on-premises deployments, the Dharma Field Extractor offers a fully self-hosted alternative to proprietary vision API services, eliminating per-token pricing and network dependency while running on standard datacenter GPU hardware. The Apache-2.0 licensing of the underlying DharmaOCR-LITE model and public Hugging Face availability of weights reduces vendor lock-in for enterprises processing sensitive documents under data residency requirements, and the single-checkpoint approach simplifies operations for developers building extraction workflows across heterogeneous document types without maintaining separate models per form.