Box icon indicating copy to clipboard operation
Box copied to clipboard

Benchmark collection for different AI models and devices

Open aryoda opened this issue 7 months ago • 34 comments

I want to collect reported benchmark results in this "issue" as a table.

Please feel free to contribute by publishing your results as answers so that I can add it to this table...

Please do not close this issue until we have enough results...

Device name OS Version Box version Gemma-4-E4B-it (on GPU) Gemma-4-E4B-it (on NPU) Gemma-4-E4B-it (on CPU) Notes
Google Pixel 9 Pro XL GrapheneOS build 2026042101 (Android 16) v1.0.3custom Prefill: 120 TPS
Decode: 9,54 TPS
Time to first token: 2,23 s
Prefill: 19,31 TPS
Decode: 8,11 TPS
Time to first token: 13,40 s
Prefill: 16,74 TPS
Decode: 7,40 TPS
Time to first token: 15,89 s
Inference on CPU causes the device to become hot
(not observed with GPU and NPU)

Legend: TPS = tokens/second

Note: This table is maintained via tablesgenerator

aryoda avatar Apr 28 '26 22:04 aryoda

Device: Google Pixel 10 Pro Fold | OS: GrapheneOS | App: v1.0.3 custom-rom-support | Model: Gemma-4-E2B-it

Config: 256 prefill/decode tokens, 3 runs


Device: Google Pixel 10 Pro Fold | OS: Stock Android 17 | App: v1.0.4 main | Model: Gemma-4-E2B-it

┌─────────────┬──────────────┬─────────────┬───────┬─────────────┐ │ Accelerator │ Prefill │ Decode │ TTFT │ Steady Init │
├─────────────┼──────────────┼─────────────┼───────┼─────────────┤ │ GPU │ 259.71 tok/s │ 8.39 tok/s │ 1.11s │ 3.07s │ ├─────────────┼──────────────┼─────────────┼───────┼─────────────┤ │ CPU │ 54.35 tok/s │ 16.33 tok/s │ 4.73s │ 1.01s │
└─────────────┴──────────────┴─────────────┴───────┴─────────────┘

Config: 256 prefill/decode tokens, 3 runs


Device: Google Pixel 6a | OS: Stock Android 17 | App: v1.0.4 main | Model: Gemma-4-E2B-it

┌─────────────┬──────────────┬────────────┬───────┬─────────────┐ │ Accelerator │ Prefill │ Decode │ TTFT │ Steady Init │
├─────────────┼──────────────┼────────────┼───────┼─────────────┤ │ GPU │ 219.29 tok/s │ 9.45 tok/s │ 1.28s │ 6.09s │ └─────────────┴──────────────┴────────────┴───────┴─────────────┘

Config: 256 prefill/decode tokens, 3 runs

jegly avatar May 01 '26 14:05 jegly

I used the default settings for the benchmarks: 256 prefill tokens, 256 decode tokens, 3 runs. Results are average of the three runs.

Device name OS Version Box version Model name Time to first token Prefill Decode Notes
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it CPU 4.81 s 53.99 tps 16.72 tps
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it GPU 1.14 s 249 tps 9.2 tps
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it TPU N/A N/A N/A Could not test due to error described in issue #27
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it CPU 18.29 s 15.13 tps 4.79 tps
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it GPU 2.92 s 93.99 tps 5.18 tps
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it TPU N/A N/A N/A Could not test due to error described in issue #27

elschopi avatar May 06 '26 15:05 elschopi

It would be super interesting to also compare between LiteRT and llama.cpp backend. Sadly, I do not have an android device to add results myself.

dariyooo avatar May 07 '26 03:05 dariyooo

It would be super interesting to also compare between LiteRT and llama.cpp backend. Sadly, I do not have an android device to add results myself.

LiteRT is simply just faster, im sure llama.cpp could be better however getting the acceleration working is the problem

jegly avatar May 07 '26 04:05 jegly

It would be super interesting to also compare between LiteRT and llama.cpp backend. Sadly, I do not have an android device to add results myself.

