Skip to content

New Learning Path: Measure whether LLM decode is memory-bound on an Arm CPU - #3848

Merged
jasonrandrews merged 7 commits into
ArmDeveloperEcosystem:mainfrom
manunicholasjacob:llm-decode-roofline-pi5
Oct 12, 2026
Merged

jasonrandrews merged 7 commits into
ArmDeveloperEcosystem:mainfrom
manunicholasjacob:llm-decode-roofline-pi5

Conversation

@manunicholasjacob

Copy link
Copy Markdown
Contributor

New Learning Path: Measure whether LLM decode is memory-bound on an Arm CPU (content/learning-paths/cross-platform/llm-decode-roofline/).

It shows how to measure the memory-read ceiling of an Arm board, run llama.cpp across model sizes and thread counts, and use llama-roofline to check whether decode is limited by memory bandwidth, then pick the thread count for decode and prefill.

What is in the PR

  • _index.md, _next-steps.md and 5 pages: how decode uses memory, setup, measure bandwidth, diagnose, threads and size.
  • Category cross-platform, shared with embedded, laptops and servers. Advanced, 45 minutes.
  • One line in assets/contributors.csv and 6 words in .wordlist.txt.

How it was tested

  • Raspberry Pi 5 (4 x Cortex-A76, 2 GB, Raspberry Pi OS, kernel 6.12), llama.cpp 836d571 built in Release with GCC 12.2.0, llama-roofline 0.2.0 from PyPI, official Qwen2.5 GGUF files (0.5B Q4_0, 0.5B Q8_0, 1.5B Q4_0) with sizes and sha256 checked.
  • Every output block in the pages comes from one capture run, not illustrative output.
  • Results: read ceiling 13.78 GB/s; decode fits 11.82 GB/s divided by bytes per token (R squared 0.9996, 3 models) and runs at 84 to 86% of the ceiling; decode knee at 2 threads, 4 threads lose 19.4%; prefill scales 3.10x from 1 to 4 threads.
  • No thermal throttling during the run (get_throttled 0x0 at four points); all sweep rows within 3% CV.
  • Only measured on the Raspberry Pi 5; the commands are generic Arm Linux.

Local checks run before opening: full hugo 0.130.0 extended site build (no warnings or errors), htmltest internal links, pyspelling with the repo config, tools/verify_index_fields.py, tools/style_check.py, and a profanity scan. All pass.

Disclosures: I maintain llama-roofline (MIT). AI assistance was used for drafting and running the checks; I ran the measurements and reviewed every page.

Before submitting a pull request for a new Learning Path, please review Create a Learning Path

  • I have reviewed Create a Learning Path

Please do not include any confidential information in your contribution. This includes confidential microarchitecture details and unannounced product information.

  • I have checked my contribution for confidential information

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the Creative Commons Attribution 4.0 International License.

manunicholasjacob and others added 5 commits October 3, 2026 21:52
…CPUs

New cross-platform Learning Path llm-decode-roofline. It uses llama-roofline
and llama-bench on a Raspberry Pi 5 (Cortex-A76) to measure the memory
bandwidth ceiling, compare llama.cpp decode against it, and choose decode
and prefill thread counts. All outputs come from one capture on the board
(llama.cpp 836d571, llama-roofline 0.2.0).

Also adds the author to assets/contributors.csv and four words to
.wordlist.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace "oversubscription" in the diagnose.md table with plain wording,
and add "doi" and "manunicholasjacob" (from further_reading URLs) to
.wordlist.txt. The upstream pyspelling config now passes on the path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the assets/contributors.csv conflict by keeping both new rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: manunicholasjacob <manunicholasjacob@gmail.com>
@jasonrandrews
jasonrandrews merged commit 31c17d1 into ArmDeveloperEcosystem:main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants