All benchmarks

  Paper

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

  • Quality

    Function-call accuracy on 210 Android requests with hand-labelled answers. Small model: Octopus v2 (2B). Large model: GPT-4 (gpt-4-0125-preview).

    99.524%vs 98.571%

    Ahead by 0.953 points

    Octopus v2 2B99.524%
    GPT-498.571%

    Android function-call accuracy · higher is better

  • Cost per call

    The paper’s own rough figure, not a measurement: a retrieval-based or context-augmented call processes about 1,000 tokens, about 0.01 USD at the GPT-4 API price. No price date or snapshot is given, and it wasn’t measured on the 210-request test. No inference cost is given for Octopus, which runs on local hardware. As reported: About 0.01 USD for a GPT-4 call of about 1,000 tokens (Introduction). The only other cost: generating 1,000 training requests for one function cost 0.0224 USD (Section 4.3).

    No comparison

    Only the large model’s cost is reported.

    Octopus v2 2BNot reported
    GPT-4≈ US$0.01via OpenAI’s API

    US$ per call · lower is better

  • Latency

    Mean wall-clock time per call on the 210 requests. Octopus ran on a single NVIDIA A100 machine with flash attention and no quantization; GPT-4 ran through OpenAI’s API, measured on 18 March (2024) at 2 PM PDT, so network and service load are included. Quantized on a standard Android phone, Octopus took 1.1 to 1.7 s per call.

    2.6×faster

    Octopus v2 2B0.38 son one NVIDIA A100 machine
    GPT-41.02 svia OpenAI’s API

    s per call · lower is better

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)
NexaAI/Octopus-v2

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 NVIDIAA100 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 NVIDIAA100; 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 NVIDIAA100 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

Published

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

Sources

  1. Wei Chen, Zhiyuan Li, ‘Octopus v2: On-device language model for super agent’, arXiv 2404.01744
  2. Octopus v2 model card (Hugging Face)
  3. arXiv v1, 2 Apr 2024. Latest revision v7, 11 Sep 2026; Table 1 numbers are identical in v1 and v7.
3 more sources behind this page
  1. arXiv 2404.19296
  2. arXiv 2404.01744v7 (HTML)
  3. huggingface.co/NexaAI/Octopus-v2/android_benchmark.xlsx
Share this benchmark

Drawing the image…

Post text