I used the default settings for the benchmarks: 256 prefill tokens, 256 decode tokens, 3 runs. Results are average of the three runs. Device name OS Version Box version Model name Time to first token Prefill Decode Notes Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it CPU 4.81 s 53.99 tps 16.72 tps Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it GPU 1.14 s 249 tps 9.2 tps Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E2B-it TPU N/A N/A N/A Could not test due to error described in issue #27 Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it CPU 18.29 s 15.13 tps 4.79 tps Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it GPU 2.92 s 93.99 tps 5.18 tps Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260403 1.0.4 main Gemma-4-E4B-it TPU N/A N/A N/A Could not test due to error described in issue #27

nice ! , there is a new option in 1.0.5 merged from upstream called speculative decoding that can be enabled on CPU , it will be interesting to test it on benchmarks ! a new release should be coming soon!

jegly avatar May 07 '26 04:05 jegly

It would be super interesting to also compare between LiteRT and llama.cpp backend. Sadly, I do not have an android device to add results myself.

LiteRT is simply just faster, im sure llama.cpp could be better however getting the acceleration working is the problem

I expected it to be faster but by how much would be very interesting. If it is like 30% the flexibility of llama cpp could still be worth it. If it is 1000% using llama doesn't make any sense.

dariyooo avatar May 07 '26 05:05 dariyooo

internal test - 1.0.5 / Pixel 10 Pro Fold / E2B

Speculative Execution enabled on GPU - MTP

prefill speed 237.36 decode speed 7.18 time to first token 1.22 first init time 36363.21 steady init time 4135.18

CPU / Spec Exe

prefill speed 56.67 decode speed 16.97 time to first token 4.76 first init time 5656.85 steady init time 1007.65

┌──────────────────┬─────────────┬───────┬───────────────────────────┐ │ Mode │ Decode │ TTFT │ Best for │ ├──────────────────┼─────────────┼───────┼───────────────────────────┤ │ GPU │ 8.39 tok/s │ 1.11s │ Fastest first response │ ├──────────────────┼─────────────┼───────┼───────────────────────────┤ │ CPU + MTP │ 16.97 tok/s │ 4.76s │ Best sustained throughput │ ├──────────────────┼─────────────┼───────┼───────────────────────────┤

└──────────────────┴─────────────┴───────┴───────────────────────────┘

jegly avatar May 07 '26 05:05 jegly

Used default settings: 256 prefill / decode tokens, 3 runs. Used the latest 1.0.5 Main release. Since last benchmark, my OS version also updated.

Device name OS Version Box version Model name Time to first token Prefill Decode Notes
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E2B-it CPU 7.1 s 36.85 tps 12.4 tps speculative decode enabled
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E2B-it GPU 1.08 s 257.28 tps 11.48 tps speculative decode enabled
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E4B-it CPU 23.48 s 11.56 tps 4.16 tps speculative decode enabled
Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E4B-it GPU 2.86 s 94.89 tps 6.19 tps speculative decode enabled

elschopi avatar May 07 '26 10:05 elschopi

Used default settings: 256 prefill / decode tokens, 3 runs. Used the latest 1.0.5 Main release. Since last benchmark, my OS version also updated. Device name OS Version Box version Model name Time to first token Prefill Decode Notes Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E2B-it CPU 7.1 s 36.85 tps 12.4 tps speculative decode enabled Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E2B-it GPU 1.08 s 257.28 tps 11.48 tps speculative decode enabled Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E4B-it CPU 23.48 s 11.56 tps 4.16 tps speculative decode enabled Google Pixel 10 Pro XL Android 17 Beta CinnamonBun CP31.260423.012.A 1.0.5 main Gemma-4-E4B-it GPU 2.86 s 94.89 tps 6.19 tps speculative decode enabled

upstream is releasing a performance mode soon i tried to merge the PR but the LiteRT-LM sdk does not support it yet, so we should see some performance gains soon ! in the time being if you think of any features or find any bugs let me know :)

