Parakh-4B

Do your finances locally

Visit Repo
Parakh-4B banner

About

## Challenges we ran into

### The "10%" fine-tune My first fine-tuned model scored about 10%, and I thought training had failed. It hadn't. The output grammar I was decoding with didn't match the format the model was trained on. Once I fixed that it jumped to around 75%. I lost half a day to a formatting bug.

### It made up invoice numbers

On simulated data it looked great. Then I tried real invoices, and it was confidently writing invoice numbers that weren't on the page, in my simulator's format. It turned out about a third of my training labels had numbers the model couldn't actually see, so I'd basically taught it to guess. I rewrote the simulator so every supplier has its own realistic numbering and date style, and the made-up numbers on real invoices went to zero.

### Then it got stuck typing zeros

The new formats have a lot of zero padding (like `2627/000045`), and sometimes the model would start writing `0000000…` and never stop. GST law caps invoice numbers at 16 characters (Rule 46), so I put that limit into the output schema. The loop can't happen anymore.

### Shared GPUs at 2am

The training server ran out of RAM because of other users' jobs and stopped responding mid-run. I split the work across three machines and added guards so a run kills itself before it can take the box down.

### Bugs in the tools

I hit bugs in SGLang, AlignTune, CuratorKIT and AuditKIT along the way, fixed them, and sent the fixes upstream as PRs.

## The problem it solves

## The problem

Every month accountants sit with GSTR-2B, the purchase register, bank statements and a pile of invoice PDFs, scans and WhatsApp forwards, matching them row by row to work out how much ITC their client can actually claim. It takes hours, and mistakes mean notices or money left on the table.

## What it does

It does that matching for you. For every invoice it tells you what's claimable now, what has to wait, and what's blocked (like staff food under 17(5), or bills unpaid past 180 days), with the reason for each line. A CA just checks it instead of redoing it.

## How it works

  • **Parakh-4B**, our small fine-tuned model, reads each document into a clean JSON record (GSTIN, invoice number, date, items, tax).
  • **Plain code** does the GST part: matching against 2B, the books and the bank, plus Sections 16(2) and 17(5) and Rules 36 and 37. You can test it and audit it.
  • It runs on **one 16 GB GPU on your own machine**, so client data never goes to a cloud API.

## Results on real documents

54 cases built from real supplier invoices. Every model feeds the same reconciler, so the only difference is how well it reads.

| Reader | Runs where | ITC exact | Match | Composite | Invented IDs ↓ | |---|---|---|---|---|---| | Claude Haiku 5.5 (min. thinking) | Cloud | 84.9 | 88.4 | 86.5 | 8.4% | | GPT-6 luna (reasoning off) | Cloud | 70.6 | 82.5 | 77.9 | 15.4% | | Claude Haiku 4.5 (thinking off) | Cloud | 68.2 | 82.2 | 77.4 | 16.6% | | **Parakh-4B (ours)** | **Your GPU** | **61.1** | **71.5** | **72.9** | **9.7%** |

**What the columns mean**

- **ITC exact**: the share of invoices where we got the credit exactly right. Every amount, eligible, blocked and deferred, for IGST, CGST, SGST and cess, has to be within Rs 1 of the truth. This is the number that matters most. - **Match**: for each invoice, did it find the right purchase-register entry, the right GSTR-2B row and the right bank payment, and raise the right flags (like "unpaid over 180 days")? - **Composite**: one overall score mixing everything. The weights are ITC per invoice 20%, matching 20%, field extraction 25%, total ITC 10%, arithmetic 10%, valid output 10% and ITC reasons 5%. - **Invented IDs** (lower is better): how often the model wrote a GSTIN, invoice number or date that's wrong *and* not on the page at all. In other words, it made it up instead of leaving it blank.

The cloud models are ahead for now. But Parakh-4B is a 4B model trained in a few hours on a hackathon clock, and it already makes up fewer invoice numbers and GSTINs than GPT-6 luna or Haiku 4.5. Most of what it gets wrong is misreading amounts off the page, not the GST logic. That's very fixable with more training time, better algorithms and a better harness.

## How we trained it

  • Qwen3-4B-Instruct with a LoRA adapter, no thinking mode.
  • Trained only on synthetic data from a GST simulator we built: suppliers, invoices in real-world formats, Tally registers, 2B, bank statements, plus messy OCR, emails and WhatsApp text. Real invoices were used only for testing.
  • Supervised fine-tuning first, then GRPO with a reward that penalises made-up identities, trained with AlignTune and SGLang rollouts.

## Where this goes

Small local models, each trained for one financial workflow (GST today, TDS, e-way bills and bank reconciliation next), with the law kept in plain code. Eventually a bigger agent orchestrates these specialists to run financial tasks end to end, on the firm's own hardware.

Screenshots

Parakh-4B screenshot 1Parakh-4B screenshot 2Parakh-4B screenshot 3Parakh-4B screenshot 4Parakh-4B screenshot 5

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.