Read an invoice in a second
Pick an example or open an invoice PDF of your own. A small model in your browser finds the seller, the buyer, VAT numbers, dates, amounts and the IBAN, and marks each one on the page. The file never leaves this page.
The demo needs JavaScript. The model is a 34 MB download, once; your browser keeps it.
It reads digital PDFs, the kind accounting software exports, in English, Polish, German, French, Spanish and Lithuanian. Scans and photos are not supported. A local LLM wrote the examples; every company and number in them is made up.
98% vs 92%Of the fields in 60 hand-checked invoices read right. An open LLM 200 times larger read 92%.
80% completeOf those invoices had every field right; the LLM managed 53%. Check digits and the sums are shown next to the fields.
Under a secondPer invoice, in your browser. The LLM needed 1.2 seconds per invoice on a GPU.
How it works
DataNo real invoices. A generator made 9,000 invoices in six layouts and six languages. A local open LLM wrote 566 more for 30 kinds of business, each in a layout of its own, and each was filled five more times with made-up names and numbers. Every invoice was printed to PDF in Chrome and read back the way this page reads it.
ModelThe first 12 of mmBERT-small's 22 layers, fine-tuned to mark the words of eleven fields: 33 MB of weights plus a 1 MB vocabulary. The page is read block by block, so a seller and a buyer printed side by side are not mixed up. The 60 test invoices come from the same LLM, for ten other kinds of business, so 98% is an upper bound.
RulesVAT numbers and IBANs carry check digits. A pick that fails them is replaced by the number on the page that passes, and net plus VAT must equal the total. Rules alone read 58% of the fields and no invoice completely: they cannot tell a company name or an invoice number.
Compared with an LLMQwen 2.5 7B, asked for the same fields as JSON, read 92% of the fields and 53% of the invoices completely, at 1.2 seconds per invoice on a GPU. A hosted LLM would also have to receive every invoice, at a price per page.
Code, configs and the full benchmark: github.com/balticml/invoice-extraction. Weights: huggingface.co/balticml/mmbert-small-invoice-extraction. Want this on your invoices? Book a 30-min call