A-01 Function Caller

85.3% exact match on 961 held-out requests, up from 74.2%
Phone assistants fail in a particular way: asked for two things, they do one. A-01 maps a spoken request onto seven tools, with every function name and argument in the right order.
The base model already scored 74.2%. Twenty steps of reinforcement learning took it to 85.3% on 961 held-out requests, mostly by learning to finish commands with more than one part.
Run it
Section titled “Run it”The weights are a LoRA adapter on top of Qwen/Qwen3.5-0.8B. Load both with transformers and peft.
-
Install
Terminal window pip install -U transformers peft accelerate -
Load and ask
run.py from transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelbase = "Qwen/Qwen3.5-0.8B"tok = AutoTokenizer.from_pretrained(base)model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(model, "superbird-labs/a-01-function-caller")SYSTEM = open("system_prompt.txt").read() # the prompt belowmessages = [{"role": "system", "content": SYSTEM},{"role": "user", "content": "your input here"}]ids = tok.apply_chat_template(messages, add_generation_prompt=True,enable_thinking=False, return_tensors="pt").to(model.device)out = model.generate(ids, max_new_tokens=512, do_sample=False)print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))
The prompt
Section titled “The prompt”Trained with this exact system prompt. Use it word for word: small models are picky about their instructions.
Current date and time given in YYYY-MM-DDTHH:MM:SS format: 2024-09-15T17:35:19Day of week is SundayYou are a model that can do function calling with the following functions(the 7 tools are passed with tools=: turn_off_flashlight, open_wifi_settings, create_calendar_event, show_map, send_email, turn_on_flashlight, create_contact)Can you please save a new contact for me? The name is Lena Petrova, the phone number is +359 888 123 456, and the email is lena.petrova.design@webmail.com.What it answers with
Section titled “What it answers with”turn_on_flashlight()show_map(query="Sunnyvale Library")Before and after
Section titled “Before and after”Real cases from the held-out set, never seen in training.
Turn on the flashlight and show me the location of the Sunnyvale library on the map.
turn_on_flashlight()
Does the first thing and forgets the map.
turn_on_flashlight() show_map(query="Sunnyvale Library")
Both actions, in the order asked.
Please turn off the flashlight and immediately schedule a calendar event titled 'Call Ana about the proposal' for tomorrow at 3:30 pm.
turn_off_flashlight()
The meeting never gets booked.
turn_off_flashlight() create_calendar_event( title="Call Ana about the proposal", datetime="2025-12-13T15:30:00")
Both actions, with the title and tomorrow at 15:30.
Can you show me where the Wandering Page bookstore is located in Brooklyn?
show_map(query="The Wandering Page bookstore")
Drops "in Brooklyn", so the map can find the wrong shop.
show_map(query="The Wandering Page bookstore in Brooklyn")
Keeps the detail that makes the search right.
The recipe
Section titled “The recipe”| Base model | Qwen/Qwen3.5-0.8B |
| Method | GRPO with LoRA on the Surogate engine |
| Steps | 20 |
| Batch | 32 requests × 8 tries each |
| Answer length | up to 256 tokens |
| Hardware | one 48 GB L40S |
| Time | about 60 minutes |
The data
Section titled “The data”google/mobile-actions (CC-BY-4.0): 8,693 requests to train on, 961 held out, over 7 phone tools.
The reward
Section titled “The reward”Exact match on the ordered list of function names and their arguments, the rule from Google’s own notebook.
Train it yourself
Section titled “Train it yourself”Trained with the open-source Surogate engine (1.5.17 or later), kit phone. Full kit notes: Surogate phone kit.
CUDA_VISIBLE_DEVICES=0 surogate grpo-colocate \ --train examples/kits/phone/train.yaml \ --infer examples/kits/phone/infer.yaml \ --orch examples/kits/phone/orch.yamlThe held-out score shows in the log as Avg@1= and the adapter lands in outputs/kits/phone/. To point it at your data, read Retrain on your data.
The scores
Section titled “The scores”Exact match on 961 held-out requests. More training was not better, so step 20 ships. One run, one seed.
Where it fails
Section titled “Where it fails”- Most of the gain is completion. The base model did one of two requested actions.
- More training was not better: step 40 scored lower than step 20, so step 20 ships.
Where it fits
Section titled “Where it fits”- On-device voice commands. Speech to text in, function calls out, with no server round trip. Small enough to run on a phone.
- App and smart-home intents. Retrain it on your own function list and a few thousand requests.
- Commands with several steps. It completes both halves of “do this, then that”, which is where small models usually stop.

Open small models for every industry, free to run offline. Custom ones for companies.
superbirdlabs.com Custom models Hugging Face hello@superbirdlabs.com