Repository navigation
qwen4exp : fix graph reallocation from the n-gram table scale - #32483
Merged
Merged
Conversation
am17an
marked this pull request as ready for review
November 17, 2026 16:07
ngxson
approved these changes
Nov 17, 2026
gabe-l-hart
added a commit
to gabe-l-hart/llama.cpp
that referenced
this pull request
Nov 17, 2026
* origin/master: (138 commits) qwen4exp : fix graph reallocation from the n-gram table scale (ggml-org#32483) server : return 400 when grammar and ignore_eos are on (ggml-org#32377) ggml-cuda: disable quantized matvec fusion on all Pascal GPUs (ggml-org#32239) Title: CUDA: few-row MMQ for MUL_MAT_ID (ggml-org#32065) ui: turn the live markdown preview off by default (ggml-org#32469) CUDA: use block reductions for whole-row pool_1d (ggml-org#31855) ggml : decode F8_E4M3 to fp32 without ldexpf (ggml-org#32477) llama : keep the k-pool layout prefix on sequence edits (ggml-org#32137) vocab : speed up PLaMo-2/3 tokenizer table build (ggml-org#32249) convert : fix FP8 qwen4exp checkpoints (n-gram table scale, block-scaled FP8) (ggml-org#32476) ui: Llama UI design system: tokens, surfaces and fonts (ggml-org#32468) mtmd: support Minimax-Music3 (ggml-org#32435) chat: add tts_dict for kokoro G2P template (ggml-org#32397) Rotate K/V read order for better L2 cache hit rates (ggml-org#32407) ui: turn conversation tabs off by default (ggml-org#32402) ui: move Llama Chat to SvelteKit 3 and its built-in service worker (ggml-org#32463) qwen3next : apply output projection weight scale (ggml-org#32393) cuda : raise shared mem limit only for the launched kernel (ggml-org#32392) nix: expose a SYCL package (ggml-org#31066) vulkan: disable flip Flash Attention shader on AMD Windows due to a driver bug (ggml-org#32415) ...
dzannotti
added a commit
to halo-box/strix-llama.cpp
that referenced
this pull request
Nov 17, 2026
Upstream: ggml-org/llama.cpp 8777c0c..ad9d9e8 (3 commits) No conflicts. Upstream ggml-org#32483 replaces the PLE scale multiply with ggml_scale and a value read once after load; it lands on the fork placement from the previous step (after the gather, on both the graph and the host-gather path). Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
fencerJP
pushed a commit
to fencerJP/llama-apu
that referenced
this pull request
Nov 21, 2026
…rg#32483) * qwen4exp : apply the n-gram table scale with ggml_scale * read the scale once after load * remove comment
Annieren
pushed a commit
to Annieren/llama.cpp-upstream
that referenced
this pull request
Nov 23, 2026
…rg#32483) * qwen4exp : apply the n-gram table scale with ggml_scale * read the scale once after load * remove comment
Mr-J-369
pushed a commit
to Mr-J-369/llama.cpp-Android
that referenced
this pull request
Nov 25, 2026
Nindaleth
pushed a commit
to Nindaleth/llama.cpp
that referenced
this pull request
Nov 26, 2026
…rg#32483) * qwen4exp : apply the n-gram table scale with ggml_scale * read the scale once after load * remove comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes the
test-llama-contextabort on the CUDA and ROCm CI since #32476 (my change):#32476 applied
per_layer_token_embd.scalewithggml_mul. The scale is a host weight, and the scheduler offloads an op with a host weight to the GPU only when the backend'soffload_opagrees, which for CUDA means at least 32 rows. So the node changed backend with the batch size, and the reserved graph did not fit the small batches.The scale is now read as a value and applied with
ggml_scale, which has no weight. The tensor must be F32.Additional information
Tested on RTX PRO 6000, Debug build,
GGML_SCHED_DEBUG_REALLOC=1, generatedqwen4exp-moe.gguf:test-llama-contextaborts before, all cases pass after.Not tested: a real model with this change (the multiply uses the same value as before), ROCm.
Requirements