Skip to content

Merge tag 'b9946' of https://github.com/ggml-org/llama.cpp into feature/turboquant-kv-cache#208

Open
sxlmnwb wants to merge 318 commits into
TheTom:feature/turboquant-kv-cachefrom
sxlmnwb:feature/turboquant-kv-cache
Open

Merge tag 'b9946' of https://github.com/ggml-org/llama.cpp into feature/turboquant-kv-cache#208
sxlmnwb wants to merge 318 commits into
TheTom:feature/turboquant-kv-cachefrom
sxlmnwb:feature/turboquant-kv-cache

Conversation

@sxlmnwb

@sxlmnwb sxlmnwb commented Jul 6, 2026

Copy link
Copy Markdown

Summary Merge 'b9888' of https://github.com/ggml-org/llama.cpp

Resolved files conflicts:

1. ggml/src/ggml-cuda/fattn.cu

  • Added TurboQuant types (turbo2, turbo3, turbo4) to the ggml_cuda_fattn_kv_type_supported function
  • Used the upstream helper function for KV type validation with an additional 64-byte alignment check for turbo types

2. ggml/src/ggml-metal/ggml-metal.metal

  • Combined template instantiation for kernel_cpy_tq3_1s and kernel_cpy_tq4_1s (TurboQuant copy kernels)

3. src/llama-kv-cache.cpp

  • Incorporate Hadamard rotation logic for DeepSeek architectures (DEEPSEEK32 and DEEPSEEK4)
  • Use more comprehensive upstream conditions

4. src/llama-model-loader.cpp

  • Adopts the llama_ftype_name structure from upstream with guessed_prefix_len
  • Adds the TQ3_1S and TQ4_1S types to the switch case

5. tests/test-backend-ops.cpp

  • Incorporates test cases from upstream (Q4_0, Q8_0, MXFP4)
  • Retained the TurboQuant TQ4_1S test cases for kernel validation

6. tests/test-quantize-fns.cpp

  • Added TQ3_1S to the list of types that use MAX_DOT_PRODUCT_ERROR_LOWBIT

7. tools/server/server-context.cpp (5 conflicts)

  • Fixed slot selection logic by using task.id_slot instead of id_slot
  • Merged the cache_key slot selection from the fork
  • Used batch.size() instead of batch.n_tokens for consistency with upstream
  • Fixed the prompt_checkpoint_restored flag
  • Merged checkpoint logic with is_last_user_message
  • Replaced continue/break with return in the iterate lambda
  • Removed references to nonexistent functions (llama_get_ctx_other, process_chunk)

8. tools/server/server-models.cpp (6 conflicts)

  • Use the upstream state-based protocol structure (CMD_CHILD_TO_ROUTER_STATE)
  • Retain the CMD_CHILD_TO_ROUTER_ERROR handler for the abort callback
  • Use the update_status_args struct for the update_status signature
  • Fix the should_wake lambda with an inline lambda
  • Use the child_proc->is_alive() and child_proc->terminate() methods instead of direct C functions
  • Merged update_last_error and update_download_progress

9. tools/server/server-models.h

  • Added the CMD_CHILD_TO_ROUTER_STATE define
  • Merged method declarations from upstream and fork

10. tools/server/server.cpp

  • Merged the common_models_handler initialization from upstream
  • Retained the abort callback for error reporting from child processes
  • Used a more comprehensive router condition (path.empty() && hf_repo.empty())

Additional information

Build environment:

export MY_FLAGS_NVIDIA="-march=znver5 -mtune=znver5 -O3 -pipe -flto=thin -fno-fat-lto-objects -fno-strict-aliasing -Wno-unused-command-line-argument -Wno-missing-noreturn -Wno-unreachable-code-break -mllvm -polly -mllvm -polly-tiling=1 -mllvm -polly-run-inliner -mllvm -polly-dependences-computeout=0 -mllvm -polly-ast-use-context"
export MY_LINKER_FLAGS="-fuse-ld=mold -Wl,--thinlto-jobs=$(nproc) -Wl,-rpath,/home/sxlmnwb/kernel-build/xBoreUp_Clang/lib/x86_64-unknown-linux-gnu"

