All benchmarks

  Peer-reviewed conference paper

DocLLM-7B beat GPT-4 + OCR at extracting fields from US business-entity filings

Made by Dongsheng Wang and eight co-authors

ACL 2024

Weights not on Hugging FaceSource: Wang et al., J.P. Morgan

The result

  • Quality

    Key-information-extraction F1 on BuDDIE’s test split (same-datasets setting). Small model: DocLLM-7B. Large model: GPT-4 + OCR text, zero-shot.

    96.0vs 66.1

    Small model ahead

    DocLLM 7B96.0
    GPT-4 + OCR66.1

    Field-extraction F1 (BuDDIE) · higher is better

The story

Reading the layout, not the pixels

Forms, receipts and filings carry part of their meaning in where things sit on the page. JPMorgan AI Research built DocLLM to read a document as text plus the position of every word, taken from the boxes an OCR engine returns, without an image encoder. One of the jobs it was tested on is narrow and common: given a document and a field name, return that field’s value.

Small model

DocLLM-7B

7.85B (7,853,019,136) · JPMorgan AI Research

Llama2-7B extended with attention over OCR word boxes, further pre-trained, then instruction-tuned on 16 document datasets; weights not released

Base
Llama2-7B (base or chat not stated)

Two rounds of training

DocLLM-7B starts from Llama 2 7B with extra attention terms over the word boxes. It was first pre-trained for one epoch on 5.59 million documents from IIT-CDIP and DocBank, learning to fill in missing blocks of text, then instruction-tuned for three epochs on 635,883 prompts from 16 document datasets. One of them is BuDDIE, 1,665 business-entity filings from US state registration websites, built by a J.P. Morgan team and not public before this work.

Data

BuDDIE, inside a 16-dataset instruction mix

1,665 filings in BuDDIE (about 1,600 in the DocLLM paper); 635,883 training and 96,919 test prompts across the 16 datasets

BuDDIE: business-entity filings from US state registration websites, annotated by a J.P. Morgan team; pre-training on IIT-CDIP and DocBank (5,592,245 documents)

Called BizDocs in the arXiv preprint. The DocLLM paper offers its instruction-tuning data on request; the BuDDIE paper shares BuDDIE for non-commercial research by email request, without 75 documents its experiments used. The size of BuDDIE’s extraction test split isn’t given

Training

8x NVIDIA A10G 24GB, fully sharded data parallel, bf16
Method
Further pre-training with a block-infilling objective, then instruction tuning (full or adapter tuning not stated)
Time
Not reported; 1 epoch of pre-training at learning rate 3e-4, then 3 epochs of instruction tuning at 1e-4, batch size 5, 1,024-token context

Not reported: cost.

How GPT-4 was asked

GPT-4 was prompted zero-shot with each document’s OCR text, without the word positions DocLLM reads. Three prompt engineers each refined the zero-shot prompts over five rounds, and the best results were kept. The paper names no GPT-4 snapshot, temperature or run date.

Large model

GPT-4 + OCR

Size not disclosed · OpenAI

Used as released, zero-shot, with the document’s OCR text and no word positions; prompts refined by three prompt engineers

Base
General model; snapshot not named

Evaluation

Test set
BuDDIE extraction test split; DocLLM was tuned on BuDDIE’s training split (same-datasets setting)
Metric
F1 on key-information extraction
Items
Not given for BuDDIE alone (38,039 extraction test prompts across 8 datasets)
How it was compared
Same test prompts and F1 for both; GPT-4 saw OCR text without word positions and no examples, while DocLLM was tuned on BuDDIE’s training split.

What they found

On BuDDIE extraction DocLLM-7B scored 96.0 F1 against 66.1 for GPT-4 with OCR text, and GPT-4 with vision scored 70.0 on a 5,000-prompt sample. DocLLM-7B led on all eight extraction datasets, while GPT-4 led on three of the five question-answering sets and on TabFact. With BuDDIE left out of training, the 7B still led on BuDDIE extraction (72.6) but the 1B fell behind (63.0). The same lab’s BuDDIE paper, scoring extraction differently, reports 89.97 for DocLLM against 77.76 for GPT-4. No cost, latency or repeated runs are reported, and the weights aren’t public.