btw re uploading the releases , i changed the app icon logo.

jegly avatar May 07 '26 11:05 jegly

📱 Device & Environment

Device: Pixel 6 Pro

OS: GrapheneOS

Kernel: 6.1.170-android14-11-g57641bf448b2 #1 Sat May 2 00:50:57 UTC 2026

Android version: 16

Box version: 1.0.8

Model: Gemma 4 E2B .litertlm

🚀 Benchmark Results

  1. GPU — Speculative Decoding OFF

start_ms: 1778488815240 end_ms: 1778488923591 model: Gemma-4-E2B-it accelerator: GPU prefill_tokens: 256 decode_tokens: 256 runs: 3 app_version: 1.0.13

prefill_speed: 204.82398843020098 tokens/s decode_speed: 8.913953803546868 tokens/s time_to_first_token: 1.3654566986666667 s first_init_time: 18925.630464 ms steady_init_time: 7587.0934275 ms

  1. GPU — Speculative Decoding ON

start_ms: 1778488939371 end_ms: 1778489044202 model: Gemma-4-E2B-it accelerator: GPU prefill_tokens: 256 decode_tokens: 256 runs: 3 app_version: 1.0.13

prefill_speed: 215.65915163724904 tokens/s decode_speed: 8.805468740866658 tokens/s time_to_first_token: 1.3006866548333333 s first_init_time: 10206.658859 ms steady_init_time: 7422.7470539999995 ms

  1. CPU — Speculative Decoding OFF

start_ms: 1778489116683 end_ms: 1778489286751 model: Gemma-4-E2B-it accelerator: CPU prefill_tokens: 256 decode_tokens: 256 runs: 3 app_version: 1.0.13

prefill_speed: 19.830174684115217 tokens/s decode_speed: 6.750120125779875 tokens/s time_to_first_token: 13.807206996083332 s first_init_time: 10317.327194 ms steady_init_time: 2919.4866745 ms

  1. CPU — Speculative Decoding ON

start_ms: 1778489298054 end_ms: 1778489502374 model: Gemma-4-E2B-it accelerator: CPU prefill_tokens: 256 decode_tokens: 256 runs: 3 app_version: 1.0.13

prefill_speed: 16.087343136630178 tokens/s decode_speed: 5.562078929082223 tokens/s time_to_first_token: 16.37884940175 s first_init_time: 24086.520315 ms steady_init_time: 3896.3858054999996 ms

Jakarrrg avatar May 11 '26 09:05 Jakarrrg

Condensed Table of All Results so far

Pixel 9 Pro XL (GrapheneOS) — Gemma‑4‑E4B‑it

Accelerator Prefill Decode TTFT Notes
GPU 120 TPS 9.54 TPS 2.23 s —

| CPU | 16.74 TPS | 7.40 TPS | 15.89 s | Device gets hot |

Pixel 10 Pro Fold — GrapheneOS — Gemma‑4‑E2B‑it

Accelerator Prefill Decode TTFT

Pixel 10 Pro Fold — Stock Android 17 — Gemma‑4‑E2B‑it

Accelerator Prefill Decode TTFT Steady Init
GPU 259.71 8.39 1.11 s 3.07 s
CPU 54.35 16.33 4.73 s 1.01 s

Pixel 6a — Stock Android 17 — Gemma‑4‑E2B‑it

Accelerator Prefill Decode TTFT Steady Init
GPU 219.29 9.45 1.28 s 6.09 s

Pixel 10 Pro XL — Android 17 Beta — v1.0.4

Model Accelerator Prefill Decode TTFT Notes
E2B CPU 53.99 16.72 4.81 s —
E2B GPU 249 9.2 1.14 s —

| E4B | CPU | 15.13 | 4.79 | 18.29 s | — | | E4B | GPU | 93.99 | 5.18 | 2.92 s | — |

Pixel 10 Pro Fold — Internal Test — v1.0.5

Accelerator Prefill Decode TTFT
GPU (spec‑exec) 237.36 7.18 1.22 s
CPU (MTP) 56.67 16.97 4.76 s