cmake -B build-nvidia \
    -DGGML_CUDA=ON \
    -DGGML_CUDA_CUDNN=ON \
    -DGGML_RPC=ON \
    -DCUDAToolkit_ROOT=/opt/cuda \
    -DCMAKE_CUDA_COMPILER=/opt/cuda/bin/nvcc \
    -DCMAKE_CUDA_ARCHITECTURES=89 \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_COMPILER=/home/sxlmnwb/kernel-build/xBoreUp_Clang/bin/clang \
    -DCMAKE_CXX_COMPILER=/home/sxlmnwb/kernel-build/xBoreUp_Clang/bin/clang++ \
    -DCMAKE_CUDA_HOST_COMPILER=clang++ \
    -DCMAKE_C_FLAGS="$MY_FLAGS_NVIDIA" \
    -DCMAKE_CXX_FLAGS="$MY_FLAGS_NVIDIA -stdlib=libc++" \
    -DCMAKE_EXE_LINKER_FLAGS="$MY_LINKER_FLAGS -lc++ -lc++abi" \
    -DCMAKE_SHARED_LINKER_FLAGS="$MY_LINKER_FLAGS -lc++ -lc++abi"

Build log:
PANd6hWU

Tested on:
CPU: AMD Ryzen AI 9 HX 370 (8+16) @ 5.16 GHz
GPU 2: NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discrete]

MoE model:
Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive - Q4_K_P

Screenshot From 2026-07-07 02-39-29

Requirements

Xuan-Son Nguyen and others added 30 commits June 18, 2026 12:15
* server: temporary remove HF remote preset

* rework remove preset.ini support

* rm unused get_remote_preset_whitelist()

* print warning

* add docs

* rm stray file
…g#24154)

Throw on grammar parse failure so the server returns HTTP 400
instead of silently dropping the constraint.
Add a regression test for the invalid-grammar response.

Fixes ggml-org#24144
* ui : add model selector storybook stories

Covers list, favorites, single-model, all status states
(loading/loaded/sleeping/failed/idle), and selection states.

* ui : improve model selector mobile UX with hover media queries

Use @media (hover:none) to show action buttons directly on touch
devices and color-code them by model status (amber=sleeping,
green=loaded, muted=idle). Status dots hidden on touch. Desktop
hover behavior unchanged.
* server : add last-5-seconds generation speed display

* cont : clean-up

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* wip

* working

* correct some limits

* add field name to error message
* server: (router) fix stopping_thread potentially hang

* fix windows build
…ts) (ggml-org#24592)

* hex-optrace: add support for optrace and instrument matmul and flash-atten code

* hex-trace: improve trace event and prefetto generator

* hex-trace: add new script dedicated to handling traces, specifically perfetto traces

* hex-trace: add --head/--tail options to profile and trace tools

* hex-trace: fix whitespaces

* hex-trace: fix flake8 warnings

* hex-trace: fix flake8 warnings

* hmx-fa: restore q_tiles clearing

* hex-profile: remove circular dep in includes

* hex-trace: simplify trace sizing check

* hex-profile: sort events in the summary by name
…irst) (ggml-org#24769)

* add dedicated "overview" for mtmd_image_preproc_out

* corrections

* correct (again)

* nits

* nits (2)
…gml-org#24774)

* server: add "X-Accel-Buffering": "no" header to streaming endpoints

This header tells Nginx (as a reverse proxy) to NOT buffer responses. (only affects streaming endpoints)
Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).
* cuda: add GGML_OP_COL2IM_1D, follow-up to the CPU op

* cuda: col2im_1d use fast_div_modulo for the index decomposition

* cuda: col2im_1d tighten supports_op, type match and contiguous dst
* ggml-cpu: support K tails in Power10 MMA Q8/Q4 matmul

This patch removes the requirement that K be divisible by kc in the tinyBlas_Q0_PPC tiled matmul path. Process the final K panel using its actual depth and pass the reduced panel size through packing and kernel execution.  This allows more workloads to use the MMA kernel and reduces fallback to mnpack.

* Apply suggestion from @taronaeo

Co-authored-by: Aaron Teo <taronaeo@gmail.com>

---------

Co-authored-by: Aaron Teo <taronaeo@gmail.com>
…#24755)

Absorb get_slot_by_id logic into get_available_slot so slot selection
is handled by a single function call. When a specific slot id is
requested, the LCP similarity check still runs to enable proper
prompt cache updates.

Assisted-by: pi:llama.cpp/Qwen3.6-27B
* server: fix non-bound n_discard value

* Update tools/server/server-context.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* spec: support qwen3.5 & 3.6 eagle3 draft

