Run this model with HF Jobs

Run superbird-labs/a-01-function-caller 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/superbird-labs/a-01-function-caller. 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/superbird-labs/a-01-function-caller 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/superbird-labs/a-01-function-caller. 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/superbird-labs/a-01-function-caller. 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.
File size: 6,978 Bytes
8dcda6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bfbeaeb
 
 
 
8dcda6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bfbeaeb
 
 
 
 
 
 
 
 
 
 
 
 
8dcda6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bfbeaeb
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
base_model: Qwen/Qwen3.5-0.8B
library_name: peft
license: apache-2.0
pipeline_tag: text-generation
language:
- en
datasets:
- google/mobile-actions
tags:
- grpo
- lora
- reinforcement-learning
- small-model
- on-device
- superbird-labs
model-index:
- name: a-01-function-caller
  results:
  - task:
      type: text-generation
      name: function calling
    dataset:
      name: google/mobile-actions eval (961 requests)
      type: google/mobile-actions
    metrics:
    - type: exact_match
      name: exact match
      value: 85.3
---

![A-01 Function Caller](https://huggingface.co/superbird-labs/a-01-function-caller/resolve/main/cover.png)

# A-01 · Function Caller

**superbird labs · Agent unit · 0.8B**

> Turns a phone request into the exact function calls, every name and argument in order. It finishes the whole command, not half of it.

[**Watch real runs**](https://huggingface.co/spaces/cetusian/model-hangar)  |  [**Docs and full recipe**](https://docs.superbirdlabs.com/models/a-01/)  |  [**Run it offline**](https://docs.superbirdlabs.com/models/a-01/#run-it)  |  [All superbird models](https://superbirdlabs.com/units)  |  [Custom models for your company](https://superbirdlabs.com/business)

**Open source.** Apache-2.0 weights, the full training recipe and the exact prompt are all public. Use it, ship it, retrain it.

## Spec plate

| | |
|---|---|
| Serial | `A-01` · 0.8B |
| Frame | `DA-24` · Qwen3.5 hybrid · 24 layers in a 3:1 rhythm: 18 gated DeltaNet (fast running memory) + 6 full attention (the deep look back), width 1024 |
| Mission | Turns a phone request ("turn on the flashlight and show me the library on the map") into the exact function calls a phone would run, across seven tools: flashlight, wi-fi settings, calendar, map, email, contacts and more. |
| Held-out requests | 961, the whole eval split |
| Before → after | 74.2% → **85.3%** Exact match |
| Training | 20 GRPO steps · one L40S · ~60 min |
| Recipe | LoRA r16 · 32 requests × 8 rollouts · answers up to 256 tokens · thinking off |
| Datasets | [google/mobile-actions](https://huggingface.co/datasets/google/mobile-actions) (cc-by-4.0), 8,693 training requests |

**Reward:** Google's own exact-match rule: every function name and every argument, in order, or 0. Nothing for half right.

## Where it earns its keep

| | |
|---|---|
| **An on-device voice command layer** | Speech-to-text in, function calls out, no server round trip. Small enough for a phone. |
| **Smart home and app intents** | Same idea, your tools: retrain on your function list and a few thousand requests. |
| **Multi-step commands that finish** | It learned to do both halves of "do x and then y", which is where small callers usually stop. |

## Mission log

Real missions from the held-out set. Same question, before and after training.

**Turn on the flashlight and show me the location of the Sunnyvale library on the map.**

Before training:
```
turn_on_flashlight()
```
*Does the first of two actions.*

After, A-01:
```
turn_on_flashlight()
show_map(query="Sunnyvale Library")
```

**Can you show me where the Wandering Page bookstore is located in Brooklyn?**

Before training:
```
show_map(query="The Wandering Page bookstore")
```
*Drops the location.*

After, A-01:
```
show_map(query="The Wandering Page bookstore in Brooklyn")
```

## Receipts

| | exact match (961 held-out) |
|---|---|
| Base Qwen3.5-0.8B | 74.2% |
| **step 20 (A-01)** | **85.3%** |
| step 40 (longer run) | 83.8%, more training didn't help |

Greedy decoding, same prompt and budget as training, one run. The highlighted checkpoint ships.

**Outside check.** Plain `transformers` + `peft` on the first 48 held-out requests: base 72.9% → 89.6%. Fixed 8, broke 0.

## Scars

What it cost to get here, and what we learned.

- **The base did half the job.** Two actions asked, one done. Most of the gain is it learning to finish the sentence.
- **More steps ≠ better.** Step 40 scored lower. Keep step 20.

## The prompt

Trained with this exact system prompt. Use it word for word: small models are picky.

```text
Current date and time given in YYYY-MM-DDTHH:MM:SS format: 2024-09-15T17:35:19
Day of week is Sunday
You are a model that can do function calling with the following functions

```

Pass the tools with `tools=` in the chat template: `turn_off_flashlight`, `open_wifi_settings`, `create_calendar_event`, `show_map`, `send_email`, `turn_on_flashlight`, `create_contact`.

## Pilot's manual

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B")
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-0.8B", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "superbird-labs/a-01-function-caller")
```

Pass the same seven tools with `tools=` in `apply_chat_template`, `enable_thinking=False`. Or `surogate serve Qwen/Qwen3.5-0.8B` with the adapter loaded at runtime.

## Weak spots

- Seven tools, the dataset's. A new tool needs new rows.
- Dates are relative to the date in the dataset's system prompt.
- Exact match is strict: one extra word in an argument counts as wrong.
- One run, one seed.

## Built with

One GPU and the open-source [surogate engine](https://github.com/invergent-ai/surogate) (Apache-2.0). The whole kit (configs, environment, reward,
walkthrough) is open, so you can rebuild this unit or point it at your own task:
[docs.surogate.ai/engine/examples/kits/phone](https://docs.surogate.ai/engine/examples/kits/phone/).
Also published as [cetusian/mantix-0.8b](https://huggingface.co/cetusian/mantix-0.8b).

## The fleet

| Serial | Unit | Mission | Before → after |
|---|---|---|---|
| `L-01` | [l-01-document-extractor](https://huggingface.co/superbird-labs/l-01-document-extractor) | document → the JSON your schema asks for | 67.6% → 87.8% |
| `L-02` | [l-02-policy-guard](https://huggingface.co/superbird-labs/l-02-policy-guard) | written policy + message → safe / unsafe | 54.4% → 78.1% |
| `L-42` | [l-42-galaxy-guide](https://huggingface.co/superbird-labs/l-42-galaxy-guide) | explains anything, offline | the guide |
| `A-01` | **a-01-function-caller** | phone request → exact function calls | 74.2% → 85.3% |
| `A-02` | [a-02-database-agent](https://huggingface.co/superbird-labs/a-02-database-agent) | questions answered through a live MCP database | 48.4% → 81.5% |
| `A-03` | [a-03-solver](https://huggingface.co/superbird-labs/a-03-solver) | countdown arithmetic, every step written | 1% → 69.5% |

---

*Nobody built a model for it. So we did.*

**[superbirdlabs.com](https://superbirdlabs.com)**: open small models for every industry, free to run offline, and custom models built for companies. [Docs](https://docs.superbirdlabs.com) | [All models](https://huggingface.co/superbird-labs) | [Work with us](https://superbirdlabs.com/business) | hello@superbirdlabs.com