<?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: Blastted</title>
    <description>The latest articles on DEV Community by Blastted (@darklegends2971).</description>
    <link>https://dev.to/darklegends2971</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%2F4178525%2F24fc255a-1b1a-42df-88ff-6cedf9f8c1e9.png</url>
      <title>DEV Community: Blastted</title>
      <link>https://dev.to/darklegends2971</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darklegends2971"/>
    <language>en</language>
    <item>
      <title>The Sloth's Guide to Support Ticket Triage: Benchmarking Zero-Shot vs. Few-Shot vs. QLoRA on Ollama</title>
      <dc:creator>Blastted</dc:creator>
      <pubDate>Sun, 25 Oct 2026 16:35:45 +0000</pubDate>
      <link>https://dev.to/darklegends2971/the-sloths-guide-to-support-ticket-triage-benchmarking-zero-shot-vs-few-shot-vs-qlora-on-ollama-55i6</link>
      <guid>https://dev.to/darklegends2971/the-sloths-guide-to-support-ticket-triage-benchmarking-zero-shot-vs-few-shot-vs-qlora-on-ollama-55i6</guid>
      <description>&lt;h2&gt;
  
  
  🦥 The Dreaded Chore: Why Humans Shouldn't Triage Support Tickets
&lt;/h2&gt;

&lt;p&gt;October 20 was &lt;strong&gt;International Sloth Day&lt;/strong&gt;, and sloths have life figured out: conserve energy, move with precision, and let the world come to you.&lt;/p&gt;

&lt;p&gt;If you have ever worked in tech support, IT operations, or software engineering, you know there is one daily routine that completely drains your will to live: &lt;strong&gt;manual support ticket triage&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Every morning, hundreds of tickets land in the queue. They range from polite bug reports to ALL-CAPS panic attacks about minor UI glitches, multi-language complaints, and messy copy-pasted stack traces. Someone has to sit there, read every single one, and manually assign:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;category&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;Technical Bug&lt;/code&gt;, &lt;code&gt;Billing&lt;/code&gt;, &lt;code&gt;Account Access&lt;/code&gt;, &lt;code&gt;Security &amp;amp; Compliance&lt;/code&gt;, &lt;code&gt;Feature Request&lt;/code&gt;, &lt;code&gt;General Inquiry&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;urgency&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;Low&lt;/code&gt;, &lt;code&gt;Medium&lt;/code&gt;, &lt;code&gt;High&lt;/code&gt;, &lt;code&gt;Critical&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;department&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;Engineering&lt;/code&gt;, &lt;code&gt;Finance&lt;/code&gt;, &lt;code&gt;Tier-1 Support&lt;/code&gt;, &lt;code&gt;Security&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is monotonous, mentally taxing, and prone to human error when fatigue sets in. &lt;/p&gt;

&lt;p&gt;So for &lt;strong&gt;Hacktoberfest 2026 Week 3&lt;/strong&gt;, I channeled our inner sloth to build &lt;a href="https://github.com/abhas20/LLM-Benchmark" rel="noopener noreferrer"&gt;&lt;strong&gt;Open-Weight LLM Benchmark&lt;/strong&gt;&lt;/a&gt;: an automated, end-to-end local evaluation pipeline and interactive Streamlit dashboard that benchmarks small open-weight language models to take over this chore completely.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⏱️ The Lazy Payoff: What Does This Actually Save?
&lt;/h2&gt;

&lt;p&gt;To qualify for genuine sloth status, an automation has to show a real payoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time Saved:&lt;/strong&gt; Manual human triage takes between &lt;strong&gt;45 to 90 seconds per ticket&lt;/strong&gt;. For an organization receiving 200 tickets daily, that translates to &lt;strong&gt;2.5 to 5 hours of manual triage labor every single day&lt;/strong&gt;. Our fine-tuned local model triages tickets in &lt;strong&gt;~5.4 seconds on local CPU&lt;/strong&gt;—completely hands-free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Prompt Maintenance:&lt;/strong&gt; Rather than writing and maintaining brittle prompt templates with multi-shot examples that consume hundreds of tokens per call, a single compact instruction reliably yields the exact schema.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive Relief:&lt;/strong&gt; No more context-switching between your actual engineering sprint and the ticket queue. Support escalations route immediately to the right team without human delay.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔓 Why Open Innovation &amp;amp; Local Weights Matter
&lt;/h2&gt;