* eagle3: Add deferred boundary checkpoints restore support for hybrid models

* apply suggestions

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

* spec: adapt to API change

* spec: fix naming

* cont : add TODO

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* mtmd: several bug fixes

* fix build

* fix gemma4ua

* add sanity check in get_u32()

* fix build (2)

* area() avoid overflow
* docker : build the UI

* cont : use existing APP_VERSION
…rg#24801)

* server: add --agent arg, remove redundant webui naming compat

* corrent env

* fix the test

* llama-gen-docs

* nits: wordings
* mtmd, arg: fix utf8 handling on windows

* also fix ggml_fopen

* fix build fail

* also fix CLI
Use std::partial_sort to order only the requested top-n tokens instead
of the full vocabulary

    logprobs sort: vocab=128000 n_top=0 iters=100
    full    sort:   8555.6 us/op
    partial sort:    704.3 us/op

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
rankaiyx and others added 28 commits July 8, 2026 09:45
…org#25047)

* server-stream : pimpl

* server-stream: prefix free functions with server_stream_

address review from ggerganov: scope the public stream functions under the
server_stream_ prefix, matching server_stream_session_manager_start/stop.

* server-stream: guard session and manager state with the mutex

address review from ggerganov: make done, completed_ts and the GC running flag plain members under their
mutex and set the condvar predicates under the lock. keep cancelled atomic for
the lock-free should_stop poll.

* server-stream: trim comments to the non-obvious

address review from ggerganov: drop comments that restate the code, keep the
concurrency, lifetime and ordering rationale. de-stale a few comments left by the
pimpl: g_stream_sessions is now internal and the /v1/streams listing is gone.

* server-stream: update dev docs for the pimpl and prefix

reflect server_stream_session_manager_start/stop and the server_stream_ prefix,
note the manager is now a file-static singleton hidden in the .cpp

* server-stream: move stream traces to debug level

keep the bring-up traces for diagnostics but off the default log: skip
drain, draining, drain ended, DELETE evict, attach_pipe, and the router
stream resume proxy.

* server-stream: align router stream resume proxy trace with upstream

the child-side bring-up traces are already SRV_TRC on master, move the
router stream resume proxy trace to the same level.

* server-stream: move stream_read_status enum to the cpp

it is only used by the hidden session and consumer types, so it belongs
with them behind the pimpl boundary, not on the public header surface.

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Improvement of the CI to run on all hip-related changes as a follow-up to
ggml-org#25373
so breakage is more likely to be caught in future
* cli: move to HTTP-based implementation

* wip

* working

* remote server ok

* cli support router mode

Co-authored-by: Piotr Wilkin <ilintar@gmail.com>

* case: router with only one model

* Apply suggestions from code review

Co-authored-by: Piotr Wilkin (ilintar) <piotr.wilkin@syndatis.com>

* remove outdated comment

* use destructor instead

* add ftype

* cli-view --> cli-ui

* pimpl

* no more json in header

* nits fixes

* also show model aliases

---------

