FreightLens LayoutLMv3 (FUNSD)

microsoft/layoutlmv3-base fine-tuned end to end on FUNSD scanned forms to tag words as question, answer or header (BIO labels). Part of FreightLens AI.

Training

134 training forms, 15 held-out forms for checkpoint selection, official 50-form test split scored once. 1,000 steps, AdamW, learning rate 1e-5, 10% linear warm-up, batch 2. Each word keeps its own box, as an OCR engine would produce on a new document.

Test results (seqeval entity level)

Entity Precision Recall F1
answer 0.774 0.837 0.804
header 0.448 0.546 0.492
question 0.829 0.830 0.829
overall 0.779 0.816 0.797

With segment-level boxes (every word takes its annotated entity box, the protocol behind the published 90.3 F1) the same recipe reaches 0.878 F1; that setting relies on ground-truth entity extents and is reported only for comparison.

Usage

from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor

repo = "AllanDai/freightlens-layoutlmv3-funsd"
processor = LayoutLMv3Processor.from_pretrained(repo, apply_ocr=True)
model = LayoutLMv3ForTokenClassification.from_pretrained(repo)

License

The base model is CC BY-NC-SA 4.0, so these weights are for non-commercial use only.

Downloads last month
36
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for AllanDai/freightlens-layoutlmv3-funsd

Finetuned
(315)
this model