&lt;p&gt;Why not just ping a closed cloud API like GPT-4o or Claude? When building operational automations for real companies, closed models create three major friction points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data Privacy &amp;amp; Compliance (Zero Data Leaks):&lt;/strong&gt; Support tickets contain sensitive customer data—billing invoice IDs, email addresses, internal stack traces, and security breach reports. Sending this data across third-party cloud APIs triggers GDPR, HIPAA, and SOC-2 compliance hurdles. Running open-weight models locally with &lt;strong&gt;Ollama&lt;/strong&gt; ensures customer data &lt;strong&gt;never leaves your private network&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero API Cost &amp;amp; Predictable Infrastructure:&lt;/strong&gt; Cloud API token bills accumulate rapidly as ticket volume spikes. Open weights run on hardware you already own with zero per-token inference charges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weight Sovereignty &amp;amp; Custom Domain Adaptation:&lt;/strong&gt; You cannot fine-tune closed frontier models cheaply or alter their internal representation of business rules. With open weights (&lt;strong&gt;Meta's Llama 3.2 3B Instruct&lt;/strong&gt;), we can train LoRA adapters using &lt;strong&gt;Unsloth&lt;/strong&gt; in 15 minutes on a free Google Colab T4 GPU, bake operational SLA boundaries directly into the model weights, and export a 2.0 GB quantized GGUF (&lt;code&gt;Q4_K_M&lt;/code&gt;) file.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚧 The Engineering Bottlenecks with Small Base Models
&lt;/h2&gt;

&lt;p&gt;When testing off-the-shelf small language models (1B–3B parameters) for automated ticket triage, we hit three immediate production roadblocks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unreliable Structured Outputs (JSON Failures):&lt;/strong&gt; Off-the-shelf instruction models love to chat. They wrap their answers in conversational filler (&lt;code&gt;"Sure! Here is the JSON you requested: \&lt;/code&gt;&lt;code&gt;\&lt;/code&gt;json..."`), breaking downstream automated webhooks and parsers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The "Tone vs. Reality" Trap (Urgency Mismatch):&lt;/strong&gt; Base models confuse &lt;em&gt;loudness&lt;/em&gt; with &lt;em&gt;severity&lt;/em&gt;. When an angry customer writes:
&amp;gt; &lt;em&gt;"🚨 URGENT 911 P0!! CANNOT SLEEP!! Change the button color from indigo to navy blue!"&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Base models routinely classify it as &lt;code&gt;Critical&lt;/code&gt;, when the operational SLA is clearly &lt;code&gt;Low&lt;/code&gt;. Conversely, when a calm researcher submits a clean report leaking SSH keys in an open S3 bucket, base models misclassify it as &lt;code&gt;Low&lt;/code&gt; or &lt;code&gt;Medium&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Few-Shot Token Tax &amp;amp; Latency Penalty:&lt;/strong&gt; Adding 5 few-shot examples to the prompt guides the base model towards better formatting, but it inflates prompt token counts by &lt;strong&gt;4x&lt;/strong&gt; (from 156 tokens to 612 tokens) and adds a severe latency penalty during local CPU inference.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🧪 The Experiment: Zero-Shot vs. 5-Shot vs. QLoRA Fine-Tuned
&lt;/h2&gt;

&lt;p&gt;To solve this, we designed a reproducible benchmark:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Base Model:&lt;/strong&gt; &lt;code&gt;unsloth/Llama-3.2-3B-Instruct-bnb-4bit&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset:&lt;/strong&gt; 1,200 custom-engineered customer support tickets split into:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;data/finetune_train_1000.csv&lt;/code&gt; (1,000 training rows in ChatML format)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;data/benchmark_test_200.csv&lt;/code&gt; (200 unseen holdout evaluation rows)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adversarial Diversities:&lt;/strong&gt; 30.5% of the evaluation dataset consists of production traps:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Cross-Category Overlap&lt;/em&gt; (e.g., a React &lt;code&gt;TypeError&lt;/code&gt; crash while clicking a Billing button)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Urgency Mismatch&lt;/em&gt; (Priority Inflation vs. Calm Criticals)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Noisy Typos &amp;amp; Hinglish/Multilingual&lt;/em&gt; (&lt;em&gt;"bro wtf yaar 😭 my acount got debited 2 times... paisa kat gaya bank se"&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Adversarial Traps&lt;/em&gt; (Tickets containing embedded JSON error logs designed to break &lt;code&gt;json.loads()&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-Tuning:&lt;/strong&gt; Parameter-efficient fine-tuning (QLoRA) using &lt;strong&gt;Unsloth&lt;/strong&gt; and Hugging Face &lt;strong&gt;TRL (&lt;code&gt;SFTTrainer&lt;/code&gt;)&lt;/strong&gt; with rank $r=16$, $\alpha=16$, targeting all projection modules (&lt;code&gt;q, k, v, o, gate, up, down&lt;/code&gt;). Crucially, we used &lt;code&gt;train_on_responses_only&lt;/code&gt; to mask loss solely to the assistant's strict JSON response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Deployment:&lt;/strong&gt; Merged LoRA adapters, converted to &lt;code&gt;Q4_K_M&lt;/code&gt; 4-bit GGUF, and served via &lt;strong&gt;Ollama&lt;/strong&gt; (&lt;code&gt;Modelfile&lt;/code&gt; with &lt;code&gt;temperature 0.0&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏆 Benchmark Results (200 Unseen Holdout Tickets on Local CPU)
&lt;/h2&gt;

&lt;p&gt;We evaluated all three tiers locally via Ollama on the 200 holdout tickets with strict Pydantic v2 validation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model Tier&lt;/th&gt;
&lt;th&gt;Category Macro-F1&lt;/th&gt;
&lt;th&gt;Urgency Macro-F1&lt;/th&gt;
&lt;th&gt;Exact Match (All 3 Fields)&lt;/th&gt;
&lt;th&gt;Strict JSON (&lt;code&gt;json.loads&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Schema Valid&lt;/th&gt;
&lt;th&gt;Avg Latency / Ticket&lt;/th&gt;
&lt;th&gt;Avg Prompt Tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;1. Zero-Shot Base&lt;/strong&gt; (&lt;code&gt;llama3.2:3b&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;61.7%&lt;/td&gt;
&lt;td&gt;47.3%&lt;/td&gt;
&lt;td&gt;41.5%&lt;/td&gt;
&lt;td&gt;10.0%&lt;/td&gt;
&lt;td&gt;96.5%&lt;/td&gt;
&lt;td&gt;6,093.3 ms&lt;/td&gt;
&lt;td&gt;156&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;2. Few-Shot Base (5-Shot)&lt;/strong&gt; (&lt;code&gt;llama3.2:3b&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;72.9%&lt;/td&gt;
&lt;td&gt;60.4%&lt;/td&gt;
&lt;td&gt;57.0%&lt;/td&gt;
&lt;td&gt;99.5%&lt;/td&gt;
&lt;td&gt;99.5%&lt;/td&gt;
&lt;td&gt;6,567.8 ms&lt;/td&gt;
&lt;td&gt;612&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;3. QLoRA Fine-Tuned&lt;/strong&gt; (&lt;code&gt;ticket-classifier-ft&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;96.1%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;96.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5,481.3 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;146&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Delta (Fine-Tuned vs Zero-Shot)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+38.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+48.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+55.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+90.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+3.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-612.0 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-10 toks&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Delta (Fine-Tuned vs 5-Shot)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+27.1%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+35.7%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+39.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-1,086.5 ms (-16.5%)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-466 toks (-76.1%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Key Analytical Takeaways
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Eliminating the Wrapper Tax (&lt;code&gt;10.0%&lt;/code&gt; $\rightarrow$ &lt;code&gt;100.0%&lt;/code&gt; Strict JSON):&lt;/strong&gt; In Zero-Shot mode, &lt;code&gt;llama3.2:3b&lt;/code&gt; wrapped 90% of outputs in markdown code blocks or introductory fluff. QLoRA with response-only loss masking forced the model to emit raw, parseable JSON strings 100% of the time without needing regex cleanup or external grammar engines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conquering Tone vs. Reality (&lt;code&gt;47.3%&lt;/code&gt; $\rightarrow$ &lt;code&gt;96.1%&lt;/code&gt; Urgency F1):&lt;/strong&gt; Fine-tuning taught the model operational SLAs instead of surface sentiment matching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed AND Accuracy Win:&lt;/strong&gt; While 5-shot prompting improved Exact Match from 41.5% to 57.0%, it quadrupled prompt tokens and inflated CPU latency. The fine-tuned model achieved &lt;strong&gt;96.5% Exact Match&lt;/strong&gt; while cutting prompt tokens by &lt;strong&gt;76.1%&lt;/strong&gt; and running &lt;strong&gt;1,086 ms faster per ticket&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📸 Visualizing the Results
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Executive Scorecard
&lt;/h3&gt;

&lt;p&gt;The comparative performance overview across all three model tiers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qn8bg9aifwyhwp3e7q1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qn8bg9aifwyhwp3e7q1.png" alt="Executive Scorecard Dashboard" width="800" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Performance Across Edge-Case Diversities
&lt;/h3&gt;

&lt;p&gt;How each model tier handled standard tickets vs. noisy typos, Hinglish, cross-category overlaps, and urgency mismatches:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F70rq0iriyasti2rcy8vj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F70rq0iriyasti2rcy8vj.png" alt="Diversity Edge-Case Breakdown" width="799" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Confusion Matrices
&lt;/h3&gt;

&lt;p&gt;Comparing classification confusion between Zero-Shot, 5-Shot, and QLoRA:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faqummcpwen0o2zycm61j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faqummcpwen0o2zycm61j.png" alt="Confusion Matrix Comparision" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🖥️ Interactive Streamlit Dashboard
&lt;/h2&gt;

&lt;p&gt;To make exploring the benchmark intuitive, we built a Streamlit application featuring:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Executive Scorecard:&lt;/strong&gt; High-level macro metrics, latency distributions, and throughput indicators.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confusion Matrices:&lt;/strong&gt; Interactive heatmaps for Category, Urgency, and Department predictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Inspector:&lt;/strong&gt; Filter by failure mode to inspect exact ticket text, ground truth, and what each model predicted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Inference Arena:&lt;/strong&gt; Test live tickets against your local Ollama instance in real-time.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📦 Try It Out &amp;amp; Reproduce
&lt;/h2&gt;

&lt;p&gt;The complete dataset, training notebook, Ollama Modelfile, and evaluation code are open-source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/abhas20/LLM-Benchmark" rel="noopener noreferrer"&gt;abhas20/LLM-Benchmark&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack:&lt;/strong&gt; Python 3.11, Unsloth, Meta Llama 3.2, Ollama, Pydantic v2, Streamlit, Plotly, &lt;code&gt;uv&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy Hacktoberfest, and remember to channel your inner sloth: automate the tedious stuff with open-source AI! 🦥🚀&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
      <category>devchallenge</category>
    </item>
    <item>
      <title>LedgerGone: Local WhatsApp Khata &amp; Receipt Auditor for Kirana Stores using Multimodal Gemma 3 and TigerData</title>
      <dc:creator>Blastted</dc:creator>
      <pubDate>Sun, 18 Oct 2026 12:57:19 +0000</pubDate>
      <link>https://dev.to/darklegends2971/ledgergone-local-whatsapp-khata-receipt-auditor-for-kirana-stores-using-multimodal-gemma-3-and-34hg</link>
      <guid>https://dev.to/darklegends2971/ledgergone-local-whatsapp-khata-receipt-auditor-for-kirana-stores-using-multimodal-gemma-3-and-34hg</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Small Kirana (mom-and-pop grocery) and hardware shopkeepers in India receive dozens of supplier invoices, handwritten paper slips (&lt;em&gt;parchis&lt;/em&gt;), UPI payment screenshots (PhonePe, GPay), and WhatsApp voice notes (&lt;em&gt;"Sharma ji delivered 10 boxes of soap for Rs 4,500, paid 1,500 cash, 3,000 balance pending"&lt;/em&gt;) every day.&lt;/p&gt;

&lt;p&gt;At closing time, tallying up scattered notes is a nightmare. Yet, shopkeepers strongly resist uploading their sensitive margin, customer credit (&lt;em&gt;udhaar&lt;/em&gt;), and tax data to third-party cloud accounting SaaS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LedgerGone&lt;/strong&gt; is a 100% local-first, privacy-preserving Khata and receipt auditor for Kirana and small retail stores. It combines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Gemma 3:&lt;/strong&gt; Ingests receipt photos, handwritten parchis, and WhatsApp voice notes directly (with zero external OCR pipelines) to extract structured line items, GST, payments, and pending balances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TigerData (TimescaleDB + pgvector):&lt;/strong&gt; Stores time-series financial events in partitioned hypertables for cash-flow analytics and indexes line items using pgvector embeddings for semantic natural language inventory search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1-Click WhatsApp Khata Statements:&lt;/strong&gt; Automatically generates polite, audited WhatsApp payment reminders with Click-to-Chat deep links (&lt;code&gt;wa.me&lt;/code&gt;) and downloadable PDF statements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pure CPU Optimization:&lt;/strong&gt; Runs seamlessly on standard laptops without requiring a dedicated GPU.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Why Open Innovation Matters (The "Side Hustle" Edge)
&lt;/h2&gt;

&lt;p&gt;Hacktoberfest Week 2 asks builders: &lt;em&gt;Why does open innovation matter for your project, and why would someone pay for it?&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unit Economics That Actually Work:&lt;/strong&gt; Kirana stores operate on tight 4–8% margins. Traditional AI apps charging per-token cloud API bills destroy the economics of a small business tool. Because Gemma 3 and FastEmbed run locally on the shopkeeper's CPU, the cost to audit a receipt is &lt;strong&gt;₹0.00&lt;/strong&gt;. This enables LedgerGone to be sold as an affordable one-time setup or ₹299/month local utility with 100% gross margins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Absolute Data Sovereignty &amp;amp; Privacy:&lt;/strong&gt; Tax invoices, cash entries, and supplier discounts never leave the merchant's machine. Shopkeepers don't have to worry about data harvesting or tax exposure from cloud accounting providers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Resilience:&lt;/strong&gt; In tier-2/3 Indian cities and rural markets where internet connectivity fluctuates, a local-first system guarantees the shop's counter operations never stall.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  System Architecture
&lt;/h2&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Inputs["Kirana Counter Inputs"]
        A1["📷 Supplier GST Bills"]
        A2["📝 Handwritten Parchis"]
        A3["📱 UPI Screenshots"]
        A4["🎙️ WhatsApp Voice Notes"]
    end

    subgraph AI["Local AI Engine (CPU Optimized)"]
        B1["🧠 Multimodal Gemma 3 (Ollama)"]
        B2["⚡ FastEmbed ONNX (384-dim Vectors)"]
    end

    subgraph Database["TigerData (TimescaleDB + pgvector)"]
        C1[("⏰ TimescaleDB Hypertables&amp;lt;br/&amp;gt;Daily Cash Flow &amp;amp; Time-Series Audit")]
        C2[("🔍 pgvector HNSW Index&amp;lt;br/&amp;gt;Semantic Line Item &amp;amp; Price History")]
    end

    subgraph Outputs["Merchant Actions"]
        D1["📊 Streamlit Web Dashboard"]
        D2["💬 1-Click WhatsApp Khata Reminders"]
        D3["📄 Audited PDF Statements"]
    end

    Inputs --&amp;gt; B1
    B1 --&amp;gt;|Structured JSON| B2
    B2 --&amp;gt;|Vectors &amp;amp; Items| Database
    B1 --&amp;gt;|Audited Ledger| Database
    Database --&amp;gt; D1
    D1 --&amp;gt; D2
    D1 --&amp;gt; D3&lt;/code&gt;&lt;/pre&gt;






&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Direct Multimodal Auditing (No OCR Preprocessing)
&lt;/h3&gt;

&lt;p&gt;Gemma 3's native multimodal capabilities process messy handwritten parchis and thermal receipts directly in a single pass. It extracts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vendor/Party name&lt;/li&gt;
&lt;li&gt;Line items (item, quantity, rate, total)&lt;/li&gt;
&lt;li&gt;GST &amp;amp; tax breakdown&lt;/li&gt;
&lt;li&gt;Paid amount vs. pending &lt;em&gt;udhaar&lt;/em&gt; balance&lt;/li&gt;
&lt;li&gt;Payment mode (UPI / Cash / Credit)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Time-Series Khata Analytics (TimescaleDB Hypertables)
&lt;/h3&gt;

&lt;p&gt;Every audit entry is committed as a hypertable event. LedgerGone uses Timescale's &lt;code&gt;time_bucket('1 day', created_at)&lt;/code&gt; to calculate daily sales, collections, and outstanding credit lines in sub-millisecond queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Semantic Inventory Search with pgvector
&lt;/h3&gt;

&lt;p&gt;Shopkeepers frequently ask questions like &lt;em&gt;"When did we last buy basmati rice and at what rate?"&lt;/em&gt; or &lt;em&gt;"Show me all cement and hardware bills"&lt;/em&gt;. With 384-dimensional vector embeddings stored in TigerData's pgvector index, LedgerGone enables instant semantic similarity matching (&lt;code&gt;&amp;lt;=&amp;gt;&lt;/code&gt; cosine distance).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. 1-Click WhatsApp Reminders &amp;amp; PDF Export
&lt;/h3&gt;

&lt;p&gt;Merchants can select any customer or supplier to generate a polite, formatted WhatsApp summary. Clicking &lt;strong&gt;"Send via WhatsApp"&lt;/strong&gt; opens &lt;code&gt;https://wa.me/&lt;/code&gt; with the pre-filled statement, ready to send. An official PDF Khata statement can also be downloaded with one click.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Language:&lt;/strong&gt; Python 3.12+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Streamlit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vision &amp;amp; NLP:&lt;/strong&gt; Gemma 3 Multimodal (via Ollama)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time-Series &amp;amp; Vector DB:&lt;/strong&gt; TigerData (TimescaleDB PostgreSQL 18 + pgvector)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embeddings:&lt;/strong&gt; FastEmbed (ONNX CPU Runtime, &lt;code&gt;BAAI/bge-small-en-v1.5&lt;/code&gt;, 384 dimensions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF Engine:&lt;/strong&gt; ReportLab&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Partner Track Qualifications
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🏆 Best Use of Gemma ($200):&lt;/strong&gt; Leverages Gemma 3 as an end-to-end multimodal document and voice auditor for Indian retail accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐯 Best Use of Tiger Data ($100):&lt;/strong&gt; Integrates TimescaleDB hypertables for time-series cash flow aggregation alongside pgvector for semantic line-item search.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code &amp;amp; Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/abhas20/LedgerGone" rel="noopener noreferrer"&gt;https://github.com/abhas20/LedgerGone&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hacktoberfest Week 2 Entry:&lt;/strong&gt; #hf26challenge&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Introduction to Open-Weights AI Model</title>
      <dc:creator>Blastted</dc:creator>
      <pubDate>Tue, 13 Oct 2026 04:10:08 +0000</pubDate>
      <link>https://dev.to/darklegends2971/introduction-to-open-weights-ai-model-3i36</link>
      <guid>https://dev.to/darklegends2971/introduction-to-open-weights-ai-model-3i36</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;" Your journey is yours to define, your dreams are yours to pursue, and your story is yours to write. " -- &lt;em&gt;with this let me start my first post&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;This is a new topic I am exploring currently, so decided to share what I understood so far, and will be grateful if you can add or correct me if I am wrong anywhere , so that it will help me as well as any beginner reading this&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Open-Weight AI Model??
&lt;/h2&gt;

&lt;p&gt;An open-weight AI model is an AI model whose trained parameters — called weights — are made available for people to download, run, and sometimes fine-tune for their own applications.&lt;br&gt;
Some Popular open-weights AI model include -- Gemma (By Google DeepMind) , gpt-oss (By OpenAI), Qwen, Llama (By Meta) and many more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SO we can download the weights but how much RAM do we need to run ?&lt;/strong&gt; 
The Formula is :
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WEIGHT Memory (in GB) = (Parameters * Bits per Parameter) / 8

Parameters - No. of Parameters in billions(B) [For example - 4B,8B,70B]
Bits per Parameters - Bits used to store each parameter [For Example - BF16/FP16(16 bits), INT8(8 bits) ]
8 - number of bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Also you need additional memory for &lt;strong&gt;KV Cache and additional Runtime Overhead&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TOTAL MEMORY = WEIGHT MEMORY + KV CACHE MEMORY + RUNTIME OVERHEAD 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So for example, a 7B model in 4-bit quantization has roughly 3.5 GB of theoretical weight storage. But it may require additional space for KV Cache and other overhaed so it may approx to 7-8GB.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is a PARAMETER?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might be familiar with relationship like this in simple ML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Price = w1(Area) + w2(Bedrooms) + b
Here w1,w2 are nothing but parameters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;A parameter is a numerical value inside an AI model that it learns during training. These values help the model recognize patterns, understand language, write code, and generate answers.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Does more parameters mean a smarter AI?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not necessarily. A larger model often has greater capacity to learn complex patterns, but actual performance also depends on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Training data quality and quantity.&lt;/li&gt;
&lt;li&gt;Model architecture.&lt;/li&gt;
&lt;li&gt;Training methods.&lt;/li&gt;
&lt;li&gt;Fine-tuning and reasoning capabilities.&lt;/li&gt;
&lt;li&gt;The task you're asking it to perform.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to run and use a Open-Weight AI model ?
&lt;/h2&gt;

&lt;p&gt;The simplest way is :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download a pre-trained model&lt;/li&gt;
&lt;li&gt;Load it in the memory&lt;/li&gt;
&lt;li&gt;Using the loaded model use an interface to interact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The easiest way to do these is by using ollama , vLLM or any other tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are these tools ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are the engine and the pipeline that allow you to download open-source models (like Llama 3, Qwen, or Mistral) and run/deploy them yourself on your own hardware.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What they actually do?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you install them on a computer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They download the raw brain (the model weights) from open repositories like Hugging Face or the Ollama Library.&lt;/li&gt;
&lt;li&gt;They load that model into your computer's RAM or GPU memory.&lt;/li&gt;
&lt;li&gt;They spin up a local network address (like &lt;a href="http://localhost:11434" rel="noopener noreferrer"&gt;http://localhost:11434&lt;/a&gt; or &lt;a href="http://localhost:8000" rel="noopener noreferrer"&gt;http://localhost:8000&lt;/a&gt;) on your machine.&lt;/li&gt;
&lt;li&gt;Any app you write can now send text to that address, and your computer will generate the response—100% locally, for free, and completely offline.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Ollama vs vLLM&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ollama prioritizes simplicity: It acts like Docker for AI models. It manages the downloading, memory cleanup, and execution behind a very clean interface. It uses llama.cpp under the hood to squeeze models onto consumer hardware.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;vLLM prioritizes raw performance: It uses an advanced memory management algorithm called PagedAttention and Continuous Batching. Instead of processing user requests sequentially (like Ollama mostly does under load), vLLM overlaps incoming queries dynamically, achieving up to 20x–24x higher throughput in multi-user environments&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;HOPE YOU LIKE IT - THIS IS SOMETHING NEW FOR ME TOO - SO WILL BE GRATEFUL IF YOU CAN SHARE YOUR THOUGHTS AND REVIEWS&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