Co-authored-by: Piotr Wilkin <ilintar@gmail.com>
Co-authored-by: Piotr Wilkin (ilintar) <piotr.wilkin@syndatis.com>
…_ID and FLASH_ATTN_EXT (ggml-org#25425)

* hex-fa: refactor kernel param compute to use common layout builder

* hmx: add explicit compiler barriers to make hmx funcs more robust

* hex-vtcm: more generic vtcm layout builder for mm and flash-attn kernels

* hex-hmx: unroll inner kernels

* hex-hmx: use inline asm instead of intrinsics to avoid compiler issues

* hex-hmx: define inline asm macros and simplify code

* hex-hmx: replace leftover intrinsics

* hmx-fa: minor cleanup for hmx asm

* hmx-mm: move per-task stucts out of the kernels header

* hmx-mm: simplify core_dot_chunk

* hmx-mm: simplify inner loops that call hmx instructions

* hmx-mm: proper instrumentation for activation prep work for dma pipelined version

* hmx-mm: update a-prep loop for better prefetch

* hex-vtcm: improved vtcm layout alloc for mm to support overlapping areas

* hmx-mm: reduce the number of act fetch tows to 4 for now, going larger doesnt help here

* hex-hmx: always use hmx-queue in all modes

* hmx-mm: update comments and minor formatting

* hmx-mm: further improve synchro fallback path to prefetch the weights earlier

* hex-fa: further pipeline improvements (earlier prefetch)

* hmx-mm: cleanup dma pipelines to use dst cached in the queue

* hmx-fa: minor cleanup and opts for fa dma pipelines

* hmx-fa: optimize q-prep stage with dma and unrolling

* hmx-fa: use o_tile size from layout instead of computing it

* hmx-mm: cleanup types and size handling

* hmx-mm: replace divs with fastdiv in qprep loops

* hmx-fa: minor update/formatting to q_tile handling

* hmx-fa: cleanup the layout to avoid overpadding

* hmx-fa: simplified and improved cost mode for hmx fa solver that uses vtcm layout funcs

* hmx-queue: add support queue wakeup and make suspend async to avoid hmx-lock latency

* hex-hmx: move queue wakeup / suspend to the op-batch level

* hex-threads: add hybrid polling to workpool

* hex-mm: fix trailing spaces
…xpert tiles) (ggml-org#25433)

* opencl: ragged-tile MoE prefill GEMM (skip padded expert tiles)

The MoE prefill GEMM groups tokens into TILESIZE_N=32 per-expert tiles; at low
tokens-per-expert most tiles are mostly padding. When a tile's upper 16 slots
are all padding (router index 0xFFFFFFFF), skip the second dotx16_reduce8 half.
Numerically identical (skipped lanes are padding). Applied to all eight *_f32_ns
MoE GEMMs; default on, opt out with GGML_OPENCL_MOE_RAGGED_FP16=0.

* opencl: quarter-granularity ragged MoE tile-skip (8-col skip-groups)

Replace the two half-tile dotx16_reduce8 calls in the 8 *_f32_ns MoE GEMMs with
four dotx8_reduce4 (8-column) calls, skipping each empty trailing skip-group
independently. Padding is always trailing, so the kernel rounds the valid count
up to the skip granularity and skips fully-padding groups. Byte-identical to the
non-skipped path. New env GGML_OPENCL_MOE_RAGGED_GRAN={8,16,32} (quarter/half/
off); default quarter.

* opencl: move ragged moe env var in cl_init

---------

Co-authored-by: Li He <lih@qti.qualcomm.com>
…4362)

* vulkan: disable FA mask_opt on GCN to improve performance

