Analysis updated 2026-05-18
Study how to combine a small language model with a deterministic engine to reduce arithmetic errors.
Build an auditable question-answering system over financial tables that cites the exact source cells.
Reproduce a fine-tuning pipeline for table reasoning trained on a single consumer GPU.
| amandineflachs/grounded-table-sft | 0xhassaan/nn-from-scratch | 3ks/embedoc | |
|---|---|---|---|
| Stars | 0 | 0 | — |
| Language | Python | Python | Python |
| Last pushed | — | — | 2023-06-08 |
| Maintenance | — | — | Dormant |
| Setup difficulty | hard | moderate | hard |
| Complexity | 5/5 | 4/5 | 1/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Full training needs a GPU (tested on a single RTX 3090), though the demo replays saved results on CPU only.
This project tackles a specific weakness in small AI language models: they can read a question about a data table just fine, but they often get the actual arithmetic wrong when comparing numbers across rows and columns. The fix here is to split the work in two. The small model only has to understand what the question is asking and describe that as a structured instruction, like which column to check and what threshold to compare against. A separate, plain deterministic program, code that always follows the same fixed steps, then does the real math and reports back exactly which table cells it looked at to get the answer. The tables in question come from real financial documents, with questions like which line item had the lowest value in one year while staying above a certain level in another year. These are the kinds of questions where a small mistake in comparing numbers leads to a wrong answer that is also hard to check. By having the deterministic engine handle the comparisons and cite the exact cells it read, every answer comes with proof of how it was reached. The results are a big jump: when the small model tried to do the arithmetic itself, it got about 59 percent of test questions right. Handing that step to the deterministic engine instead pushed accuracy up to about 96 percent on a locked test set the model had never seen. There is an honest limitation too: the engine only helps on question types it was specifically trained to recognize, and a safety check falls back to the model's own answer whenever a question falls outside that trained range, so the combined system is never worse than the model alone. The whole model was trained on a single consumer graphics card, an RTX 3090, using a training technique called QLoRA that reduces memory needs. You do not need a GPU just to look at the results, since a demo script replays saved examples on an ordinary computer. The project includes scripts to rebuild the dataset, retrain the model, and reproduce every reported number, and it is released under the MIT license.
A small AI model reads table questions and hands the math to a deterministic engine, which computes answers and cites the exact cells used, lifting accuracy from 59% to 96%.
Mainly Python. The stack also includes Python, PyTorch, QLoRA.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.