All the numbers

Show all numbersHide all numbersEvery model · Cost, latency and energy · 7 more results

Every model on the headline test

Cost, latency and energy, as reported

Cost
Not reported
Latency
Not reported
Energy
Not reported

More from the source

  • BuDDIE KIE F1, DocLLM-1B (1.52B) vs GPT-4 + OCR

    Small model 95.4Large model 66.1

    Table 2

  • BuDDIE KIE F1, GPT-4V (GPT-4 with vision, zero-shot, on a 5K sample)

    70

    Table 10 and caption

  • BuDDIE KIE F1 with BuDDIE held out of training (STDD): DocLLM-7B 72.6, DocLLM-1B 63.0 vs GPT-4 + OCR 66.1

    Small model 72.6Large model 66.1

    The 1B loses when it has never seen the dataset.

    Table 3

  • Other KIE datasets, F1, DocLLM-1B / DocLLM-7B vs GPT-4 + OCR

    KLC (Kleister Charity)58.9 / 60.3 vs 45.9
    CORD (receipts)66.9 / 67.4 vs 58.3
    FUNSD (forms)48.2 / 51.8 vs 37.0
    DeepForm71.3 / 75.7 vs 42.1
    PWC25.7 / 29.06 vs 18.3
    SROIE (receipts)91.0 / 91.9 vs 90.6
    VRDU ad-buy87.6 / 88.8 vs 43.7

    Table 2

  • Document classification accuracy, DocLLM-1B / 7B vs GPT-4 + OCR

    RVL-CDIP90.9 / 91.8 vs 68.2
    BuDDIE98.3 / 99.4 vs 84.9

    Table 2

  • Where GPT-4 + OCR wins (VQA and NLI), DocLLM-1B / 7B vs GPT-4

    DocVQA (ANLS)61.4 / 69.5 vs 82.8
    WTQ (accuracy)21.9 / 27.1 vs 65.4
    DUDE42.6 / 47.2 vs 54.6
    TabFact (NLI accuracy)58.0 / 66.4 vs 77.1

    Table 2

  • Held-out document classification (BuDDIE CLS, STDD): DocLLM-1B 20.8, DocLLM-7B 31.1 vs GPT-4 + OCR 84.9

    DocLLM generalises badly to an unseen classification set; the paper attributes it to training on a single CLS dataset.

    Table 3

Worth knowing

  • Developer-reported: J.P. Morgan built DocLLM, ran the GPT-4 baseline and built the headline dataset (BuDDIE).
  • GPT-4 was zero-shot on OCR text without layout; DocLLM was instruction-tuned on the same datasets’ train splits. With vision (GPT-4V) GPT-4 scores 70.0 on BuDDIE KIE, still below DocLLM-7B.
  • Held out of training, DocLLM-1B scores 63.0 on BuDDIE KIE, below GPT-4’s 66.1; only the 7B stays ahead (72.6).
  • No cost, latency or energy figures; weights not released.
2 more caveats
  • GPT-4 wins on most VQA datasets and on TabFact (NLI).
  • DUDE and VRDU ad-buy use validation or bespoke splits because no public test set exists (Table 2 caption).

Weights on Hugging Face

Not on Hugging Face

J.P. Morgan has not published DocLLM weights on Hugging Face (checked 03 Oct 2026; only unofficial third-party re-implementations with the same name exist). The paper says the instruction-tuning data is available on request via jpmorgan.com.

Sources

  1. Wang et al., “DocLLM: A Layout-Aware Generative Language Model for Multimodal Document Understanding”, ACL 2024
  2. Same paper, PDF (ACL Anthology)
  3. arXiv preprint 2401.00908 (31 Dec 2023; table numbering differs)
  4. ACL 2024 (Long Papers), 11-16 Aug 2024, pp. 8529-8548. First posted on arXiv on 31 Dec 2023 (2401.00908). All numbers here are from the ACL version; the arXiv preprint numbers its tables differently.
1 more source behind this page
  1. arXiv 2404.04003
Share this benchmark

Drawing the image…

Post text