* reenable mask opt over attention head size 256
… of 128. (ggml-org#25464)

* opencl: fix garbled output for Q6_K weights with ne01 % 128 != 0 on Adreno

Observed with granite-3.1-3b-a800m-instruct, whose vocab is an odd number.

Route Q6_K dense mul_mat with ne01 % 128 != 0 off the noshuffle path:
decode (ne1==1) uses the correct flat GEMV and the matching GEMM (ne1>1)
falls back to CPU (the flat convert has no verified small-batch GEMM kernel
for these shapes). All standard hidden/FFN/vocab dims are multiples of 128
and keep the noshuffle path.

* opencl: reserve alignment slack for the SOA subbuffer carve in alloc size

set_tensor carves quantized weights into per-component subbuffers (d/q,
ql/qh/s/d, ...) whose origins are each rounded up to the device base
address alignment. When a component's size is not a multiple of the
alignment, the carve extends past ggml_nbytes(tensor) and the last
subbuffer overlaps the next tensor in the pool -- e.g. q6_K [1536, 49155]:
size_s = 49155*96 ends 32 bytes past a 128-byte boundary, so the d
subbuffer ends 96 bytes past the tensor's allocation, and whichever of the
two neighboring tensors is uploaded last silently corrupts the other (here:
the last vocab rows' block scales). This affects any quant type whose
component sizes can be misaligned, on any shape with ne01 not a multiple of
the alignment granularity; standard power-of-two dims are unaffected.

Implement get_alloc_size for the OpenCL buffer type and reserve the
worst-case carve slack (4 aligned gaps; 5 components max, q5_K) for
quantized tensors. Costs at most 512 bytes per quantized tensor at the
observed 128-byte alignment.

* opencl: use lm based q6_k mm when ne1 is not multiple of 128

---------

Co-authored-by: Li He <lih@qti.qualcomm.com>
* hexagon: add VISION RoPE support

* hexagon: support RoPE on strided half-dim views for all modes

* hex-rope: decouple src0 DMA copy size from row stride

* hex-rope: support non-contiguous dst for RoPE

* hex-rope: fix dst spad pitch for non-contiguous dst
)

* cuda: fix snake fusion type predicate, a and inv_b are F32

The matcher required a->type == x->type while launch_snake reads both
as const float *, matching the CPU and Metal contract where a and inv_b
stay F32. F16/BF16 chains never fused and fell back to the naive path,
and a hypothetical all F16 chain would have read F16 bits as float.
Aligns the predicate and the comment with ggml-cpu.c

* cuda: reject snake fusion on non-contiguous operands

The kernel reads x[idx] and a[c] / inv_b[c] linearly, so a
non-contiguous view passing the matcher would silently read wrong data.
Mirror the contiguity guard already present in the CPU, Vulkan and
Metal matchers.
CUDA is compiled with fast math and AMD/HIP is not — this flag lets AMD use fast math too.

We can't use -ffast-math: it implies -ffinite-math-only, which won't compile (ggml uses INFINITY for masking) and produces NaNs. -funsafe-math-optimizations gives the speedup without the NaN problems.

Co-authored-by: Mark Caldwell <mark@cloudhands.ai>
* metal : add CONV_2D_DW (depthwise 2D convolution) support

* test : add perf cases for CONV_2D_DW

* metal : use 3D dispatch for CONV_2D_DW kernel

* metal : add channel-tiled CONV_2D_DW kernel for non-contiguous layouts

* metal : simplify CONV_2D_DW dispatch and trim comments

* metal : merge duplicate CONV_2D_DW pipeline getters

* tests : add F16 CONV2D_DW tests

* cpu : fix F16 kernel support for CONV_2D_DW

* tests : remove commented-out CONV_2D_DW test block

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
The first one avoids relying on compile to optimize local memory away,
and the second is cheaper than issuing control flow statements
…-org#25440)

* Use smart pointers in test_case::eval

This makes it consistent with other methods of `test_case`.

* Use smart pointer in show_test_coverage also

* Also use smart pointers for backends
…gml-org#25480)

* meta: add hard emphasis on agents not writing descriptions/comments

Add a block in AGENTS.md to emphasize that agents are forbidden, under any circumstances, to post comments or pull request descriptions on behalf of the user.

* Add example

* Move examples to examples

* White space
…gml-org#24093)

A model whose chat template parses at init but fails parser generation
at apply time (e.g. uses {% call %}) throws std::invalid_argument from
common_chat_templates_support_enable_thinking(), which ran outside the
try/catch guarding common_chat_templates_init(). The throw was uncaught
and llama-cli aborted (SIGABRT) instead of failing to load. Moved the
probe inside that try/catch so an apply-time error fails load the same
way an init parse error does.

Signed-off-by: Jesse LaRose <jesse@taey.ai>
)

* hexagon: tile wide rows in pointwise unary ops to avoid VTCM overflow

* unary: reject permuted tensors for now (not used by models)

* hex-unary: replace divs with fastdiv

* hex-unary: add vtcm layout and host computed kernel params

* hex-unary: move fastdiv init into kernel params

* hex-unary: add specialized thread functions to improve generated code

* hex-unary: tracing instrumentation for unary ops

* hex-unary: factor out hvx kernels, streamline and remove more duplication

* ggml-hexagon: fix std::min collision with Windows min macro

* hex-cmake: make lto build happy

---------

Co-authored-by: Max Krasnyansky <maxk@qti.qualcomm.com>
…om/llama-cpp-turboquant into feature/turboquant-kv-cache

Signed-off-by: Salman Wahib <sxlmnwb.dev@gmail.com>
…re/turboquant-kv-cache

Fix Conflicts:
    ggml/include/ggml.h
    ggml/src/ggml-cuda/ggml-cuda.cu
    ggml/src/ggml-metal/ggml-metal.metal
    ggml/src/ggml-vulkan/ggml-vulkan.cpp
    gguf-py/gguf/constants.py
    include/llama.h
    src/llama-kv-cache.cpp
    tools/server/server.cp

Signed-off-by: Salman Wahib <sxlmnwb.dev@gmail.com>
@sxlmnwb

sxlmnwb commented Jul 10, 2026

Copy link
Copy Markdown
Author

Summary Merge 'b9946' of https://github.com/ggml-org/llama.cpp

Resolved files conflicts:

