Skip to content

[Data] MoE PR stack: 3.3x faster prompts, 2.7x faster answers on an R9700 (not for merge) - #374

Draft
LeoBorcherding wants to merge 1 commit into
unslothai:moe-offload-prefetch-cachefrom
LeoBorcherding:night-shift-tester/moe-prs-data
Draft

LeoBorcherding wants to merge 1 commit into
unslothai:moe-offload-prefetch-cachefrom
LeoBorcherding:night-shift-tester/moe-prs-data

Conversation

@LeoBorcherding

Copy link
Copy Markdown

Data only, not for merge. This is the before/after for the MoE cache PRs measured together, so it's in one place to look at.

before and after

Same prompt, same card, replayed from the real token timings of each run:

llama.cpp before and after

prompt (tok/s) answer (tok/s) first token 256-token answer done
llama.cpp today (cbe28bb3c) 472 13.7 9.8 s 28.7 s
+ the MoE PRs 1,567 (3.3x) 37.0 (2.7x) 3.1 s 9.8 s

The PRs in the stack

#251 (--moe-cache-mib auto) is left out: it only picks the cache size, and the run passes it explicitly. The stacked branch is night-shift-tester/moe-prs-stack at 1893c78c3.

How it was run

AMD Radeon AI PRO R9700, Windows 11, ROCm 7.1. Qwen3.8-Flash-Next coder IQ1_M, experts in system RAM (-cmoe --load-mode none), -c 8192 -fa on -ngl 99, MTP off. The stack adds --moe-cache-mib 16000 -b 4096 -ub 4096. Two servers per build, alternating on the same machine (Nov 10). Prompt speed is the mean of 3 warm 4.6k-token prompts per server; the answer is 256 greedy tokens, timed from the streamed tokens.

@danielhanchen

Copy link
Copy Markdown
Member

Thanks Leo, this is a useful picture of where the time goes. One caveat on the headline before anyone quotes it.

The two rows differ in flags as well as in code. "llama.cpp today" ran with the MoE cache off and n_ubatch 512; the stack row adds --moe-cache-mib 16000 -b 4096 -ub 4096. The base commit already has the MoE cache and accepts -b/-ub 4096. I reran the same protocol on an A100 40 GB (Flash-Next coder IQ1_M, experts in RAM, 3 alternating launches, spread at most 7.3%):

  • base commit, base flags: 243 prompt / 8.6 answer tok/s
  • base commit, the stack's flags: 1141 / 46.7
  • the stack, the stack's flags: 1598 / 46.7

So with the flags held equal, the code adds about +40% prompt speed and nothing to answer speed. The flags alone give 4.7x prompt and 5.4x answer.

Two more points:

  • The image subtitle says "same flags", which contradicts the table footnote.
  • There are no raw per-run numbers, build flags or output hashes, so the R9700 numbers can't be checked. One of the three prompts also gave different greedy text across launches on the stack, where upstream was stable.

I could not test the R9700 itself. Fine to keep this as data only, not for merge.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants