Skip to content
Back to skills

Dharmaocr Benchmark Eval

ASecurity

Evaluates structured OCR extraction fidelity and text degeneration rates on printed, handwritten, and legal documents. Measures how well models adhere to JSON schemas while minimizing pathological generation loops. Use when the user wants to benchmark on DharmaOCR-Benchmark, or asks about evaluating this task. Reports Score.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythongoexpressapi

Works with

  • api

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill dharmaocr-benchmark-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dharmaocr Benchmark Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dharmaocr Benchmark Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-dharmaocr-benchmark-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-dharmaocr-benchmark-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dharmaocr-benchmark-eval
description: Evaluates structured OCR extraction fidelity and text degeneration rates on printed, handwritten, and legal documents. Measures how well models adhere to JSON schemas while minimizing pathological generation loops. Use when the user wants to benchmark on DharmaOCR-Benchmark, or asks about evaluating this task. Reports Score.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2604.14314
  bibtex_key: [REDACTED]
  confidence: high
---

# dharmaocr-benchmark-eval

> DharmaOCR: Specialized Small Language Models for Structured OCR that outperform Open-Source and Commercial Baselines — Cardoso et al. (2026) (arXiv:2604.14314, 2026)

## What this evaluates

Evaluates structured OCR extraction fidelity and text degeneration rates on printed, handwritten, and legal documents. Measures how well models adhere to JSON schemas while minimizing pathological generation loops.

## Datasets

- **DharmaOCR-Benchmark** — total ?; splits: test (-1)

## Metrics

- `Score` **(primary)** — range: [0, 1]
  - Extraction fidelity score measuring how accurately the model outputs structured JSON matching the ground truth. Range: [0, 1].
- `Degeneration rate (%)` — range: percent
  - Percentage of evaluated pages where pathological generation loops or text degeneration occurs, degrading output quality.
- `Time per page (s)` — range: seconds
  - Average inference time required to process a single document page.
- `Relative cost (%)` — range: percent
  - Inference cost relative to a reference model (olmOCR 2-7B), calculated using hourly GPU costs and vLLM configuration.

## Input / output format

**Input**: Document images (printed, handwritten, or legal) paired with a target JSON schema for structured extraction.

**Output**: Strictly formatted JSON object containing the extracted fields, validated against the provided schema.

## Scoring recipe

```python
def compute_score(pred_json, gold_json):
    # Measures extraction fidelity against ground truth structured output
    return exact_match_or_f1(pred_json, gold_json)

def compute_degeneration_rate(predictions):
    degenerate_count = 0
    for pred in predictions:
        if is_pathological_loop(pred.text) or violates_schema_strictly(pred):
            degenerate_count += 1
    return (degenerate_count / len(predictions)) * 100
```

## Common pitfalls

- Cost comparisons mix local GPU hourly rates with commercial API public prices, potentially disadvantaging commercial providers.
- Degeneration rate specifically targets pathological generation loops, not just standard OCR errors.
- Quantization (AWQ) impacts both latency and cost, requiring careful tracking of quality trade-offs.

## Evidence (verbatim from paper)

> Table 1 summarizes the evaluation results for the models explored, including proprietary models, open-source baselines models, and variants trained. Since the cost of non-commercial models depends on the execution infrastructure, a relative cost is expressed as a percentage with respect to a reference model. OlmOCR 2-7B, which achieved the most consistent benchmark outcome (high score and low text degeneration rate), was chosen as the reference model.

## Citation

```bibtex
@misc{cardoso2026dharmaocr,
  title={DharmaOCR: Specialized Small Language Models for Structured OCR that outperform Open-Source and Commercial Baselines},
  author={Cardoso et al. (2026)},
  year={2026},
  note={arXiv:2604.14314}
}
```

- arXiv: 2604.14314

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.