1. tools/server/server.cpp

  • Adopted upstream refactoring: wrapper llama_server(params, argc, argv) split from main()
  • Retained TurboQuant router GPU-skip optimization (!is_router_server guard for llama_backend_init())
  • Retained abort callback with CMD_CHILD_TO_ROUTER_ERROR for child process crash reporting

2. src/llama-kv-cache.cpp

  • Retained TurboQuant ggml_mul_mat_aux helper for Hadamard matmul
  • Retained InnerQ CUDA cross-TU shared state stubs (g_innerq_finalized, g_innerq_scale_inv_host)
  • Added fallback stub implementations when CUDA is not available

3. include/llama.h

  • Added upstream LLAMA_FTYPE_MOSTLY_Q2_0 = 41 for new Q2_0 quantization
  • Retained TurboQuant LLAMA_FTYPE_MOSTLY_TQ3_1S = 43 and LLAMA_FTYPE_MOSTLY_TQ4_1S = 44

4. ggml/include/ggml.h

  • Added upstream GGML_TYPE_Q2_0 = 42
  • Renumbered TurboQuant types: TURBO2_0=43, TURBO3_0=44, TURBO4_0=45, TQ3_1S=46, TQ4_1S=47
  • Updated GGML_TYPE_COUNT from 47 to 48

5. ggml/src/ggml-vulkan/ggml-vulkan.cpp

  • Retained TurboQuant SET_ROWS validation with 128-element block alignment check for turbo2/3/4
  • Kept turbo types in the supported SET_ROWS type switch

6. gguf-py/gguf/constants.py (3 conflicts)

  • Added upstream Q2_0 = 42 to GGMLQuantizationType enum
  • Retained TurboQuant types with new numbering: TURBO2_0=43, TURBO3_0=44, TURBO4_0=45, TQ3_1S=46, TQ4_1S=47
  • Added upstream MOSTLY_Q2_0 = 41 to LlamaFileType enum
  • Retained MOSTLY_TQ3_1S = 43 and MOSTLY_TQ4_1S = 44
  • Added upstream Q2_0 quantization traits: (64, 2 + 16)
  • Retained TQ3_1S and TQ4_1S traits

7. ggml/src/ggml-cuda/ggml-cuda.cu (4 conflicts)

  • Simplified TurboQuant dispatch in ggml_cuda_mul_mat to match upstream's refactored structure
  • Removed deprecated split-buffer multi-GPU logic (ggml_backend_buft_is_cuda_split, get_row_rounding, etc.)
  • Removed duplicate hint and cc declarations that conflicted with upstream
  • Replaced ggml_cuda_mul_mat_batched_cublas (removed upstream) with ggml_cuda_mul_mat_cublas
  • Added TQ weight type detection (is_tq_weight) with early dispatch to fused WHT kernel or TQ4_1S cuBLAS path
  • Added back ggml_cuda_host_staging_pool struct and ggml_cuda_get_staging() for cross-device copies
  • Added back ggml_cuda_copy_across_devices and ggml_cuda_copy2d_across_devices definitions
  • Merged upstream F16 SET_ROWS support alongside TurboQuant SET_ROWS alignment checks

8. common/speculative.cpp (post-merge fixes)

  • Renamed has_draft_mtphas_mtp to match upstream variable naming
  • Removed duplicate common_speculative_impl_draft_dflash struct definition (introduced by merge)

9. common/peg-parser.cpp (post-merge fixes)

  • Added prefix_and_next struct and collect_prefix_and_next() methods to trie class
  • Restored gbnf_char_class() function alongside upstream's gbnf_excluding_pattern()
  • Removed extraneous closing brace } left from merge

10. tests/test-backend-ops.cpp (post-merge fix)

  • Fixed typetype_dst in TQ4_1S max error check inside max_nmse_err() override

11. tests/peg-parser/test-gbnf-generation.cpp (post-merge fix)

  • Replaced old trie-based grammar test expectations with upstream's simplified excluding pattern format
  • All until/ac grammar tests updated to new pattern format

12. docs/speculative.md (post-merge fix)

  • Retained full TurboQuant documentation (EAGLE-3, DFlash, n-gram variants, ngram-mod)
  • Upstream had removed documentation in favor of CLI-only reference

@sxlmnwb sxlmnwb changed the title Merge tag 'b9888' of https://github.com/ggml-org/llama.cpp into feature/turboquant-kv-cache Merge tag 'b9946' of https://github.com/ggml-org/llama.cpp into feature/turboquant-kv-cache Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.