Pixel 10 Pro XL — v1.0.5

Model Accelerator Prefill Decode TTFT
E2B CPU 36.85 12.4 7.1 s
E2B GPU 257.28 11.48 1.08 s
E4B CPU 11.56 4.16 23.48 s
E4B GPU 94.89 6.19 2.86 s

Pixel 6 Pro — GrapheneOS — v1.0.8 — Gemma‑4‑E2B‑it

Accelerator Prefill Decode TTFT Notes
GPU (spec off) 204.82 8.91 1.36 s —
GPU (spec on) 215.66 8.80 1.30 s Faster init
CPU (spec off) 19.83 6.75 13.80 s —
CPU (spec on) 16.08 5.56 16.37 s Slower

Fastest TTFT (first token)

Pixel 10 Pro XL GPU — 1.08 s

Pixel 10 Pro Fold GPU — 1.11 s

Pixel 6a GPU — 1.28 s

Pixel 6 Pro GPU — 1.30 s

Highest Decode Throughput

Pixel 10 Pro Fold CPU (MTP) — 16.97 tok/s

Pixel 10 Pro XL CPU — 16.72 tok/s

Highest Prefill Speed

Pixel 10 Pro XL GPU — 257–260 tok/s

Pixel 10 Pro Fold GPU — 237 tok/s

Pixel 6a GPU — 219 tok/s

jegly avatar May 11 '26 09:05 jegly

Gemma‑4 Performance Across Devices (Prefill / Decode / TTFT)

Prefill Speed (tokens/sec) GPU: ██████████████████████████████████████████████████████ 260 CPU: ████████████ 55

6a GPU: ████████████████████████████████████ 219 6 Pro GPU: ███████████████████████████ 215

Decode Speed (tokens/sec) CPU (MTP): ████████████████████ 17

GPU: ██████ 9 6a GPU: ███████ 9.4 6 Pro GPU: ███████ 8.9

Time to First Token (seconds) GPU: █ 1.1 6a GPU: █ 1.28 6 Pro GPU: █ 1.30

CPU: █████ 4.7 6 Pro CPU: ███████████████ 13–16

jegly avatar May 11 '26 09:05 jegly

Slight performance increases in the latest release. feels snappier thats for sure.

jegly avatar May 24 '26 09:05 jegly

@jegly can you enable the wiki function? Then we can just write a benchmark article :)

RubenKelevra avatar May 26 '26 20:05 RubenKelevra

Speculative decoding Model Accelerator Prefill speed (tok/s) Decode speed (tok/s) Runtime (s) Time to first token (s) First init time (ms) Steady init time (ms)
1 Gemma-4-E4B-it GPU 92.08 8.98 31.29 2.89 36565.65 21373.99
1 Gemma-4-E4B-it CPU 11.19 5.86 66.56 24.40 31289.91 3253.68
1 Gemma-4-E2B-it GPU 235.64 13.40 20.19 1.17 21536.35 6172.10
1 Gemma-4-E2B-it CPU 34.67 13.78 25.96 7.53 12936.38 1164.74
0 Gemma-4-E4B-it GPU 91.05 8.73 32.14 2.93 35048.52 21566.16
0 Gemma-4-E4B-it CPU 8.87 5.66 74.09 35.21 23619.13 4835.05
0 Gemma-4-E2B-it GPU 192.41 10.45 25.83 1.43 23125.57 9826.42
0 Gemma-4-E2B-it CPU 40.97 16.52 21.74 6.31 11084.09 1325.35
0 MiniCPM5-1B-it CPU 18.63 16.28 29.47 16.88 4248.19 2464.57
0 MiniCPM5-1B-it GPU 85.32 15.61 19.40 3.07 6023.98 3975.63

