A small, offline-first assistant for Indian farmers. It answers in Hindi, Marathi, English and Hinglish (Devanagari or Roman script, typed or voice-style), uses tools for anything factual (dates, seasons, weather, mandi prices, schemes), and opens the right page or helpline only after the farmer says yes. It never books, pays, fills forms or handles OTPs: it explains and points the way.
google/gemma-4-E2B-it.| Area | Examples |
|---|---|
| Sowing | what to sow now, is it too late, seed rate, variety choice, seed quality |
| Weather | forecast, spray timing, irrigation timing, frost alert |
| Machinery | tractor choice, rent vs buy, subsidy, stubble, drone spraying |
| Money and schemes | MSP, mandi price, PM-KISAN, KCC loan, fertiliser price, crop-loss claim (PMFBY) |
| Safety | refuses OTP sharing, flags scam calls (1930), won't give pesticide doses (points to KVK / label) |
get_today_context, get_crop_calendar, get_varieties, get_weather, get_mandi_price, recommend_equipment, kb_lookup (12 fixed intents), open_page, open_dialer. Full schemas are in tools.json in the dataset repo. The app supplies the tool results (the phone kit fetches live weather from Open-Meteo); the model never invents numbers.
| Base Gemma 4 E2B | Bharat Sahayak v3 | |
|---|---|---|
| Right tool chosen | 27.3 % (v1 baseline, 200 turns) | 98.9 % |
| Correct arguments | 14.8 % | 95.1 % |
| Replies with invented numbers | 16 / 192 | 0 |
| Consent / OTP / dose violations | — | 0 |
A general tool-calling check on the public BFCL v4 data with its official AST checker (our own inference harness, so not a leaderboard entry) is in bfcl_results.json once run.
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained("joshiyash666/bharat-sahayak-gemma4-e2b", max_seq_length=2048, load_in_4bit=True)
Render with the tokenizer's chat template and pass tools= (schemas in the dataset repo). Stop generation at <turn|> or <|tool_response>, run the tool, append its response, and continue.
On a phone: download the GGUF, run llama-server -m bharat_sahayak.Q4_K_M.gguf --jinja, and use phone_agent.py from the dataset repo.
kb_lookup before refusing a pesticide dose.Apache-2.0. This is a modified version of Gemma 4 E2B (Google DeepMind), fine-tuned with LoRA by Yash Joshi. Gemma is a trademark of Google LLC; this project is not affiliated with or endorsed by Google.
Build on it: new crops, languages, states or tools are welcome. Open a discussion on the Hub.
google/gemma-4-E2B-it