PyTorch
Safetensors
action-model
function-calling
tool-calling
tool-use
non-autoregressive
masked-diffusion
modernbert
shing-dev commited on
Commit
ce76f8d
·
verified ·
1 Parent(s): 19dad3b

Model card: launch voice, launch-film images

Browse files
.gitattributes CHANGED
@@ -36,3 +36,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  assets/arena-mining.jpg filter=lfs diff=lfs merge=lfs -text
37
  assets/how-it-works.jpg filter=lfs diff=lfs merge=lfs -text
38
  assets/latency_vs_output_size.png filter=lfs diff=lfs merge=lfs -text
 
 
 
36
  assets/arena-mining.jpg filter=lfs diff=lfs merge=lfs -text
37
  assets/how-it-works.jpg filter=lfs diff=lfs merge=lfs -text
38
  assets/latency_vs_output_size.png filter=lfs diff=lfs merge=lfs -text
39
+ assets/arena-minecraft.jpg filter=lfs diff=lfs merge=lfs -text
40
+ assets/inside.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -5,13 +5,13 @@ license_link: LICENSE
5
  library_name: pytorch
6
  base_model: answerdotai/ModernBERT-large
7
  tags:
 
8
  - function-calling
9
  - tool-calling
10
  - tool-use
11
  - non-autoregressive
12
  - masked-diffusion
13
  - modernbert
14
- - research
15
  datasets:
16
  - Salesforce/xlam-function-calling-60k
17
  - Team-ACE/ToolACE
@@ -20,60 +20,74 @@ datasets:
20
 
21
  # ActionMan-0.1
22
 
23
- **A 0.4B tool caller that doesn't write JSON.**
24
- - One encoder read picks the tool.
25
- - Masked diffusion fills every argument at once, in two or three passes.
26
 
27
- ActionMan started as a question: decision models answer in milliseconds but can only choose, while LLMs can act but write one token
28
- at a time. Can a decision-style encoder also write the arguments?
29
 
30
- > **Early research preview.**
31
- > - **Speed:** on one RTX 4090 at batch 1 it answers in **17 ms** (p50), where the same-data Qwen3-0.6B served by tuned vLLM takes
32
- > **121 ms**. That is 7x for one call and 16x for three or more.
33
- > - **Accuracy:** it is **less accurate** than that LLM (BFCL v4 Non-Live 66.0 vs 75.7).
34
- > - **Scope:** it is single-turn only, and it is slow on a laptop CPU.
35
- >
36
- > It is fast and well calibrated; it is not a drop-in replacement for an LLM tool caller.
37
 
38
- ![how it works](assets/how-it-works.jpg)
39
 
40
- ## How it works
41
 
42
- - **Encoder:** ModernBERT-large (395M) reads the tools (as compact signatures), the query, and up to four `[CALL]` markers.
43
- - **Decision head:** each marker picks a tool or none, by dot product against the tool-name tokens. A length head sizes each argument.
44
- - **Slot block:** it is appended after the input and filled in parallel by mask-predict. Slots below 0.85 confidence are re-masked;
45
- most requests finish in 2-3 passes. The input is encoded once and cached; the passes run as CUDA graphs.
46
- - **Copy, pick, list:**
47
- - A copy switch points at a span of the query instead of spelling the value.
48
- - Booleans and enums (up to 16 options) are picked from their options.
49
- - Lists get a count head and item slots.
50
 
51
- About 410M unique parameters. The decoder is tied to the embeddings, but it is stored twice in the bf16 file.
 
 
 
 
 
 
 
 
52
 
53
- ## Results
54
 
55
- | BFCL v4, official harness (`bfcl-eval==2026.3.23`) | size | Non-Live | Live | Irrelevance |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  |---|---|---|---|---|
57
  | **ActionMan-0.1** | 0.4B | 66.0 | 45.1 | **81.2** |
58
  | Hammer2.1-0.5b | 0.49B | 65.9 | 54.7 | 80.7 |
59
  | granite-4.0-350m | 0.35B | 67.7 | 46.7 | 61.1 |
60
  | Qwen3-0.6B (FC) | 0.75B | 72.9 | 58.8 | 80.9 |
61
- | Qwen3-0.6B fine-tuned on ActionMan's data | 0.75B | 75.7 | 54.1 | 79.1 |
62
  | Qwen3-1.7B (FC) | 2.0B | 82.7 | 74.7 | 76.8 |
 
63
 
