Run this model with HF Jobs
Run Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-E4B-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Saathi: Hinglish Tool-Calling Assistant (Gemma 4 E4B LoRA)
Model Description
Saathi is a LoRA adapter on Gemma 4 E4B-it that turns it into a phone assistant for Indian users who talk in Hinglish (Hindi + English in Roman script). It understands everyday messy Hinglish and calls the right app tool with the right arguments: UPI payments, recharges, train PNR, cabs, food, alarms, weather, cricket score and more.
- Base model:
unsloth/gemma-4-E4B-it-unsloth-bnb-4bit(Gemma 4 E4B instruct, 4-bit) - Method: QLoRA, rank 64, alpha 16, rsLoRA, all attention + MLP layers
- Language: Roman-script Hinglish (handles some Devanagari)
- Tools: 39 Indian phone-app tools (see
tools.json) - Trained in stages: Hinglish chat first (H1), then tool calling (T1), then a fix round for multi-task requests and "ask before guessing"
What it can do
π€ meri PNR 4521873906 check kar
π€ check_pnr_status(pnr_number="4521873906")
π€ Ticket confirm hai β
Coach B2, berth 34.
π€ Andheri station ka rasta dikha
π€ navigate_to(destination="Andheri station")
π€ Andheri station 9.5 km hai, 24 minute lagenge π
π€ kal ki train booking check kar
π€ Haan, PNR number kya hai?
π§ Model Lineage
Gemma 4 E4B-it β H1 (Hinglish conversation LoRA) β T1 (tool calling) β T1-fix (this adapter).
If you use or build on this model, a link back to this page is appreciated π
Results
Scores on my own held-out Hinglish test sets (higher is better). "Plain Gemma" = same base model, same prompt, no adapter.
| Test set | Saathi (this) | Plain Gemma 4 E4B |
|---|---|---|
| realchat (real-style messages) | 89.7 | 80.9 |
| single tool call | 85.5 | 73.4 |
| holdout single | 87.5 | 59.4 |
| multi-turn | 91.4 | 73.3 |
| holdout multi-turn | 92.9 | 64.3 |
| breakit (tricky inputs) | 83.6 | 65.0 |
| breakit2 (tricky inputs) | 74.0 | 61.6 |
| two tasks in one message | 50% | 60% |
| asks when detail is missing (breakit) | 66.2 | 73.8 |
Direct Use
from unsloth import FastModel
from peft import PeftModel
import json, torch
model, proc = FastModel.from_pretrained(
"unsloth/gemma-4-E4B-it-unsloth-bnb-4bit", max_seq_length=8192, load_in_4bit=True,
)
model = PeftModel.from_pretrained(model, "Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora")
FastModel.for_inference(model)
tok = getattr(proc, "tokenizer", proc)
tools = json.load(open("tools.json")) # download from this repo
system = (
"You are Saathi, a helpful phone assistant for Indian users, made by Vedant Rajpurohit. "
"Users talk in Hinglish (Hindi + English, usually in Roman script).\n"
"Today is Thursday, 2026-12-03.\n"
"If the request can be done with the available tools, call the right tool(s) with correct arguments "
"(dates as YYYY-MM-DD, times as 24-hour HH:MM, amounts as numbers). "
"You may call several tools if the user asks for several things. "
"If a required detail is missing or unclear, ask the user for it instead of guessing. "
"If no tool fits, do not call any tool and just reply normally."
)
messages = [{"role": "system", "content": system},
{"role": "user", "content": "kal subah 6 baje ka alarm laga de"}]
prompt = tok.apply_chat_template(
messages, tools=[{"type": "function", "function": t} for t in tools],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(**ids, max_new_tokens=300, do_sample=False)
print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=False))
Use greedy decoding (do_sample=False). The system prompt above is the one used in training. Keep it, and put today's date in it.
When you send a tool result back, give each tool call an id (call_1, ...) and add the same tool_call_id to the tool message. Without ids the Gemma chat template can mix up which result belongs to which call.
Bias, Risks, and Limitations
This is a research demo. Do not connect it to real payments, bookings or messages without a confirm step.
- It can invent missing values. In live testing, after a few small-talk turns, it sometimes filled a missing detail instead of asking, for example calling
check_pnr_statuswith a word instead of a 10-digit PNR, or sending βΉ1000 when no amount was given. This happened in about 6β7% of tricky test cases (plain Gemma: about 8%). Always check arguments in code (a PNR must be 10 digits, an amount must come from the user) and ask the user "Haan/Nahi?" before any money, booking or message. - Two tasks in one message: it often does only the first task when the two tasks use different tools.
- Vague places: for "Mumbai ka rasta dikhado" it may ask a clarifying question instead of navigating.
- Trained mostly on synthetic, hand-checked Hinglish chats. Real users' spelling, slang and regional mixes can be wider than the training data.
- Saathi speaks with male self-forms ("karta hoon"). It may still slip on gender now and then.
- Tool results in the examples come from fake apps. The model has no real access to any service.
Training Details
- Data: synthetic Hinglish chats, written and checked with scripts (no personal or private chats)
- H1: about 12.7k Hinglish conversation chats
- T1: about 18k tool-calling chats over 39 tools, including multi-turn, contact lookup, refusals and "ask for missing detail" cases
- T1-fix: 4,398 chats, focused on two tasks in one message and asking before guessing
- No test-set items were used in training. Near-duplicates of test items were removed.
Fix-round hyperparameters:
lora_r = 64
lora_alpha = 16
use_rslora = True
lora_dropout = 0
learning_rate = 3e-5
epochs = 1 (550 steps)
batch_size = 1 x grad_accum 8 = 8
max_length = 4,405 tokens
precision = bf16
final train loss β 0.09
Hardware
- Training: 1Γ NVIDIA A100 40GB (Modal), about 75 minutes for the fix round
- Inference: runs on a single T4 16GB in 4-bit
- Downloads last month
- 6
Model tree for Vedant3907/saathi-gemma-4-e4b-hinglish-tools-lora
Base model
google/gemma-4-E4B