(runtime: 256 / prefill_speed + 256 / decode_speed

For POCO X7 Pro - a MediaTek Dimensity 8400-Ultra with 12 GB of RAM. Box version 1.0.11.

Edit: Added MiniCPM5-1B

RubenKelevra avatar May 29 '26 02:05 RubenKelevra

On Samsung Galaxy S26 Ultra 16GB/1TB (can't use NPU there?), OneUI 8.5 (A16), Box 2.0:

Model Accelerator Prefill Decode Runs Prefill Speed Decode Speed TTFT First Init Steady Init
Gemma-4-E4B-it GPU 256 256 3 343.09 tok/s 15.21 tok/s 0.813 s 12,346.67 ms 9,782.13 ms
Gemma-4-E4B-it CPU 256 256 3 28.23 tok/s 11.61 tok/s 9.387 s 12,549.78 ms 1,184.28 ms
Gemma-4-E2B-it GPU 256 256 3 234.43 tok/s 22.83 tok/s 1.137 s 10,160.45 ms 6,568.87 ms
Gemma-4-E2B-it CPU 256 256 3 91.57 tok/s 26.72 tok/s 2.969 s 5,585.74 ms 716.64 ms

E12B crashes: Failed to create engine: INTERNAL: ERROR: [third_party/ odml/litert_lm/runtime/executor/ llm_litert_compiled_model_executor.cc:1928] I->ERROR: [./third_party/odml/litert/litert/cc/litert_compiled_model.h

Manu99it avatar Jun 07 '26 12:06 Manu99it

On Samsung Galaxy S26 Ultra 16GB/1TB (can't use NPU there?), OneUI 8.5 (A16), Box 2.0: Model Accelerator Prefill Decode Runs Prefill Speed Decode Speed TTFT First Init Steady Init Gemma-4-E4B-it GPU 256 256 3 343.09 tok/s 15.21 tok/s 0.813 s 12,346.67 ms 9,782.13 ms Gemma-4-E4B-it CPU 256 256 3 28.23 tok/s 11.61 tok/s 9.387 s 12,549.78 ms 1,184.28 ms Gemma-4-E2B-it GPU 256 256 3 234.43 tok/s 22.83 tok/s 1.137 s 10,160.45 ms 6,568.87 ms Gemma-4-E2B-it CPU 256 256 3 91.57 tok/s 26.72 tok/s 2.969 s 5,585.74 ms 716.64 ms

E12B crashes: Failed to create engine: INTERNAL: ERROR: [third_party/ odml/litert_lm/runtime/executor/ llm_litert_compiled_model_executor.cc:1928] I->ERROR: [./third_party/odml/litert/litert/cc/litert_compiled_model.h

Thank you, did you run E4B ? Did you get a crash on E4B when trying NPU, Also on model page , do you download the specific Snapdragon variant of E2B?

@Manu99it

jegly avatar Jun 07 '26 23:06 jegly

Thank you, did you run E4B ? Did you get a crash on E4B when trying NPU

I've not run it on NPU

Also on model page , do you download the specific Snapdragon variant of E2B?

On Box 2.0 on model page I don't have snapdragon specific models. Neither 2B or 4B. On older version there was but I didn't download them, then I've updated the app and they weren't listed anymore. I'll search them on hugging face and try. Would be awesome having them listed though

@jegly

Manu99it avatar Jun 08 '26 11:06 Manu99it

This is a knowwn bug on the Galaxy S25/S26 Ultra specifically , Samsung's variant of the Snapdragon 8 Elite reports SM8750-AB as the SoC identifier rather than SM8750, and Box 2.0.0 only had the sm8750 key in the model list so the NPU models get filtered out for your device. The fix is already in and will ship with 2.0.1. in the next hour

On E4B: there's no NPU build for E4B anywhere — the litert-community only publishes a Snapdragon NPU binary for E2B right now. E4B runs GPU or CPU only, so no NPU option will appear for that model regardless of device.

@Manu99it i would compile a e4b model for snapdragon but i dont have enough ram feel free to make a donation lol

jegly avatar Jun 08 '26 11:06 jegly

2.0.1 patch for snapdragon users is out.

jegly avatar Jun 08 '26 11:06 jegly