Datasets:
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- DATASET_CARD.md +3 -2
- README.md +3 -2
- experiment-notes-07.md +18 -9
- output/png/INV-2026-0001.png +3 -0
- output/png/INV-2026-0002.png +3 -0
- output/png/INV-2026-0003.png +3 -0
- output/png/INV-2026-0004.png +3 -0
- output/png/INV-2026-0005.png +3 -0
- output/png/INV-2026-0006.png +3 -0
- output/png/INV-2026-0007.png +3 -0
- output/png/INV-2026-0008.png +3 -0
- output/png/INV-2026-0009.png +3 -0
- output/png/INV-2026-0010.png +3 -0
- output/png/INV-2026-0011.png +3 -0
- output/png/INV-2026-0012.png +3 -0
- output/png/INV-2026-0013.png +3 -0
- output/png/INV-2026-0014.png +3 -0
- output/png/INV-2026-0015.png +3 -0
- output/png/INV-2026-0016.png +3 -0
- output/png/INV-2026-0017.png +3 -0
- output/png/INV-2026-0018.png +3 -0
- output/png/INV-2026-0019.png +3 -0
- output/png/INV-2026-0020.png +3 -0
- output/png/INV-2026-0021.png +3 -0
- output/png/INV-2026-0022.png +3 -0
- output/png/INV-2026-0023.png +3 -0
- output/png/INV-2026-0024.png +3 -0
- output/png/INV-2026-0025.png +3 -0
- output/png/INV-2026-0026.png +3 -0
- output/png/INV-2026-0027.png +3 -0
- output/png/INV-2026-0028.png +3 -0
- output/png/INV-2026-0029.png +3 -0
- output/png/INV-2026-0030.png +3 -0
- output/png/INV-2026-0031.png +3 -0
- output/png/INV-2026-0032.png +3 -0
- output/png/INV-2026-0033.png +3 -0
- output/png/INV-2026-0034.png +3 -0
- output/png/INV-2026-0035.png +3 -0
- output/png/INV-2026-0036.png +3 -0
- output/png/INV-2026-0037.png +3 -0
- output/png/INV-2026-0038.png +3 -0
- output/png/INV-2026-0039.png +3 -0
- output/png/INV-2026-0040.png +3 -0
- output/png/INV-2026-0041.png +3 -0
- output/png/INV-2026-0042.png +3 -0
- output/png/INV-2026-0043.png +3 -0
- output/png/INV-2026-0044.png +3 -0
- output/png/INV-2026-0045.png +3 -0
- output/png/INV-2026-0046.png +3 -0
- output/png/INV-2026-0047.png +3 -0
DATASET_CARD.md
CHANGED
|
@@ -43,7 +43,8 @@ Five open-weight models. Four architectures. The best one scored 83%. The larges
|
|
| 43 |
| Component | Path | Format | Count |
|
| 44 |
|---|---|---|---|
|
| 45 |
| Invoices (text) | `output/invoices/` | Markdown | 200 |
|
| 46 |
-
| Invoices (visual) | `output/pdf/` | PDF | 200 |
|
|
|
|
| 47 |
| Ground truth | `output/ground_truth/` | JSON | 200 |
|
| 48 |
| Manifest | `output/manifest.csv` | CSV | 1 |
|
| 49 |
| Distribution summary | `output/summary.json` | JSON | 1 |
|
|
@@ -142,7 +143,7 @@ A plain-text rendering of a European B2B invoice. Company names are fictional (P
|
|
| 142 |
|
| 143 |
### Invoice (PDF)
|
| 144 |
|
| 145 |
-
The same invoice, rendered as a styled single-page PDF with a line-item table, header block, and summary section. German number formatting (`1.234,56`), Swiss formatting (`1'234.56`), and English formatting (`1,234.56`) are all preserved visually — the model must read the numbers from the rendered document, not from parsed text.
|
| 146 |
|
| 147 |
Use the PDF versions to benchmark multimodal and vision-language models on document understanding. The text versions test reading comprehension; the PDF versions test whether the model can extract the same information when it has to *see* the invoice instead of *read* it.
|
| 148 |
|
|
|
|
| 43 |
| Component | Path | Format | Count |
|
| 44 |
|---|---|---|---|
|
| 45 |
| Invoices (text) | `output/invoices/` | Markdown | 200 |
|
| 46 |
+
| Invoices (visual, PDF) | `output/pdf/` | PDF | 200 |
|
| 47 |
+
| Invoices (visual, PNG) | `output/png/` | PNG | 200 |
|
| 48 |
| Ground truth | `output/ground_truth/` | JSON | 200 |
|
| 49 |
| Manifest | `output/manifest.csv` | CSV | 1 |
|
| 50 |
| Distribution summary | `output/summary.json` | JSON | 1 |
|
|
|
|
| 143 |
|
| 144 |
### Invoice (PDF)
|
| 145 |
|
| 146 |
+
The same invoice, rendered as a styled single-page PDF (and converted to 200 DPI PNG) with a line-item table, header block, and summary section. The PNG versions are the recommended input for vision models — most inference engines (including Ollama) accept PNG/JPG but not PDF. German number formatting (`1.234,56`), Swiss formatting (`1'234.56`), and English formatting (`1,234.56`) are all preserved visually — the model must read the numbers from the rendered document, not from parsed text.
|
| 147 |
|
| 148 |
Use the PDF versions to benchmark multimodal and vision-language models on document understanding. The text versions test reading comprehension; the PDF versions test whether the model can extract the same information when it has to *see* the invoice instead of *read* it.
|
| 149 |
|
README.md
CHANGED
|
@@ -43,7 +43,8 @@ Five open-weight models. Four architectures. The best one scored 83%. The larges
|
|
| 43 |
| Component | Path | Format | Count |
|
| 44 |
|---|---|---|---|
|
| 45 |
| Invoices (text) | `output/invoices/` | Markdown | 200 |
|
| 46 |
-
| Invoices (visual) | `output/pdf/` | PDF | 200 |
|
|
|
|
| 47 |
| Ground truth | `output/ground_truth/` | JSON | 200 |
|
| 48 |
| Manifest | `output/manifest.csv` | CSV | 1 |
|
| 49 |
| Distribution summary | `output/summary.json` | JSON | 1 |
|
|
@@ -142,7 +143,7 @@ A plain-text rendering of a European B2B invoice. Company names are fictional (P
|
|
| 142 |
|
| 143 |
### Invoice (PDF)
|
| 144 |
|
| 145 |
-
The same invoice, rendered as a styled single-page PDF with a line-item table, header block, and summary section. German number formatting (`1.234,56`), Swiss formatting (`1'234.56`), and English formatting (`1,234.56`) are all preserved visually — the model must read the numbers from the rendered document, not from parsed text.
|
| 146 |
|
| 147 |
Use the PDF versions to benchmark multimodal and vision-language models on document understanding. The text versions test reading comprehension; the PDF versions test whether the model can extract the same information when it has to *see* the invoice instead of *read* it.
|
| 148 |
|
|
|
|
| 43 |
| Component | Path | Format | Count |
|
| 44 |
|---|---|---|---|
|
| 45 |
| Invoices (text) | `output/invoices/` | Markdown | 200 |
|
| 46 |
+
| Invoices (visual, PDF) | `output/pdf/` | PDF | 200 |
|
| 47 |
+
| Invoices (visual, PNG) | `output/png/` | PNG | 200 |
|
| 48 |
| Ground truth | `output/ground_truth/` | JSON | 200 |
|
| 49 |
| Manifest | `output/manifest.csv` | CSV | 1 |
|
| 50 |
| Distribution summary | `output/summary.json` | JSON | 1 |
|
|
|
|
| 143 |
|
| 144 |
### Invoice (PDF)
|
| 145 |
|
| 146 |
+
The same invoice, rendered as a styled single-page PDF (and converted to 200 DPI PNG) with a line-item table, header block, and summary section. The PNG versions are the recommended input for vision models — most inference engines (including Ollama) accept PNG/JPG but not PDF. German number formatting (`1.234,56`), Swiss formatting (`1'234.56`), and English formatting (`1,234.56`) are all preserved visually — the model must read the numbers from the rendered document, not from parsed text.
|
| 147 |
|
| 148 |
Use the PDF versions to benchmark multimodal and vision-language models on document understanding. The text versions test reading comprehension; the PDF versions test whether the model can extract the same information when it has to *see* the invoice instead of *read* it.
|
| 149 |
|
experiment-notes-07.md
CHANGED
|
@@ -17,6 +17,8 @@ Three sizes, one vendor, one architecture lineage:
|
|
| 17 |
|
| 18 |
All three are multimodal — they natively accept image input. Vision capabilities survive GGUF quantisation (requires mmproj projector file alongside the model).
|
| 19 |
|
|
|
|
|
|
|
| 20 |
### Quantisation levels
|
| 21 |
For each model, test at:
|
| 22 |
|
|
@@ -36,16 +38,23 @@ This is **weight quantisation** — the model's learned parameters are stored at
|
|
| 36 |
Weight quantisation is permanent: you download a smaller file, it loads into less memory, and every inference uses the compressed weights. KV cache quantisation is dynamic: the model weights stay full precision, but the memory of the conversation is compressed on the fly. They solve different problems. Weight quantisation = "make the model smaller." KV cache quantisation = "make the conversation cheaper." They can be combined.
|
| 37 |
|
| 38 |
### Input format
|
| 39 |
-
The 200 existing synthetic invoices from article 06, rendered as
|
| 40 |
|
| 41 |
-
-
|
| 42 |
-
-
|
| 43 |
-
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
|
|
|
| 47 |
- All with the same cent-perfect ground truth from article 06
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
### Evaluation conditions
|
| 50 |
Same two conditions as article 06:
|
| 51 |
- **Autopilot:** model sees the image, reports the total
|
|
@@ -200,8 +209,8 @@ Why this matters for the article: the reader who reads "quantisation makes AI ch
|
|
| 200 |
|
| 201 |
## Open Questions
|
| 202 |
|
| 203 |
-
1. **Rendering script:** How to convert Markdown invoices to styled PDFs/PNGs?
|
| 204 |
-
2. **Ollama vision support:**
|
| 205 |
3. **MoE quantisation quality:** Research says "expert-shift" can corrupt routing. Is this observable on invoices? The German comma disaster from article 06 could get worse if the routing sends German-formatted numbers to the wrong expert.
|
| 206 |
4. **Benchmark harness:** Can we adapt `run_benchmark.py` from article 06? Need to add image input path, keep everything else (scoring, CSV output, conditions B and C).
|
| 207 |
5. **Timeline:** Rendering script → test runs on 10 invoices → full runs → analysis → article. Two weekends?
|
|
|
|
| 17 |
|
| 18 |
All three are multimodal — they natively accept image input. Vision capabilities survive GGUF quantisation (requires mmproj projector file alongside the model).
|
| 19 |
|
| 20 |
+
**Important: Ollama only accepts PNG, JPG, and WebP as image input. Not PDF.** This is an Ollama limitation, not a model limitation — the Gemma 4 vision encoder works on pixel data, so any raster image format works, but Ollama's API doesn't handle PDF-to-image conversion. Invoices must be converted to PNG before being fed to the model. The PDF versions exist for distribution (HuggingFace dataset) and for other inference engines that might handle PDFs natively. For our Ollama-based benchmark, the pipeline is: Markdown → PDF (styled rendering) → PNG (for the model).
|
| 21 |
+
|
| 22 |
### Quantisation levels
|
| 23 |
For each model, test at:
|
| 24 |
|
|
|
|
| 38 |
Weight quantisation is permanent: you download a smaller file, it loads into less memory, and every inference uses the compressed weights. KV cache quantisation is dynamic: the model weights stay full precision, but the memory of the conversation is compressed on the fly. They solve different problems. Weight quantisation = "make the model smaller." KV cache quantisation = "make the conversation cheaper." They can be combined.
|
| 39 |
|
| 40 |
### Input format
|
| 41 |
+
The 200 existing synthetic invoices from article 06, rendered as styled PDFs and converted to PNG (200 DPI) for model input. Three formats exist in the dataset:
|
| 42 |
|
| 43 |
+
- **Markdown** (`output/invoices/`) — plain text, used in article 06
|
| 44 |
+
- **PDF** (`output/pdf/`) — styled single-page documents with tables, headers, formatted numbers
|
| 45 |
+
- **PNG** (`output/png/`) — 200 DPI raster images converted from PDF, actual input to Ollama
|
| 46 |
+
|
| 47 |
+
Visual properties preserved across formats:
|
| 48 |
+
- Table vs paragraph layout from the original corpus
|
| 49 |
+
- German/Swiss/English number formatting preserved visually
|
| 50 |
- All with the same cent-perfect ground truth from article 06
|
| 51 |
|
| 52 |
+
Future variation (not yet implemented):
|
| 53 |
+
- Multiple visual templates (3-5 styles)
|
| 54 |
+
- Different fonts
|
| 55 |
+
- Slight rotation (simulating a scan)
|
| 56 |
+
- Lower resolution variants (simulating a phone photo)
|
| 57 |
+
|
| 58 |
### Evaluation conditions
|
| 59 |
Same two conditions as article 06:
|
| 60 |
- **Autopilot:** model sees the image, reports the total
|
|
|
|
| 209 |
|
| 210 |
## Open Questions
|
| 211 |
|
| 212 |
+
1. ~~**Rendering script:** How to convert Markdown invoices to styled PDFs/PNGs?~~ **DONE.** ReportLab for MD→PDF, pdf2image/poppler for PDF→PNG. 200 PDFs + 200 PNGs generated. Single visual template for now — multiple templates are a future extension.
|
| 213 |
+
2. ~~**Ollama vision support:**~~ **RESOLVED.** Ollama supports Gemma 4 multimodal. Syntax: pass PNG/JPG file paths in the `images` field of the API call or drag files in interactive mode. **PDFs are NOT accepted** — must convert to PNG first. The Python API: `ollama.chat(model='gemma4:e4b', messages=[{'role': 'user', 'content': '...', 'images': ['path.png']}])`.
|
| 214 |
3. **MoE quantisation quality:** Research says "expert-shift" can corrupt routing. Is this observable on invoices? The German comma disaster from article 06 could get worse if the routing sends German-formatted numbers to the wrong expert.
|
| 215 |
4. **Benchmark harness:** Can we adapt `run_benchmark.py` from article 06? Need to add image input path, keep everything else (scoring, CSV output, conditions B and C).
|
| 216 |
5. **Timeline:** Rendering script → test runs on 10 invoices → full runs → analysis → article. Two weekends?
|
output/png/INV-2026-0001.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0002.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0003.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0004.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0005.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0006.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0007.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0008.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0009.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0010.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0011.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0012.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0013.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0014.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0015.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0016.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0017.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0018.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0019.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0020.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0021.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0022.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0023.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0024.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0025.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0026.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0027.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0028.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0029.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0030.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0031.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0032.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0033.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0034.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0035.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0036.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0037.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0038.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0039.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0040.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0041.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0042.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0043.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0044.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0045.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0046.png
ADDED
|
Git LFS Details
|
output/png/INV-2026-0047.png
ADDED
|
Git LFS Details
|