Skip to content
pionus

Measurements

How long a message takes, and why the first one is slower.

The first message and the next ones

Most of a commit is loading the model. Kept loaded (model.keep_loaded, on by default), only the first commit after a pause pays for it.

End to end through the CLI, on a Ryzen 5 5500 with a GeForce RTX 3050 8 GB:

Load every commitKept loaded, from the second commit

qwen2.5-coder-1.5b, vulkan2.8s
0.20s
qwen2.5-coder-1.5b, cpu2.6s
2.0s
pionus-0.5b-v0.1, vulkan1.4s
0.14s
pionus-0.5b-v0.1, cpu1.3s
0.8s
qwen2.5-coder-7b, vulkan7.5s
0.57s

A GPU spends most of the time loading, so it gains the most. The CPU spends it reading the prompt.

Five commits in a row

qwen2.5-coder-1.5b, five commits in a row. The first one starts the server (an estimate).

vulkan, load every commit14.0s in total
vulkan, model kept loaded3.6s in total
cpu, load every commit13.0s in total
cpu, model kept loaded10.6s in total

What it costs, and when it is not used

  • It is kept only if it takes at most 15% of the RAM (model.keep_loaded_max_ram).
  • The NPU and the Intel GPU have no server. On the NPU the first load compiles the graph (11.7s); later loads read the cache (1.7s, 246 MB).
  • It stops when idle, or when a model.* setting changes.
ModelFileWith fast loadWithout it
pionus-0.5b-v0.1380 MB564 MB593 MB
pionus-1.5b-v0.1941 MB1,169 MB1,773 MB
pionus server status
# what is kept loaded, and how long it has been idle
pionus server stop
# free its memory now
pionus config set model.keep_loaded 30
# idle minutes; 0 turns it off

By device

On a Core Ultra 5 225H (Arc iGPU, NPU), per message, end to end. Here openvino-cpu was still called cpu.

intel-gpu1.8s
vulkan (iGPU through Mesa ANV)2.5s
openvino-cpu4.0s
npu5.1s

The integrated GPU is the fastest. The NPU is the slowest but uses far less CPU.

On a Ryzen 5 5500 with a GeForce RTX 3050 8 GB, pionus bench on four prompts sized like real ones:

LoadGenerate

vulkan (RTX 3050)2.4s

Load 2.1s, generate 0.3s.

cpu (llama.cpp)4.0s

Load 0.7s, generate 3.3s.

Most of the Vulkan load is copying the weights to the GPU.

By model

Per message on the Ryzen 5 5500 with a GeForce RTX 3050 8 GB. The fine-tunes write shorter replies, so they are faster.

cpuvulkan

qwen2.5-coder-1.5b (default)4.0s
2.4s
qwen2.5-coder-0.5b3.1s
1.5s
pionus-1.5b-v0.13.8s
2.3s
pionus-0.5b-v0.11.9s
1.2s

The 7B model spends 7.8s of its 8.3s copying 4.4 GB to the GPU. Kept loaded, the next commit takes 0.57s.

Where the time goes

Reading the prompt dominates: about 90% of a message on the CPU. Milliseconds per message on a Core Ultra 5 225H (Arc iGPU, NPU), over 6 real prompts:

LoadPrefillDecode

cpu as shipped (--no-repack --fit off)7873ms
+ -tb 144255ms
+ -tb 14 -b 1024 -ub 10243905ms
+ the above, model.max_prompt_tokens = 5122610ms
vulkan as shipped (Intel Arc iGPU)2487ms
vulkan, model.max_prompt_tokens = 5121923ms
  • One thread per core halves the prefill, so pionus sets model.threads_batch.
  • Halving model.max_prompt_tokens halves the prefill, at a cost in quality.
  • No gain from flash attention, weight repacking or speculative decoding.

Fast load

Two steps of starting llama-server are rarely needed for a 1 GB model: repacking the weights and fitting them to GPU memory. pionus bench keeps whichever is faster.

Without fast loadWith fast load

vulkan (RTX 3050)2.7s
2.4s
cpu (llama.cpp)5.1s
4.0s

Asking for the type

The more confident the model is in the type, the more often it is right. Overall it matched the author 0.700 of the time, on 250 commits:

below 50% (67 commits)0.493
50 to 70% (68 commits)0.632
70 to 90% (80 commits)0.825
90% or more (35 commits)0.943

model.ask_type costs one more reading of the prompt per commit. More in the measurements document.

Machines and method

  • Ryzen 5 5500 (6 cores), GeForce RTX 3050 8 GB with the proprietary driver 595.104, 23 GiB RAM, Pop!_OS 24.04, kernel 7.2.
  • Core Ultra 5 225H (Arrow Lake-H: Arc iGPU, NPU 37xx), 15 GiB RAM, Pop!_OS 24.04, kernel 7.2.
  • Your times will differ: pionus bench measures your machine.

How each number was measured, and how to repeat it, is in the measurements document.