whatisgithub

What is grounded-table-sft?

amandineflachs/grounded-table-sft — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

In one sentence

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%.

Mindmap

mindmap
  root((repo))
    What it does
      Reads table questions
      Delegates math to code
      Cites exact cells used
    Tech stack
      Python
      QLoRA fine tuning
      Qwen small models
    Use cases
      Financial table QA
      Auditable AI answers
      Research on grounding
    Audience
      Researchers
      ML engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how to combine a small language model with a deterministic engine to reduce arithmetic errors.

USE CASE 2

Build an auditable question-answering system over financial tables that cites the exact source cells.

USE CASE 3

Reproduce a fine-tuning pipeline for table reasoning trained on a single consumer GPU.

What is it built with?

PythonPyTorchQLoRAQwen3

How does it compare?

amandineflachs/grounded-table-sft0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultyhardmoderatehard
Complexity5/54/51/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Full training needs a GPU (tested on a single RTX 3090), though the demo replays saved results on CPU only.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

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.

Copy-paste prompts

Prompt 1
Walk me through how this project separates question comprehension from arithmetic in table question answering.
Prompt 2
Help me run the demo script in this repo to replay saved table QA examples without a GPU.
Prompt 3
Explain the safety gate that falls back to the model's own answer in this grounded table reasoning project.
Prompt 4
Show me how to reproduce the QLoRA fine-tuning pipeline used to train the Qwen3 model here on an RTX 3090.

Frequently asked questions

What is grounded-table-sft?

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%.

What language is grounded-table-sft written in?

Mainly Python. The stack also includes Python, PyTorch, QLoRA.

What license does grounded-table-sft use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is grounded-table-sft to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is grounded-table-sft for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.