64
- | Latency, batch 1, RTX 4090, 500 BFCL v4 prompts, end to end | p50 | p95 | correct on the 500 |
65
- |---|---|---|---|
66
- | **ActionMan-0.1, compiled** | **17.0 ms** | 28.9 ms | 59.2% |
67
- | Qwen3-0.6B fine-tuned, vLLM 0.11 (tuned) | 121 ms | 347 ms | 68.6% |
68
- | Qwen3-0.6B fine-tuned, llama.cpp Q8_0, GPU | 159 ms | 336 ms | 69.0% |
69
- | 8 server CPU threads: ActionMan fp32 vs llama.cpp Q8_0 | 0.45 s | | 59.0% vs 66.5% |
70
-
71
- ![latency](assets/latency_vs_output_size.png)
72
-
73
- - **The harness** reproduces the public leaderboard for Hammer and granite within 0.25 Non-Live points.
74
- - **No BFCL Overall:** multi-turn and agentic categories were not run.
75
- - **The full report** has per-category scores with confidence intervals, error classes, and our own 2,340-prompt eval:
76
- [docs/results/benchmark.md](https://github.com/shing1Sks/ActionMan/blob/dev/docs/results/benchmark.md).
77
 
78
  ## Usage
79
 
@@ -97,30 +111,14 @@ am.predict("Tell me a joke", tools)
97
  ```
98
 
99
  - **Without pip:** the inference code is also in this repo under `code/actionman/`. Add `code/` to `sys.path`.
100
- - **No call:** an empty list means no tool fits. `require=True` forces a call, like `tool_choice="required"`.
101
- - **`confidence`** is the minimum over the tool and every argument.
102
-
103
- ## Calibration: knowing when it doesn't know
104
-
105
- ![reliability](assets/reliability_bfcl_v4.png)
106
-
107
- | | our eval (2,340 prompts) | BFCL v4 Python |
108
- |---|---|---|
109
- | accuracy, answering everything | 78.6 | 56.1 |
110
- | accuracy when the least confident 10% abstain | 85.1 | 62.1 |
111
- | accuracy when the least confident 20% abstain | 89.5 | 66.9 |
112
-
113
- Confidence ranks errors well, but it is over-confident on BFCL (ECE 0.28, vs 0.11 on our eval). Use it as a threshold, not as a probability.
114
-
115
- ## Limits
116
-
117
- - **Single turn, English.** At most 4 calls per request, lists of up to 7 items, and an input of about 896 tokens.
118
- - **No reasoning.**
119
- - Values that are not in the text are its main error: "until 11 PM" -> `23`, unit conversion, world knowledge.
120
- - On long, real user prompts (BFCL Live) it falls well behind small LLMs.
121
- - **CPU:** 0.45 s per call on 8 server cores, and several seconds on a laptop CPU. The speed claim is a GPU claim.
122
- - **The arena:** ActionMan executes instructions; it does not plan. Given a description of a game state instead of an instruction,
123
- it loops (1 of 12 mining races won).
124
 
125
  ## Training
126
 
@@ -128,21 +126,18 @@ Confidence ranks errors well, but it is over-confident on BFCL (ECE 0.28, vs 0.1
128
  - xLAM-60k, 58,000;
129
  - ToolACE, 10,359;
130
  - Hermes v1, 1,100;
131
- - no-call negatives, 11,000 (built from xLAM queries).
132
- - **Hardware and cost:** one RTX 4090, about 2 hours. The whole research, every run included, cost about $16 of rented GPU time,
133
- plus $2 for the benchmarks.
134
 
135
  ## Licence
136
 
137
- - **The weights are a research preview, for research use only.** The training data includes Salesforce's xLAM-60k, whose card
138
- says "This release is for research purposes only."
139
- - **ToolACE and Hermes are Apache-2.0.**
140
- - **The inference code is MIT.**
141
- - **Open weights** would need a retrain without xLAM, which is planned.
142
 
143
  ## Links
144
 
145
- - **Code, benchmarks, arena:** [github.com/shing1Sks/ActionMan](https://github.com/shing1Sks/ActionMan)
146
- - **The research film:** [actionman-research-film.mp4](https://github.com/shing1Sks/ActionMan/releases/download/v0.1/actionman-research-film.mp4)
147
 
148
  Research by Shreyash Kumar Singh with an AI coding agent (Claude).
 
5
  library_name: pytorch
6
  base_model: answerdotai/ModernBERT-large
7
  tags:
8
+ - action-model
9
  - function-calling
10
  - tool-calling
11
  - tool-use
12
  - non-autoregressive
13
  - masked-diffusion
14
  - modernbert
 
15
  datasets:
16
  - Salesforce/xlam-function-calling-60k
17
  - Team-ACE/ToolACE
 
20
 
21
  # ActionMan-0.1
22
 
23
+ **Decision models choose. Action models act.**
 
 
24
 
25
+ ActionMan-0.1 is an action model: a 0.4B encoder that selects the tool in one forward pass and writes every argument with
26
+ masked diffusion. It finishes in 2-3 forward passes, with no autoregressive decoding and no JSON generated.
27
 
28
+ | One tool call, median, batch 1 | latency |
29
+ |---|---|
30
+ | **ActionMan-0.1** (RTX 4090) | **17 ms** |
31
+ | Qwen3-0.6B fine-tuned on the same data (vLLM, tuned, same GPU) | 122 ms |
32
+ | GPT-6 Luna (API, network included) | 1,455 ms |
 
 
33
 
34
+ In the time GPT-6 Luna returns one call, ActionMan returns 85.
35
 
36
+ ## Inside
37
 
38
+ ![Masked diffusion: encode once, then denoise every argument in parallel](assets/inside.jpg)
 
 
 
 
 
 
 
39
 
40
+ 1. **Encode.** ModernBERT-large (28 layers, 395M weights) encodes the tool signatures, the instruction and up to four `[CALL]`
41
+ markers once. The context is cached.
42
+ 2. **Select tool.** Each `[CALL]` scores every tool, or none. A length head sizes the slots for every argument.
43
+ 3. **[MASK] slots.** One block of masked slots is appended, covering every argument.
44
+ 4. **Denoise.** All slots are predicted in parallel:
45
+ - values that appear in the instruction are copied as spans;
46
+ - enums and booleans are picked from their options;
47
+ - lists get a count head and item slots.
48
+ 5. **Re-mask < 0.85, denoise.** Low-confidence slots are re-masked and predicted again. The passes run as CUDA graphs.
49
 
50
+ A language model runs its full stack once per output token. The same call takes about 80 forward passes.
51
 
52
+ ## Speed
53
+
54
+ ![latency](assets/latency_vs_output_size.png)
55
+
56
+ Latency is flat in the size of the answer:
57
+
58
+ | | 1 call | 3+ calls |
59
+ |---|---|---|
60
+ | ActionMan-0.1 | 16.8 ms | 21.0 ms |
61
+ | Qwen3-0.6B, vLLM | 111 ms | 331 ms |
62
+
63
+ On a server CPU (8 threads), ActionMan fp32 takes 0.45 s and llama.cpp Q8_0 takes 1.66 s.
64
+
65
+ ## The Arena
66
+
67
+ ![2D Minecraft](assets/arena-minecraft.jpg)
68
+
69
+ Three real-time games played only through tool calls, where thinking time is charged to the model.
70
+
71
+ | Wins out of 12 | ActionMan-0.1 | Qwen3-0.6B, same data | GPT-6 Luna |
72
+ |---|---|---|---|
73
+ | 2D Minecraft | **10** | 9 | 10 |
74
+ | Rally | **11** | 9 | 3 |
75
+ | Cycling | **11** | 3 | 3 |
76
+
77
+ ## Accuracy
78
+
79
+ | BFCL v4, official harness | size | Non-Live | Live | Irrelevance |
80
  |---|---|---|---|---|
81
  | **ActionMan-0.1** | 0.4B | 66.0 | 45.1 | **81.2** |
82
  | Hammer2.1-0.5b | 0.49B | 65.9 | 54.7 | 80.7 |
83
  | granite-4.0-350m | 0.35B | 67.7 | 46.7 | 61.1 |
84
  | Qwen3-0.6B (FC) | 0.75B | 72.9 | 58.8 | 80.9 |
85
+ | Qwen3-0.6B fine-tuned on the same data | 0.75B | 75.7 | 54.1 | 79.1 |
86
  | Qwen3-1.7B (FC) | 2.0B | 82.7 | 74.7 | 76.8 |
87
+ | GPT-6 Luna (API, reasoning low) | - | 78.2 | 68.8 | 75.6 |
88
 
89
+ - **The run:** every model ran with `bfcl-eval==2026.3.23` on one box, single-turn categories only.
90
+ - **Full report:** per-category scores, confidence intervals and error classes are in [benchmark.md](https://github.com/shing1Sks/ActionMan/blob/dev/docs/results/benchmark.md).
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  ## Usage
93
 
 
111
  ```
112
 
113
  - **Without pip:** the inference code is also in this repo under `code/actionman/`. Add `code/` to `sys.path`.
114
+ - **No call:** `[]` means no tool fits. `require=True` forces a call, like `tool_choice="required"`.
115
+ - **`confidence`** is the minimum over the tool and every argument. Abstaining below a threshold works well: skipping the 10% least
116
+ confident calls takes accuracy on our 2,340-prompt eval from 78.6 to 85.1.
117
+ - **Specs:**
118
+ - single turn, English;
119
+ - up to 4 calls per request;
120
+ - lists of up to 7 items;
121
+ - an input of about 896 tokens.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  ## Training
124
 
 
126
  - xLAM-60k, 58,000;
127
  - ToolACE, 10,359;
128
  - Hermes v1, 1,100;
129
+ - no-call examples, 11,000.
130
+ - **Hardware:** one RTX 4090, about 2 hours.
 
131
 
132
  ## Licence
133
 
134
+ - **The weights are for research use only.** The training data includes Salesforce's xLAM-60k, whose card says "This release is for research purposes only."
135
+ - **ToolACE and Hermes** are Apache-2.0.
136
+ - **The inference code** is MIT.
 
 
137
 
138
  ## Links
139
 
140
+ - **Code, benchmarks, the Arena:** [github.com/shing1Sks/ActionMan](https://github.com/shing1Sks/ActionMan)
141
+ - **The launch film:** [actionman-launch-film.mp4](https://github.com/shing1Sks/ActionMan/releases/download/v0.1/actionman-launch-film.mp4)
142
 
143
  Research by Shreyash Kumar Singh with an AI coding agent (Claude).
assets/{arena-mining.jpg → arena-minecraft.jpg} RENAMED
File without changes
assets/{how-it-works.jpg → inside.jpg} RENAMED
File without changes
assets/reliability_bfcl_v4.png DELETED
Binary file (43.9 kB)