<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prateek Sharma</title>
    <description>The latest articles on DEV Community by Prateek Sharma (@pkbros).</description>
    <link>https://dev.to/pkbros</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4159532%2F0de40e34-e1e0-48c7-9091-2ba90dafe551.jpg</url>
      <title>DEV Community: Prateek Sharma</title>
      <link>https://dev.to/pkbros</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pkbros"/>
    <language>en</language>
    <item>
      <title>Stopped pasting grocery list into ChatGPT, Gemma 4 E2B runs it on my GTX 1650</title>
      <dc:creator>Prateek Sharma</dc:creator>
      <pubDate>Mon, 05 Oct 2026 03:28:46 +0000</pubDate>
      <link>https://dev.to/pkbros/stopped-pasting-grocery-list-into-chatgpt-gemma-4-e2b-runs-it-on-my-gtx-1650-29bc</link>
      <guid>https://dev.to/pkbros/stopped-pasting-grocery-list-into-chatgpt-gemma-4-e2b-runs-it-on-my-gtx-1650-29bc</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;We roomies have a group where we put all our grocery expenses. Then someone has to calculate all or we just export the chat to ChatGPT.&lt;br&gt;
Now this project does everything locally using Gemma, no data leaves my machine.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://drive.google.com/file/d/1fyxAYDgL-A6r95QZ81xycEp4yfarhO2W/view?usp=sharing" rel="noopener noreferrer" class="c-link"&gt;
            WAExpenseSplitLocalAI.mp4 - Google Drive
          &lt;/a&gt;
        &lt;/h2&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fssl.gstatic.com%2Fdocs%2Fdoclist%2Fimages%2Fdrive_favicon_2026_32dp.png" width="32" height="32"&gt;
          drive.google.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pkbros" rel="noopener noreferrer"&gt;
        pkbros
      &lt;/a&gt; / &lt;a href="https://github.com/pkbros/WAExpenseSplitLocalAI" rel="noopener noreferrer"&gt;
        WAExpenseSplitLocalAI
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;WAExpenseSplitLocalAI&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Split shared grocery spending without pasting your group's money chats into a cloud chatbot
Paste a WhatsApp export (and/or freeform lines) → a &lt;strong&gt;local open-weight model&lt;/strong&gt; reads every
line → you correct anything in a table → deterministic Python computes who pays whom
No API key, no account, no data leaves your laptop.&lt;/p&gt;
&lt;p&gt;Built with &lt;a href="https://ai.google.dev/gemma" rel="nofollow noopener noreferrer"&gt;Gemma 4 E2B&lt;/a&gt; (Apache 2.0) running locally via
&lt;a href="https://ollama.com" rel="nofollow noopener noreferrer"&gt;Ollama&lt;/a&gt;. Originally made for a Hacktoberfest "Build for a Friend" entry:
month-end grocery splits for roommates, parsed on-device for privacy.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why local&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Grocery + money chats reveal food habits, routines, locations, and financial state.
Pasting them into an online AI sends all of that to someone else's server. Running the
model on your own machine means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private&lt;/strong&gt; — traffic never leaves &lt;code&gt;localhost:11434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free&lt;/strong&gt; — zero per-parse cost, unlimited re-runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline&lt;/strong&gt; — works on hostel WiFi or no WiFi after a one-time ~4.3 GB model…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/pkbros/WAExpenseSplitLocalAI" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The open core is &lt;strong&gt;Gemma 4 E2B&lt;/strong&gt; (&lt;code&gt;gemma4:e2b-it-qat&lt;/code&gt;, 4.3 GB quant) running on my own laptop&lt;br&gt;
through &lt;strong&gt;Ollama&lt;/strong&gt;, with a Streamlit UI and plain Python around it. No API key, no account,&lt;br&gt;
no cloud — inference happens on &lt;code&gt;localhost:11434&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The architecture has one rule: &lt;strong&gt;code owns structure, the model owns meaning, Python owns money.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Code owns structure.&lt;/em&gt; WhatsApp export envelopes (&lt;code&gt;[28/09, 21:30] Name: …&lt;/code&gt;) are peeled
deterministically before the model ever sees them — so a timestamp can never be mistaken
for an amount. (My first version fed raw lines to the model and it solemnly reported
expenses of Rs.28 and Rs.29. Those were the dates.)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Model owns meaning.&lt;/em&gt; One Ollama call per line — I measured that this small model drops
lines when batched, so each line gets its own call. It first lists every amount it sees,
then returns one item per amount; its own count is checked and retried once on mismatch.
Anything still off becomes a visible warning, never a silent patch. Export lines, Hinglish
freeform (&lt;code&gt;Atul ne 220 udhaar bheje aniket ko&lt;/code&gt;), and mixed pastes all go through the same path.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Python owns money.&lt;/em&gt; Totals, equal shares, and minimal who-pays-whom settlements are pure
code. The model never does arithmetic. Members come from the model's own payers — nobody
types a roster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My hardware is the honest part of this story: a GTX 1650 with 4 GB VRAM. Ollama offloads&lt;br&gt;
30 of 36 layers to the GPU and the rest runs on CPU — roughly 10–20 seconds per line.&lt;br&gt;
Not fast, but fully local, and the edit-and-settle table means you verify everything&lt;br&gt;
before money is computed.&lt;/p&gt;

&lt;p&gt;Along the way I deleted a whole regex fallback engine. It felt responsible to have a&lt;br&gt;
"backup parser" — but a silent worse parser producing wrong money splits is worse than no&lt;br&gt;
parser at all. Now if Ollama is down, you get one clear error with the exact commands to&lt;br&gt;
start it. Fail fast beat fallback.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Four things a closed API physically cannot give this project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy where it counts.&lt;/strong&gt; Grocery chats reveal food habits, routines, and who owes
whom — a sketch of your household finances. That should never sit on someone else's
server just to split sabji money. Here it never leaves the laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero marginal cost.&lt;/strong&gt; Month-end splits happen forever; metered tokens would tax every
one. This costs rupees zero after a one-time 4.3 GB download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline by construction.&lt;/strong&gt; Hostel WiFi dies the night before settlement. The split doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real control.&lt;/strong&gt; Apache 2.0 weights I can swap with one &lt;code&gt;.env&lt;/code&gt; line
(&lt;code&gt;gemma4:e2b-it-qat&lt;/code&gt; ↔ &lt;code&gt;gemma4:e2b-it-q4_K_M&lt;/code&gt;), prompt, and ground with deterministic
code around it. Try changing how a hosted chatbot parses &lt;code&gt;Sabji+jeera+maggi --&amp;gt; 40 + 30&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The open approach didn't just match the closed one — for this job it won on every axis&lt;br&gt;
the challenge cares about.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; (Gemma 4 E2B quantized, local via Ollama — the entire parsing core)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Teammate:&lt;/strong&gt; &lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__4159521"&gt;
    &lt;a href="/atulkumar512" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4159521%2F0ed668d9-82c6-44e1-a7aa-6c6169be1407.png" alt="atulkumar512 image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/atulkumar512"&gt;Atul Kumar&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/atulkumar512"&gt;&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
