LayoutLM for Nigerian forms

philschmid/layoutlm-funsd fine-tuned on pages of Nigerian bank forms. It tags each OCR word of a form page as HEADER, QUESTION (a label), ANSWER or other (the 7 FUNSD BIO labels). It is the stage 1 model of the N-ATLAS Form Assistant (https://github.com/1demilade/n-atlas-form-assistant).

No tokenizer is included: use microsoft/layoutlm-base-uncased.

from transformers import AutoTokenizer, LayoutLMForTokenClassification
tokenizer = AutoTokenizer.from_pretrained('microsoft/layoutlm-base-uncased')
model = LayoutLMForTokenClassification.from_pretrained('davidadeyemi/layoutlm-nigerian-forms')

Training

Started from philschmid/layoutlm-funsd. 15 epochs, learning rate 3e-5, batch size 4. Data: 53 pages of Nigerian forms (each repeated 3 times) plus the 149 FUNSD training forms. Full numbers are in training_results.json.

Results

Entity F1 on the trainer's held-out sets:

Test set before after
Nigerian forms (19 pages of 3 bank account-opening forms) 0.522 0.691
FUNSD test 0.785 0.765

On the N-ATLAS Form Assistant's own gold data (6 real forms, 155 fields, scored on whole fields after the project's layout rules, 8 Nov 2026) it scored slightly below the base model: field F1 56% against 59%. Those forms are mostly not account-opening forms.

Limits

  • The Nigerian training and test sets are small and come from a few bank forms.
  • The licence of the base model is not stated; treat this model as research-only until checked.
Downloads last month
-
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 davidadeyemi/layoutlm-nigerian-forms

Finetuned
(1)
this model