qwen3-1.7b-hinglish-fc-v2
Qwen3-1.7B fine-tuned with QLoRA (Unsloth) to turn Hinglish (Latin-script Hindi-English) requests into tool calls
and to ask for missing information with an ask_user tool call. It is also trained to answer in plain text, without
a tool call, when none of the offered tools fits. On the test set it does this for greetings, thanks and general questions (14/14), but on unsupported
requests that resemble an offered tool it usually calls that tool anyway (4/21 declined; see Results).
A 2-day, zero-cost pilot trained on a free Kaggle T4. This is the second run of the same recipe; it adds no-tool and clarification training data to v1. Model, LoRA settings, epochs, learning rate, seed and evaluation sets are identical, so v1 vs v2 is a like-for-like comparison.
Use
Pass the tools with the chat template and turn thinking off; the model answers with <tool_call> blocks:
messages = [{"role": "system", "content": "..."}, {"role": "user", "content": "Rohan ko 500 rupaye bhej do"}]
prompt = tok.apply_chat_template(messages, tools=tools, add_generation_prompt=True, tokenize=False, enable_thinking=False)
Include an ask_user(question) tool so the model can ask for missing details.
Training data (9,200 examples: hinglish_top 3,951, template 3,269, xlam 1,980)
By type: tool_call 6,992, no_tool 1,104, clarify 1,104 (no-tool and clarification each 12%; v1 had 2.0% and 2.3%).
hinglish_top: Hinglish-TOP train split (Google Research, Apache-2.0; human-written), converted to tool calls by code. Arguments are the user's exact words. ItsUNSUPPORTED_*intents are the no-tool turns.template: business-domain turns (banking, ecommerce, telecom, travel). The template strings were written with AI assistance (Claude); code fills them with values and renders the turns. They include clarification turns (missing details, ambiguous references, too-short numbers, vague amounts) and no-tool turns (greetings and thanks, and in-domain requests none of the tools can do).xlam: English examples from Salesforce xLAM function-calling-60k (CC-BY-4.0). 1,500 rows are used unchanged; 480 more are unused xLAM queries paired with another row's tools, chosen so that no tool fits, as no-tool turns.
No machine-translated training data. Dev data was not trained on.
Hyperparameters: {"base_model": "Qwen/Qwen3-1.7B", "method": "QLoRA (Unsloth)", "load_in_4bit": true, "max_seq_length": 3072, "lora_r": 16, "lora_alpha": 32, "lora_dropout": 0.0, "epochs": 2, "learning_rate": 0.0002, "batch_size": 4, "grad_accum": 4, "warmup_ratio": 0.03, "seed": 1234, "loss_on": "assistant reply only", "n_train": 9200, "train_loss": 0.0527, "train_runtime_s": 13630, "train_files": ["train.jsonl", "train_v2_extra.jsonl"], "n_train_by_type": {"tool_call": 6992, "no_tool": 1104, "clarify": 1104}, "pad_token": "<|endoftext|>"}
Results (Hinglish-FC, exact-match scorer, greedy, thinking off)
| Split | Source (turns) | Metric | base | v1 | v2 |
|---|---|---|---|---|---|
| test | all (674) | turn-correct | 27.7% | 70.9% | 73.6% |
| test | all (674) | clarification | 2/53 | 19/53 | 36/53 |
| test | all (674) | no-tool | 34/35 | 10/35 | 18/35 |
| test | all (674) | unneeded clarification | 0.3% | 0.4% | 0.7% |
| test | hinglish_top, human (300) | turn-correct | 8.0% | 59.3% | 60.7% |
| test | hinglish_top, human (300) | no-tool | 20/21 | 0/21 | 4/21 |
| test | hinglish_top, human (300) | unneeded clarification | 0.7% | 0.0% | 0.0% |
| test | template (294) | turn-correct | 46.9% | 86.1% | 85.7% |
| test | template (294) | clarification | 1/29 | 12/29 | 18/29 |
| test | template (294) | no-tool | 6/6 | 6/6 | 6/6 |
| test | template (294) | unneeded clarification | 0.0% | 0.0% | 0.3% |
| test | ai_drafted_reviewed (80) | turn-correct | 25/80 | 47/80 | 62/80 |
| test | ai_drafted_reviewed (80) | clarification | 1/24 | 7/24 | 18/24 |
| test | ai_drafted_reviewed (80) | no-tool | 8/8 | 4/8 | 8/8 |
| test | ai_drafted_reviewed (80) | unneeded clarification | 0/80 | 3/80 | 4/80 |
| test_en | xlam (English) (200) | turn-correct | 69.0% | 78.5% | 77.0% |
| test_en | xlam (English) (200) | unneeded clarification | 0.0% | 0.0% | 0.0% |
| dev | all (504) | turn-correct | 28.4% | 75.4% | 76.2% |
| dev | all (504) | clarification | 0/4 | 4/4 | 4/4 |
| dev | all (504) | no-tool | 10/10 | 1/10 | 4/10 |
| dev | all (504) | unneeded clarification | 1.4% | 0.0% | 0.0% |
Test sources: hinglish_top = 300 human-written turns from the Hinglish-TOP test split; template = turns from
templates never used in training; ai_drafted_reviewed = 80 turns drafted by an AI model (Claude) and reviewed by
the project owner (not hand-written, and possibly easier or differently hard than real user speech).
A turn counts as turn-correct only if the tool, every argument, clarification and no-tool checks all pass.
Groups under 100 turns are shown as counts (e.g. 4/21). Unneeded clarification = ask_user called when it was not
needed, over all turns (lower is better). These numbers are not comparable to other benchmarks.
Limitations
- Calls the nearest tool on unsupported requests outside the domains its no-tool data covers. On
the human-written Hinglish-TOP test turns that no tool can serve, v2 answers without a tool on only 4/21 (base
Qwen3-1.7B: 20/21; v1: 0/21); it calls e.g.
create_timerorget_info_trafficinstead. - Over-asks on spelled-out digits and self-corrections. Turns like "nau aath saat chhe ... pe 239 dalwa do" or
"199 ka.. nahi nahi 299 wala karo" now get an
ask_userquestion or the wrong tool where v1 called the right one. - Latin-script Hinglish only in training. Devanagari appears only in the test set (8 turns: 4 tool calls, 4 clarifications).
- Small samples: 53 clarification and 35 no-tool test turns; differences of a few turns are within noise.
- Two training runs (v1, v2), no hyperparameter search, one seed. Template turns may be easier than real speech. Tools are schemas only; nothing is executed.
Future work
- v3: Hinglish no-tool training data in the Hinglish-TOP domains (timers, navigation, weather, events, music) and turns with spelled-out digits and self-corrections; re-measure over-asking.
- Devanagari and mixed-script training data; larger clarification and no-tool test samples.
- Qwen3-4B; repeated runs with different seeds to measure run-to-run variance.