Building llama.cpp 1.0 on a 4-core, 8 GB CPU box and measuring what the FP8 KV cache really costs
- Hardware
- 4-core machine with 8 GB RAM, CPU only
- Models & engines
- llama.cpp v1.0.0 tag (build b12359), built with CMake and LLAMA_CURL=OFF
Qwen2.5-0.5B-Instruct, Q4_K_M, 4 threads
Binaries built: llama-cli, llama-bench, llama-server - Key gotcha
- Cloning main isn't testing 1.0: the nightly channel had already moved to b12441.
What they built
After llama.cpp tagged its 1.0 release on November 13, Muscle AI wanted an honest, measured answer to whether upgrading is worth it on small hardware rather than relying on the release notes.
They built the v1.0.0 tag from source on a 4-core box with 8 GB of RAM, ran llama-bench on Qwen2.5-0.5B-Instruct at Q4_K_M with the default cache and with the new FP8 KV cache, and checked the server's health, model list and chat endpoints.
Their conclusion: 1.0 is a stability release with a semver promise, a cheaper KV cache and a hardened server, not a speed release on small hardware.
Setup
- 4-core machine with 8 GB RAM, CPU only
- llama.cpp v1.0.0 tag (build b12359), built with CMake and LLAMA_CURL=OFF
- Qwen2.5-0.5B-Instruct, Q4_K_M, 4 threads
- Binaries built: llama-cli, llama-bench, llama-server
How it works
- Clone the v1.0.0 tag with --depth 1, configure a Release build and build only the three binaries with -j2; check the tag with llama-cli --version.
- Run llama-bench with -p 512 -n 128 -t 4 to measure prompt processing (pp) and generation (tg), once with the default cache and once with -ctk f8_e4m3 -ctv f8_e4m3.
- Start llama-server with -c 4096 on port 8080 and hit /health, /v1/models and /v1/chat/completions with curl.
Results & numbers
- Default KV cache: 87.6 tok/s prompt processing and 18.9 tok/s generation; FP8 KV cache: 16.5 tok/s and 14.2 tok/s. A re-run gave 88.9 vs 16.5 and 19.4 vs 13.5.
- At 4,096 context the KV cache dropped from 48.00 MiB with f16 to 24.00 MiB with FP8, exactly half.
- On a short 37-token chat prompt the prompt-speed gap was 1.9x (98.6 vs 53.2 tok/s), while generation roughly held (21.9 vs 20.2).
- The build took about 11 minutes, and the server returned status ok and a real chat reply.
Gotchas
- Cloning main isn't testing 1.0: the nightly channel had already moved to b12441.
- The first build died with 'No space left on device' because /tmp was a 512 MB tmpfs; moving the work dir to the home disk and pointing TMPDIR at it fixed it.
- v1.0 removes --defrag-thold; an old launch command with that flag exits with 'error: invalid argument' instead of starting.
- On a 0.5B model the memory saving is only 24 MiB; the author notes the win grows with context length and model size, while the prompt-speed tax on CPU is real.
“Upgrade for the API and the server. If you upgrade for speed alone, bench your own model first.”— Muscle AI (@themuscleai)
Do it yourself
- git clone --depth 1 --branch v1.0.0 https://github.com/ggml-org/llama.cpp.git
- cd llama.cpp && cmake -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=OFF
- cmake --build build --config Release -j2 --target llama-cli llama-bench llama-server (set TMPDIR to a roomy disk if /tmp is small).
- Bench your own model: ./build/bin/llama-bench -m <model>.gguf -p 512 -n 128 -t 4, then again with -ctk f8_e4m3 -ctv f8_e4m3.
- Remove --defrag-thold from old launch scripts, then start ./build/bin/llama-server -m <model>.gguf -c 4096 --port 8080 and curl /health.
./build/bin/llama-bench -m <model>.gguf -p 512 -n 128 -t 4
./build/bin/llama-cli -m <model>.gguf -c 4096 -ctk f8_e4m3 -ctv f8_e4m3 -p "Your prompt"
./build/bin/llama-server -m <model>.gguf -c 4096 --port 8080Similar setups
A private OpenAI-compatible LLM API on an AMD GPU with llama.cpp
A Vietnamese developer's notes on building llama.cpp for AMD cards, choosing between Vulkan and ROCm, and running llama-server as a locked-down systemd service that existing OpenAI SDK code can call.
llama.cpp 1.0 on a handheld PC's integrated GPU: 2x faster long prompts with flash attention
Before-and-after llama.cpp 1.0 tests on an MSI Claw's Intel Arc 140V found long prompts read about twice as fast only with flash attention on, and the new MoE cache lost to full GPU offload.
smolmaxxing: 16B models on a 1 GB TV box and a 2013 iPad Air, and a 35B on a phone, with patched llama.cpp
Hyperion AI's open lab notebook shows how far a patched llama.cpp can push old, cheap devices by keeping popular experts in RAM and streaming the rest of a model from flash.
Bringing up vLLM and llama.cpp on a DGX Spark with the network fully blocked
Ashwin J.B. spent about a week getting vLLM, llama.cpp and a native backend to serve on an arm64 DGX Spark (GB10) with all outbound traffic blocked, and wrote down every error, its fix and the speeds he measured.