A 2B on-device model picked Android function calls slightly more accurately than GPT-4
Made by Wei Chen and Zhiyuan Li
arXiv preprint; Nexa AI publishes the model
The result
The story
A short list of phone actions
A phone assistant does a fixed set of things: calls, texts, alarms, brightness, calendar events, YouTube searches, directions, smart-home controls. Turning a request into the right one of those function calls, with the right arguments, is a narrow job.

Earlier work, the authors write, retrieves descriptions of candidate functions and passes them to the model with the request. Wei Chen and Zhiyuan Li instead fine-tuned Google’s Gemma-2B on 20 Android functions and gave each function its own token, so the prompt needs no descriptions.
Small model
Octopus v2
2B · Nexa AI
Full fine-tune with one new token per function
- Base
- Gemma-2B (Google)
Data
Android function-call data
1,000 requests per function, 20 functions
Generated and checked with Google Gemini
Trained on 100 per function instead, it scored 98.095%, below GPT-4.
Training
Full fine-tune, 3 epochs, AdamW, learning rate 5e-5
- Cost
- 0.0224 USD to generate 1,000 examples for one function; compute not reported
Not reported: hardware and time.
The test
Evaluation
210 requests (spreadsheet on the model card)
- Test set
- Android requests sampled with Gemini, labelled by hand
- Metric
- Right function call, checked against hand labels; seconds per call
- How it was compared
- Same requests and labels for all; GPT-4 got all 20 function descriptions and one example, temperature not stated.
Large model
GPT-4 (gpt-4-0125-preview)
Size not disclosed · OpenAI
Used as released through OpenAI’s API, with the 20 descriptions and one example
Octopus got 209 of 210 requests right (99.524%) and GPT-4 207 (98.571%): two requests apart. The bigger gap is speed, 0.38 s per call on an A100 machine against 1.02 s for GPT-4 over the API. On a standard Android phone, quantized, a call took 1.1 to 1.7 s.
The weights are public under a non-commercial licence, and the model card lists all 210 test requests with each model’s answers. No measured inference cost is given.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · 6 more results
Every model on the headline test
Cost, latency and energy, as reported
- Cost
- Not reported
- Latency · s per function call
- Octopus v2 2B0.38
- GPT-41.02
- Octopus on a local
A100; GPT-4 over the OpenAI API at one time of day, so the GPT-4 figure includes the network and service load. The paper itself says GPT-4’s speed might reflect API traffic or hardware differences.
- Energy
- Not reported
- Not measured. The introduction estimates battery use from a cited figure (0.1 J per token for 1B-parameter models) and claims 37 times more function calls per iPhone battery; that is an estimate, not a measurement in this paper.
More from the source
Latency per function call
Small model 0.38Large model 1.02 s
Table 1
GPT-3.5 (gpt-3.5-turbo-0125), all 20 functions in prompt: accuracy / latency
Small model 99.524 / 0.38Large model 97.143 / 1.18 % / s
Table 1, Section 4.1
GPT-3.5 + retrieval of top-5 functions: accuracy / latency
Small model 99.524 / 0.38Large model 98.095 / 1.97 % / s
Table 1
Llama-7B (function-calling variant) + retrieval: accuracy / latency
Small model 99.524 / 0.38Large model 68.095 / 13.46 % / s
Table 1
Octopus variants: LoRA (1K per API) / full, 500 per API / full, 100 per API
Small model 99.048 / 99.048 / 98.095Large model 98.571 % accuracy
The 100-per-API variant (98.095%) is below GPT-4.
Tables 1 and 2
On a standard Android phone (quantized, fixed prefix pre-computed), queries of 20-30 tokens
1.1 to 1.7 s per call
Section 4.1, last paragraph
Worth knowing
- The accuracy margin is small (99.524% vs 98.571%) on a test set whose size is not stated, with no error bars; the latency gap is the stronger result.
- Training and test requests were both generated by Gemini, so the test is in-distribution for Octopus.
- Latency compares a local
A100 with a cloud API measured at one time of day.
- The Hugging Face model card is more cautious than the paper: it says ‘comparable to GPT-4’, and its latency claims (168% faster than GPT-4-turbo; 36x vs Llama-7B + RAG) differ from the paper’s (0.38 s vs 1.02 s; 35-fold). This card uses only the paper’s figures.
2 more caveats
- The model only knows the 20 functions it was trained on; GPT-4 reads the descriptions at run time.
- Weights are licensed cc-by-nc-4.0 (non-commercial).
Weights on Hugging Face
The old path NexaAIDev/Octopus-v2 now resolves to NexaAI/Octopus-v2. Licence cc-by-nc-4.0 (non-commercial). Base model: https://huggingface.co/google/gemma-2b
- NexaAI/Octopus-v2Octopus v2 (Gemma 2B, fine-tuned)
Sources
- Wei Chen, Zhiyuan Li, ‘Octopus v2: On-device language model for super agent’, arXiv 2404.01744
- Octopus v2 model card (Hugging Face)
- arXiv v1, 2 Apr 2024. Latest revision v7, 11 Sep 2026; Table 1 numbers are identical in v1 and v7.