Instructions to use ToolW/desi-agent-tinyaya-rft2-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ToolW/desi-agent-tinyaya-rft2-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global") model = PeftModel.from_pretrained(base_model, "ToolW/desi-agent-tinyaya-rft2-lora") - Notebooks
- Google Colab
- Kaggle
Desi Agent: Stage 2, RFT round 2 (LoRA on Tiny Aya Global)
A LoRA adapter that turns CohereLabs/tiny-aya-global (3.35B) into a tool-calling banking support agent for English, Hindi, Bengali, Hinglish and Banglish. It picks one of 8 banking tools (balance, transactions, block card, dispute, UPI status, transfer, branch finder, loan EMI), fills the arguments exactly, and asks for missing details instead of guessing.
Starting point for both GRPO runs.
- Developed by: Ritankar Mondal and Kanishk Sagar (Team 6ix7even), Lexsi AI Safety & Alignment Hackathon 2026, Track 3
- Model type: LoRA adapter (r=16, all attention and MLP projections), parent: the base model
- Languages: English, Hindi, Bengali (native script and romanized), Hinglish, Banglish
- License: CC-BY-NC-4.0 (inherited from Tiny Aya). Code: MIT
- Code and paper: https://github.com/Nah-I-d-hack/desi-agent
- Demo: Desi Agent Lab (replays the scored test traces)
- All adapters:
-sft·-rft·-rft2·-grpo-mt(final) ·-grpo-mt-seed2
Training
- Data: ToolW/desi-bank-toolcalls. Every gold tool call is generated by code and executed against a mock bank; a Qwen3-14B teacher only writes the customer message and the final reply, so labels are correct by construction. Curated with our language/script gates, CuratorKIT dedup and an LLM checklist judge.
- This adapter: Rejection-sampling fine-tuning, round 2: a second round of reward-selected multi-turn conversations plus 1,148 grounding examples (ask for the missing identifier instead of acting), retrained from the base model. One HF Job on an L40S, about 0.8 h of training.
- Logs, manifests, rollouts: ToolW/desi-agent-training-logs
Evaluation
All numbers: fp16, greedy decoding, every tool call executed against the mock bank, same agent loop as training
(fmt.run_episode). Traces: ToolW/desi-agent-eval-traces.
Stage 2 (this adapter is column 3):
| SFT | RFT 1 | RFT 2 | GRPO 1 (-grpo-mt) |
GRPO 2 (-grpo-mt-seed2) |
|
|---|---|---|---|---|---|
| Language switch: right action and right language (300 conversations) | 34.0% | 52.7% | 66.3% | 74.7% | 78.3% |
| ... switching into English (59) | n/a | 15.3% | 20.3% | 47.5% | 50.8% |
| Same language: right action and language (300) | 81.7% | 87.7% | 93.0% | 93.3% | 93.7% |
| Frozen test: task success (486) | 97.7% | 98.2% | 98.2% | 98.4% | 98.6% |
| Frozen test: wrong bank actions | 1.8% | 1.7% | 1.7% | 1.4% | 1.2% |
| Reworded (OOD, judge-validated) test: task success | 91.8% | 93.7% | 94.2% | 94.2% | 94.5% |
| BANKING77 action requests without details: unsafe action executed | 6.3% | n/a | 0.0% | 0.0% | 0.0% |
How to use
The model was trained on a text-only tool format (<tool_call>{...}</tool_call>, tool results as
<tool_result> user turns) defined in contracts/MODEL_IO.md. Use the
repo's agent loop so the prompt and parsing match training exactly:
git clone https://github.com/Nah-I-d-hack/desi-agent && cd desi-agent
uv venv -p 3.12 && uv pip install -e .
from desi_agent.train.policy import load_policy
from desi_agent import fmt
policy = load_policy("CohereLabs/tiny-aya-global", adapter="ToolW/desi-agent-tinyaya-rft2-lora") # accept the Tiny Aya license on HF first
run = fmt.run_episode(policy, [{"role": "user", "content": "mera card kho gaya, card 4421 block kar do"}])
for m in run.messages:
print(m["role"], m.get("tool_calls") or m.get("content"))
Plain PEFT also works (PeftModel.from_pretrained(base, "ToolW/desi-agent-tinyaya-rft2-lora")), but you must then build the system prompt
with fmt.system_prompt() and render turns with fmt.to_chat() yourself.
Limitations and risks
- Not for real accounts. Trained and tested only against a deterministic mock bank with 8 tools. There is no authentication, authorization or consent check in the model. Do not connect it to real money.
- The in-distribution test is synthetic. The 486-conversation test set comes from the same scenario sampler and teacher as training. Reworded (Aya Expanse 8B) and perturbed-bank tests show smaller drops (91.8% task success on reworded SFT), but no native-speaker-written test set exists yet.
- Known unsafe failure. Asked to block a card without a number, the model sometimes invents
1234and blocks it. Keep a code guard in front of state-changing tools:eval/guard.pylets block / dispute / transfer run only if their identifiers appear in the conversation (BANKING77: 6.3% to 0.4% executed unsafe actions for SFT). - BANKING77 0.0% is partly in-distribution. The grounding examples used 381 BANKING77 train messages.
- Switching into English is still weak (about 48-51% after GRPO).
- No general-capability benchmark was run, so retention of Tiny Aya's general skills is not measured.
- Code-mixed (Hinglish/Banglish) replies are sometimes garbled; the test review was done by an LLM, not by native speakers.
- License: CC-BY-NC-4.0, inherited from Tiny Aya. Non-commercial use only.
Citation
@misc{mondal2026desiagent,
title = {Desi Agent: Code-Labelled Distillation Makes a 3B Model a Safer Multilingual Banking Agent than Its 14B Teacher},
author = {Mondal, Ritankar and Sagar, Kanishk},
year = {2026},
note = {Lexsi AI Safety \& Alignment Hackathon 2026, Stage 2. https://github.com/Nah-I-d-hack/desi-agent}
}
- Downloads last month
- 52