AfriqueQwen3.5 4B 50Langs Instruct + tool calling (v8)
McGill-NLP/AfriqueQwen3.5-4B-50Langs-Instruct-v1 with a LoRA that teaches it to call tools. The published AfriqueQwen checkpoints see tool schemas (their chat template is Qwen3.5's) but never call them; with this LoRA the model calls them.
It is not tied to the tools it was trained on. It reads the schemas it is given: on tools it never saw (weather, currency conversion, reminders, table booking) it picks the right tool with the right arguments in all ten African languages we measured and in English, better than Qwen3.5 4B itself (below). Pass your own tools through the chat template as usual.
v8 also follows multi-step flows it never saw. v5 was trained on one furniture store and could not do a booking in several steps (check availability, ask the name, confirm, book). v8 adds multi-step booking flows in five other domains, in English and the ten languages, with the restaurant held out: on the held-out restaurant flow it goes from 0 of 10 (v5) to 10 of 10 on written text and 7 of 7 on the caller lines as the ASR heard them (below), with the store and the unseen single tools unchanged.
It is the LLM of the hybrid-african profile of mynah-s2s
(make hybrid-african-setup && make hybrid-african): turn-taking ears + Omni CTC v2 ASR, this model, and AfricaTTS
or our phoneme Pocket TTS (pocket-tts-phonemes-africa).
Files: a merged model, not an adapter
The LoRA (rank 16 on every attention and MLP projection: q/k/v/o/gate/up/down_proj) is merged into the weights:
model.safetensors is the full 4B model in bf16 (about 8 GB). Use it like any Qwen3.5 checkpoint, no peft needed;
tools go through the chat template's tools= argument as usual (thinking off). The adapter alone (some tens of MB)
is not published yet. Training script: scripts/train_africa_tools_lora.py in the repository (it merges at the end).
Training
- Data (
--data v8): the v5 store dialogues (hybrid/lab/african/sft_data.py: 84 synthetic cases of a small furniture store in Swahili, Shona and Luganda: price, delivery, goodbye; greeting first; order lookup then a return with confirmation; escalation; out of scope; five toolssearch_catalog,find_customer,prepare_return,commit_return,escalate_to_human; the store backend's own result formats; the store's system prompt on half of the cases) plus 116 multi-step booking flows (hybrid/lab/african/flows.py: five domains, each its own tools: check, ask the name, confirm, book, give the code; the restaurant held out) in English and the ten languages, translated with AfriqueQwen3.5 9B Instruct and kept only when the back-translation matches. 200 training examples, 72 held out. Written by the maintainers, not reviewed by native speakers. - 700 steps, lr 1e-4, rank 16, bf16, Qwen3.5 chat template with thinking off, from
AfriqueQwen3.5-4B-50Langs-Instruct-v1 (
scripts/train_africa_tools_lora.py --data v8). - Earlier: v5 (tag
v5), the store dialogues alone, 600 steps.
Evaluation
Small samples, measured in mynah-s2s: read them as comparisons, not benchmark scores.
Tools it never saw. Weather, currency conversion, reminders and table booking, plus the store's search_catalog
as a distractor and requests that need no tool. 12 English requests translated into ten African languages
(AfriqueQwen3.5 9B Instruct, kept only when the back-translation matches): 129 cases, a neutral assistant system
prompt. Only arguments explicit in the request are checked (city, amount and currency codes, time, number of people).
| tool choice | exact arguments | no tool when none is needed | |
|---|---|---|---|
| base Instruct v1 (no LoRA) | 0 | 0 | 1.0 |
| Qwen3.5 4B | .92 | .91 | 1.0 |
| v5 | 1.0 | 1.0 | .97 |
| this model (v8) | 1.0 | 1.0 | .97 |
Every language scored 1.0 on tool choice: sw, sn, lg (trained) and zu, xh, ha, ig, yo, rw, am, en (never trained).
Why a LoRA and not weight arithmetic. We also tried to move Qwen's own tool calling onto AfriqueQwen without any training (a "chat vector": AfriqueQwen + alpha x (Qwen3.5-4B - Qwen3.5-4B-Base)). Qwen's post-training delta is spread over every module (about 5-7% of each weight tensor), while the African continued pre-training moved the weights about four times more, in a nearly orthogonal direction. Added to the 50Langs base model, the delta brings tool calls back in English (9 of 9) but only partly in the African languages (unseen tools .48 at best, store tools .23); added to the Instruct model it changes nothing (0). The small LoRA is much better: 1.0 on both.
Store tools, held out. Other products, phrasings and customers than in training (the v5 held-out split, 72 cases), with the store's system prompt:
| tool choice | exact arguments | no-tool turns | final F1 | final in the session's language | |
|---|---|---|---|---|---|
| base Instruct v1 (no LoRA) | 0 | 0 | 1.0 | ||
| v5 | 1.0 | .67 | .98 | .89 | .98 |
| this model (v8) | 1.0 | .78 | 1.0 | .89 | .98 |
The arguments that differ are mostly catalogue queries worded differently from the reference.
Served end to end (mynah-s2s: a three-line store call, the caller spoken by AfricaTTS, heard by Omni CTC v2 3B, answered with native tool calls, spoken by AfricaTTS): in four runs of the ten languages, 37 of 40 calls pass (Shona twice and Hausa once answered the first turn without the tool); those runs used v5. With the smaller Omni 1B int4 (the stack's default) v5 and v8 are equal in the same served store call: 29 and 28 of 40.
Served calls with tools it never saw (v5; mynah-s2s demo scenarios, caller lines translated into the ten languages, one run of the ten): weather in two cities 9 of 10, travel (currency conversion, then the weather; live APIs) 8 of 10, restaurant booking in several steps 0 of 10. The e2e caller samples are public: gabrione/mynah-s2s-e2e-samples. With the smaller Omni CTC v2 1B int4 (the stack's default since) the same served runs give store 8 of 10, weather 7 of 10, travel 8 of 10, restaurant 0 of 10.
Multi-step flows and where the served failures come from. The same caller lines replayed offline through the model, as written, as the ASR heard them (the recorded callers transcribed by Omni), and in English:
| scenario | v8: written / as heard / English | v5: written / as heard / English | Qwen3.5-4B: written / as heard / English |
|---|---|---|---|
| weather (two cities) | 10/10 ยท 8/10 ยท 1/1 | 10/10 ยท 7/10 ยท 1/1 | 9/10 ยท 6/10 ยท 1/1 |
| travel (convert, then weather) | 10/10 ยท 7/9 ยท 1/1 | 10/10 ยท 6/9 ยท 1/1 | 3/10 ยท 3/9 ยท 1/1 |
| restaurant (check, name, confirm, book; held out) | 10/10 ยท 7/7 ยท 1/1 | 0/10 ยท 0/7 ยท 1/1 | 0/10 ยท 0/7 ยท 0/1 |
On written text the model handles weather and travel in every language, far better than the base Qwen3.5-4B (travel 10 of 10 against 3 of 10); the turns lost in served calls are ASR errors on foreign city names and amounts ("five hundred dollars" heard as 5). Local and foreign cities score the same on written text. The restaurant flow works in English but not in the African languages: the model books without checking availability, or asks again for what the caller said: that is v5; v8, trained on booking flows of other domains, follows it. The store's return flow (verify the customer by name and postcode, then return an item) fails served in all ten languages because the ASR mishears the English name and the postcode digits; the model then refuses the return as its policy says.
Limits
- Requests in the unseen-tools check are simple, single-turn and explicit; ambiguous requests, several tools in one dialogue and nested arguments are not measured.
- The multi-step flows were measured offline on one held-out domain (the restaurant); the served restaurant scenario has not been rerun with v8 yet.
- Small synthetic training data; some answers are odd (a delivery answer that asks for a phone number).
- Other versions (not published) were not better: v6 / v7 (the store in more languages) overfitted the training products and became brittle on ASR transcripts; v9 (v8 + city flows with ASR-spelled names) was slightly worse than v8 on every measure.
Licence
CC-BY-4.0, as the base model. Credit: McGill-NLP (AfriqueQwen), Qwen (Qwen3.5).
- Downloads last month
- 115
Model tree for gabrione/afriqueqwen3.5-4b-50langs-instruct-tools
Base model
Qwen/Qwen3.5-4B-Base