Skip to content

engine: llama.cpp back to v0.8.0 with ExecuTorch 1.6.0 kept (fallback, merge only if the POCO says so) - #3

Closed
alpharomercoma wants to merge 1 commit into
mainfrom
fallback/llama-v080
Closed

alpharomercoma wants to merge 1 commit into
mainfrom
fallback/llama-v080

Conversation

@alpharomercoma

@alpharomercoma alpharomercoma commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The fallback for llama.cpp v1.0.0 on main. Merge it only if the POCO's decode check says v1.0.0 is too slow; otherwise close it.

What it does: main (eaef5b18, version code 754) with only the llama.cpp submodule put back to v0.8.0 (8642541b). ExecuTorch 1.6.0 and every other change stay. engine_session.cpp is identical on both pins.

Why it exists: llama.cpp v1.0.0 widens the F16 KV cache to F32 inside attention (upstream #31854, #29810). Decode measured:

  • about 4% slower at every context length in the app's Android build on the emulator (tools/snapdragon/llama_bench_ab.sh, six pairs);
  • 6% to 19% slower at 2,048 to 4,096 tokens of context in a Mac native build.

No phone was reachable overnight to measure it.

How to decide (about 15 minutes, POCO awake and unlocked):

tools/snapdragon/llama_bench_ab.sh run <serial> ~/ow-models/LFM2.5-1.2B-Instruct-QAD-Q4_0.gguf 6

What merging gives up: v1.0.0's fix for flash attention's F16 accumulator overflowing to NaN on long contexts (#29774).

Details: docs/research/llama-cpp-v100-executorch-160.md.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…a phone measures v1.0.0's decode slower than the owner will accept

The fallback for 0dd8201, prepared before any phone could run it. llama.cpp v1.0.0 widens the F16
KV cache to F32 in attention (#31854, #29810): its decode was about 4% slower in the app's Android
build on the emulator and 6% to 19% slower at 2,048 to 4,096 tokens of context in a Mac native build.
Merge this only if tools/snapdragon/llama_bench_ab.sh on the POCO says the same or worse. What it
gives up: v1.0.0's fix for flash attention's F16 V accumulator overflowing to NaN on long contexts
(#29774). Nothing else in the app depends on v1.0.0; engine_session.cpp is unchanged between the two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alpharomercoma

Copy link
Copy Markdown
Member Author

Not needed: the Galaxy S24 measured v1.0.0's decode 20% to 23% slower at 1,500 to 6,000 tokens of context, so main now carries the same revert directly (a303c2b), with the measurements in its message and in docs/research/llama-cpp-v100-executorch-160.md.

@alpharomercoma
alpharomercoma deleted the fallback/llama-v080 branch November 13, 2026 23:54
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.

1 participant