]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
4 weeks agoggml-cpu : fix CPU affinity mask being ignored on Android (#26838)
Hitesh Chopra [Mon, 10 Aug 2026 12:13:40 +0000 (17:43 +0530)]
ggml-cpu : fix CPU affinity mask being ignored on Android (#26838)

4 weeks agoggml : require contiguous src for ROLL on CUDA and Metal (#25928)
Yash Raj Pandey [Mon, 10 Aug 2026 12:01:44 +0000 (08:01 -0400)]
ggml : require contiguous src for ROLL on CUDA and Metal (#25928)

ggml_roll only asserts nb[0] == ggml_type_size, so a permuted src is a
valid input, but the CUDA and Metal roll kernels index by ne alone and
never read the nb strides. A non-contiguous src therefore produced
silently wrong results. Neither backend declared a contiguity
requirement in supports_op, so the scheduler did not fall back to the
CPU implementation, which does handle strides correctly.

Add the requirement to both backends, matching the existing
GGML_OP_ROPE guard, and add a permuted test_roll case.

4 weeks agoui: UI/chat form follow ups (#26743)
Pascal [Mon, 10 Aug 2026 11:32:51 +0000 (13:32 +0200)]
ui: UI/chat form follow ups (#26743)

* ui: split the markdown rendering setting per surface

User content and thinking get their own toggle again, so turning off
markdown for a message leaves reasoning blocks formatted. Both default
to markdown. A stored renderContentAsRawText unfolds onto the user key
and is dropped from the config.

File mentions render as badges in the raw text path too, through a
narrow pass over [name](file://path) that leaves everything else
untouched.

* ui: let the rich chat input scroll past its max height

The contenteditable renderer caps its height with max-height but had no
overflow rule, so a long buffer overflowed into the input area wrapper
and got clipped by its overflow-hidden, leaving no way to reach the
bottom of the message. The textarea renderer scrolls natively and was
never affected.

* ui: apply the new lint and format config

* ui: move the render keys unfolding into the migration service

Address review from @allozaur: the settings store no longer rewrites
persisted config on load, the raw text toggle now unfolds onto the
per-surface render keys in migration.service.ts, next to the other
config migrations. The mention scanner flag and the directory path
suffix become named constants.

4 weeks agoci : don't specify python version in server-sanitize for broader runner compatibility...
Sigbjørn Skjæret [Mon, 10 Aug 2026 11:32:22 +0000 (13:32 +0200)]
ci : don't specify python version in server-sanitize for broader runner compatibility (#26840)

* don't specify python version for broader runner compatibilty

* run the workflow

4 weeks agoserver: add more tool isolation support (ssh remote + podman rootless) (#26774)
Pascal [Mon, 10 Aug 2026 11:31:09 +0000 (13:31 +0200)]
server: add more tool isolation support (ssh remote + podman rootless) (#26774)

* server: add an ssh transport to the tools runtime

--tools-runtime ssh:<target> runs the built-in tools on a remote host,
where target is whatever ssh already resolves, a user@host or a config
alias, so no credentials live in llama.cpp.

Only build_argv and upload differ from the docker transport: the remote
shell re-parses the command line, so the argv travels through
shell_quote_join, and files go over scp with the same quoting on the
remote path. Authentication is key-based and the host key must already
be trusted, since the tools run without a console and any prompt would
hang them.

The target is validated before use. The spec can reach us from the
x-tool-runtime header, and a leading dash would turn it into an ssh
option, which is enough to run a command back on the host.

Nothing is created and nothing is reclaimed, so an ssh spec goes
straight to the tool call instead of through the container runtime.

Note that this is remoting rather than isolation: the tools can do
whatever the target account can do, and the isolation is whatever runs
them on the far side.

* server: support podman in the tools runtime

docker and podman expose the same run, exec, cp and inspect verbs with the
same argument order, so a single implementation drives both and the engine
is carried by the spec prefix: podman:<image> and podman-container:<id> sit
next to the docker forms.

tools_io_docker becomes tools_io_container and the runtime spawner becomes
server_tools_container_runtime, both holding the client binary chosen at
parse time. A single parse_container_runtime() resolves every spec, so
adding another engine is one string in the table.

make_tools_io() now rejects the spawning forms. The spec also reaches it
from the x-tool-runtime header, which is client controlled, and only the
runtime that owns a container is allowed to create one: a tool call can
attach to a running container, nothing more.

* ./build/bin/llama-gen-docs

* server: simplify the tools runtime and drop the file copy step

A server_tools_runtime base with one virtual spec() replaces the
container runtime and the bare spec string that ssh needed next to it,
so server_tools is back to a single pointer and neither setup nor the
handler tests which of the two is set.

write_file used to spill its content into a temporary file on the host
and copy it in, because run_subprocess had no way to feed a child. It
now takes an optional stdin payload and creates the parent directory
and the file in a single round trip through a shell in the isolate.

That removes the upload virtual and both implementations: no more
container cp or scp, no second binary on the host, no sftp subsystem on
the target, no predictable temporary in a shared tmp, and none of the
content reaching an argv the remote shell re-parses. It also fixes
write_file over ssh, which never worked: scp speaks sftp and takes the
remote path literally, so quoting it kept the quotes in the file name.

Writing the payload before reading the output relies on the child
draining stdin as it goes, which holds for cat, its only user today.

* ./build/bin/llama-gen-docs

* server: harden the tools runtime against argv injection and a stdin stall

Validate the container id from x-tool-runtime and --tools-runtime the
same way the ssh target already is, so an id shaped like an option
(docker-container:--privileged) is rejected before it reaches the
engine's exec command line instead of running against a hardened
container. Feed the child's stdin after the watchdog is armed, so a
transport that stalls mid-write is terminated at the deadline rather
than blocking the request forever.

Cover both guards and fix the unknown-scheme test, which used ssh: as
its example and now names a real runtime.

* tests: exercise the tools runtime tests on podman as well as docker

Follow-up #26507. The container runtime drives docker and podman
through one implementation, so parametrize the availability helper,
the container fixture and the attach test on the engine, and cover
both engine prefixes in the container id injection test. Each engine
skips on its own when it is not installed.

The spawn cleanup test stays docker only: it recovers the spawned id
from the container hostname, which docker sets to the short id and
podman rootless does not guarantee. Podman keeps its coverage through
the attach path.

* server: release the container handle before respawning

Follow-up #26507. create() writes over the handle it is given, so a
respawn after the container died on its own leaked the pipes and the
process handle of the previous one.

* server: trim the tools runtime comments

* server: read tool output as raw bytes and harden the runtime on Windows

The stdout pipe is read with read() instead of fgets(), so a chunk
can hold any byte, including NUL, and still streams as soon as data
is available. Past the size cap the pipe keeps draining so the child
never blocks on a full pipe. Both pipe fds are forced to binary mode
on Windows, where the CRT defaults them to text mode and translates
line endings in both directions. Stdin is now always closed after
the feed: the child reads a deterministic EOF, and the Windows
docker and ssh clients stop outliving their command on a stdin pipe
that never closes.

The attach form of --tools-runtime has no lifecycle to own, so it
becomes a static target validated once at startup. This removes the
 subprocess that ran on every tool call and
serialized calls behind a mutex; a stopped container now surfaces
the engine's own error at exec time.

The cidfile path is passed as UTF-8, matching the encoding the
subprocess layer expects for the CreateProcessW command line, so
the spawn form works from a non-ASCII Windows profile.

The SIGPIPE note in server.cpp now names the tools runtime children
as well as the MCP ones.

* clean up comments

* less pollute global scope

* nits

* tests: name the container image after both engines

---------

Co-authored-by: Xuan Son Nguyen <redacted>
4 weeks agomodel: Muse Glimmer Support (#26841)
Pedro Cuenca [Mon, 10 Aug 2026 11:07:27 +0000 (13:07 +0200)]
model: Muse Glimmer Support (#26841)

* Get started with Onyx

* Add architecture

* Skip keys handled in super()

* Loading tensors

* Shorten

* Graph

* Apply suggestion from @pcuenca

* Remove norm now embedding in transformers weights

* Add eot

* Explicit output_multiplier

* Handle post_norm_eps

* No super call; unhardcode eot.

The pattern `self._set_vocab_gpt2()` seems preferred throughout the
codebase, and it allows `set_vocab()` to be called from a different part
of the Python class hierarchy: the drafter model converter that we may
need eventually.

* Register for drafting

* DFlash: inherit rope type from the linked target.

Another option would be to store it in the gguf file itself.

* mmproj conversion

Note: some fields to be renamed after the implementation works. We are
keeping compatibility with the reference Meta gguf for testing purposes.

* "clip" header declarations

* Load mmproj

* Pre-processing

* Graph

* Go back to using delimiters.

Otherwise our generations are worse.

Transformers does not use them. We need to trace inputs to verify
whether they are equivalent.

* downsample_factor -> merge_size

* Add vision graph

lol, forgot from a previous commit

* Additional renames, align with llama.cpp / transformers

* Prefer _size instead of independent _h and _w

* Fix token layout

Co-authored-by: Young Han <redacted>
* onyx: bring the chat parser onto the onyx branch

common/chat.cpp on this branch has no Onyx handling, so a converted model
serves malformed chat: the assistant preamble leaks into content
("to=self<|message|>...") and tool calls fail with

    HTTP 500 "The model produced output that does not match the expected
              peg-native format"

common_chat_params_init_onyx exists on onyx-fair-patch, added there by
8bb73dd3d. It was never on this branch, so this is not a regression --
the two lines developed independently.

The code here is taken verbatim from that commit. It is the clean side of
`git merge origin/onyx-fair-patch`: chat.cpp is one of the files that
merges without conflict. The full merge is not viable -- it produces 13
conflicts, including add/add on conversion/onyx.py and src/models/onyx.cpp
where the q_norm-folding and metadata-scale approaches contradict each
other, and #4/#7 are stacked on this branch's side of that.

Verified on this branch: builds with 0 errors, converts an Onyx checkpoint,
and serving it gives "4" for "What is 2+2?" plus a correct
get_weather {"city":"Paris"} tool call, where the unported branch gives the
two failures above.

No converter or runtime changes are included, so this should not interact
with the q_norm work.

Co-authored-by: Beto de Paola <redacted>
* Less params, bilinear pos-emb interpolation as a graph op instead of CPU

* Map to symbolic V_MMPROJ instead of strings

* Make a couple params explicit

* Patchify via build_inp()

* No param for rope_theta

* Small cleanup

* Restore blank line

* Unpermute, to adapt to the latest transformers checkpoint

* Apply norm after token embeddings

This follows the latest transformers approach.

* Remove duplicated function

* build_vit

* onyx: use the model rope theta on sliding-window layers

* DFlash: conversion from transformers drafter

* Revert rope_type derivation from target

NOTE: this breaks compatibility with Meta's distributed DFlash GGUFs, as
the Q/K are stored in "NEOX" (rotated half) format, like in
transformers.

* Apply suggestion from @pcuenca

* Set model type

* Remove comment that will become obsolete

* Hardcode post_norm_rms_eps instead of new param

* Derive SWA+RoPE pattern from gguf array or scalar

* Fix model type <-> number of layers

* Reorder

* Rename

* Fix typo

* DFlash: seed the draft KV cache from multimodal embedding batches

`common_speculative_impl_draft_dflash::process()` returned early on any batch carrying embeddings, so an image prefill never had its target-layer features fused through the DFlash encoder and injected into the draft's KV cache. That left a hole spanning the image's positions, and the next injection at a post-image position failed to initialize its batch:

```
decoding image batch 1/1, n_tokens_batch = 256
decode: failed to initialize batch
llama_decode: failed to decode, ret = -1
process: llama_decode(ctx_dft) failed rc=-1 (n_tokens=17, offset=0)
srv decode: failed to process speculative batch
```

Every image request with `--spec-type draft-dflash` failed with HTTP 500. Text-only was unaffected, since those batches carry token ids and were let through.

Restore the earlier condition, which admits a batch that is either tokens or embeddings and skips only the degenerate neither/both cases. The rest of `process()` is already layout-agnostic -- it gathers features via `llama_get_embeddings_layer_inp()` and indexes `batch_in.pos[]` / `batch_in.seq_id[]`, none of which assume token ids -- so this is the whole fix.

Validated against `muse-glimmer-30B-bf16.gguf` + `mmproj-muse-glimmer-30B-bf16.gguf` + a DFlash draft head, on an image describe-the-shapes request:

- before: HTTP 500, `failed to process speculative batch`
- after: HTTP 200, draft acceptance 0.34012 (167 accepted / 491 generated), mean len 3.04

Output equivalence holds, which is the property that matters: at temperature 0 the drafted response is byte-identical to the same request served with no draft attached (1213/1213 chars), so the draft is drafting correctly through the image context rather than merely not crashing.

* Conversion: prefer rewrite to mapping

* Revert "Conversion: prefer rewrite to mapping"

This reverts commit a92d0ac584d315e876741e85b6dad3dbc8b23bf7.

* fix lint

* sliding_window metadata is not optional

* disable state save/load

* Apply suggestion from @pcuenca

---------

Co-authored-by: Young Han <redacted>
Co-authored-by: Beto de Paola <redacted>
Co-authored-by: Daniel Han <redacted>
Co-authored-by: ruanrms <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
4 weeks agochat : Align Laguna-S-2.1 chat template to huggingface (#26232)
Guido Imperiale [Mon, 10 Aug 2026 10:20:59 +0000 (11:20 +0100)]
chat : Align Laguna-S-2.1 chat template to huggingface (#26232)

4 weeks agovendor: sync subprocess.h and drop local patches (#26808)
Pascal [Mon, 10 Aug 2026 09:59:08 +0000 (11:59 +0200)]
vendor: sync subprocess.h and drop local patches (#26808)

Upstream merged the Windows argument quoting fix, the NetBSD build
fix and the chdir fallback for glibc older than 2.29, so pin the
vendored copy to a commit that carries all three and remove the
patch files along with the apply step in the sync script.

The new pin also brings the exec error report on glibc older than
2.24 and the ENOSYS mapping to a dedicated error code. Both are
additive and no caller inspects those values.

4 weeks agollama: Restore quantization of mmprojs (#26818)
Pedro Cuenca [Mon, 10 Aug 2026 09:58:32 +0000 (11:58 +0200)]
llama: Restore quantization of mmprojs (#26818)

* Restore quantization of mmprojs

This was lost in the refactor undertaken in #22004.

* add noreturn

---------

Co-authored-by: Xuan Son Nguyen <redacted>
4 weeks agoci: Add support for CUDA 13.4 ARM64 builds for Windows (#26650)
shivamkumard-ctrl [Mon, 10 Aug 2026 08:46:44 +0000 (14:16 +0530)]
ci: Add support for CUDA 13.4 ARM64 builds for Windows (#26650)

* ci: Add support for CUDA 13.4 ARM64 builds for Windows

Added an architecture-specific CUDA 13.4 Windows build entry targeting ARM64.
Added a CMake configuration to enable ARM64 CUDA cross-compilation from an x64 Windows environment using the x64-hosted CUDA and MSVC toolchain while linking against the ARM64 CUDA import libraries to produce ggml-cuda.dll.
Validated the self-hosted Windows x64 workflow, including toolkit acquisition, CMake configuration, ARM64 CUDA cross-compilation, and packaging. Runtime validation was performed separately on a native ARM64 RTX Spark system using TinyLlama 1.1B Q4_K_M to verify the generated binaries.
The ARM64 CUDA job builds only the ggml-cuda.dll backend (LLAMA_BUILD_SERVER=OFF). The release consists of two packages: the main ARM64 release package, which combines the existing ARM64 CPU outputs with ggml-cuda.dll, and a separate runtime package containing the required CUDA runtime libraries (cudart64_13.dll, cublas64_13.dll, and cublasLt64_13.dll).
The CUDA 13.4 setup uses NVIDIA Developer Preview component archives instead of the GA component downloads used by the existing CUDA setups and will require updates once CUDA 13.4 reaches GA.

* ci: cleans up to align with x64 CUDA setup

- Moves CUDA-specific CMake options into matrix defines.
- Keeps the CUB 3DOT2 option only for CUDA 12.4.
- Removes runtime argument construction and the unnecessary server option.
- Aligns ARM64 CUDA runtime packaging with the existing robocopy approach.
- Generalizes the ARM64 release label from CUDA 13.4 to CUDA 13.

* ci: Set CUDA job name as version-architecture pair

* mark as preview

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Georgi Gerganov <redacted>
4 weeks agomodel: add MTP support for Nemotron model (#26725)
Ruixiang Wang [Mon, 10 Aug 2026 08:25:24 +0000 (10:25 +0200)]
model: add MTP support for Nemotron model (#26725)

* model: add MTP support for Nemotron Nano model

* model: add mtp_flags for nemotron model

* address review comments

4 weeks agovendor : update cpp-httplib to 0.53.0 (#26821)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Mon, 10 Aug 2026 07:57:45 +0000 (04:57 -0300)]
vendor : update cpp-httplib to 0.53.0 (#26821)

4 weeks agomodel : Granite-Switch Architecture (#25107)
Bar Haim [Mon, 10 Aug 2026 07:53:46 +0000 (00:53 -0700)]
model : Granite-Switch Architecture (#25107)

* granite-switch: add llama.cpp backend (POC, CPU)

New "granite-switch" architecture: a dense, all-attention Granite-4.1
model with N embedded LoRA adapters selected per-token by control tokens.

- gguf-py schema (arch, KV keys, stacked LoRA tensor names) + writer helpers
- conversion/granite.py: GraniteSwitchModel converter (stacks N adapters +
  zero base slot into per-projection A/B tensors; emits switch metadata)
- C++ arch registration (llama-arch.{h,cpp}, llama-model.{h,cpp})
- src/models/granite_switch.cpp: load + per-token switched-LoRA graph via
  ggml_mul_mat_id over stacked tensors; sticky per-token index + control-token
  substitution in llm_graph_input_switch::set_input
- llm_graph_input_switch in src/models/models.h

Runs end-to-end on CPU: convert 3b checkpoint (842 tensors, stacked dim 13)
and generate on both base and control-token paths. Sticky switch state is
single-sequence (POC); full multi-sequence machinery is a follow-up.

* granite-switch: add Mac (Metal) build + mid-sequence switch demo script

Self-contained script to build llama.cpp on Apple Silicon (Metal),
convert the composed 3b checkpoint, and run the crisp mid-sequence
adapter-switch demos verified on Vela:
  - answerability: <|answerability|> mid-seq -> "unanswerable"
  - query_rewrite: <|query_rewrite|> mid-seq -> {"rewritten_question": ...}
Each demo runs the same prompt twice, differing only by a control token
placed before the assistant turn, so the per-token switch is visible.

* granite-switch mac demo: add -no-cnv so each run is one-shot

The composed model ships a chat template, so llama-completion auto-enables
interactive conversation mode and halts at a `>` prompt after generating,
stalling the script. -no-cnv disables conversation mode: generate once from
the raw prompt and exit (also prints special tokens, making the switch visible).

* granite-switch: replace global sticky index with in-graph router attention

The POC computed the per-token adapter index on the CPU and carried it
across ubatches in ONE global `mutable int32_t poc_sticky_index`, reset
only when a ubatch contained sequence position 0. That global had two
problems:

  1. Concurrency: with multiple sequences in a batch it was last-writer-
     wins — one sequence's adapter leaked into the others.
  2. Multi-turn: an interactive `ollama run` chat continues one KV cache,
     so turn 2 never saw position 0 and the index never reset — the
     adapter stayed stuck on across turns.

Port the vLLM/HF backend mechanism faithfully: a single-head causal
"router" attention recovers the adapter index in-graph. Per token, only
dim 0 carries signal — Q[0]=1, K[0]=+gain for a control token / -gain
otherwise, V[0]=adapter slot / 0 — and the causal softmax over the single
visible control token recovers that adapter's slot (readback =
clamp(round(V[0]), 0, n_adapters)). gain=15 matches config.py and is
F16-safe (no F32 cache).

The router's K/V live in the model KV cache at an extra layer
R == hparams.router_layer (== n_layer). We bump n_layer_all to n_real+1
so the cache allocator gives the router its own per-sequence slot, and
set n_layer_nextn=1 so n_layer() stays n_real — the decoder loop and
tensor loading are untouched and never reference layer R. The router K is
exempted from the k-shift RoPE loop (its dim-0 value is a literal
magnitude, not a rotation).

Because the selection now lives in the per-sequence KV cache, CONCURRENT
requests are isolated for free (problem 1 fixed; verified by
scratch/concurrent_switch_test.cpp). set_input becomes stateless pure
per-token maps; the global is gone.

Single-switch contract / known limitation, identical to vLLM & HF: the
gain is flat (no recency), so within one sequence there is no mechanism to
revert to base mid-sequence — once an adapter fires it stays on until that
sequence ends (problem 2 is therefore NOT fixed by a faithful copy; vLLM/HF
avoid it only because each served request is a fresh sequence). A client
continuing one KV cache across turns must start a fresh sequence per turn,
or opt into a recency-biased router (a deliberate divergence, not done
here). Documented in granite_switch.cpp and asserted by
scratch/multiturn_leak_test.cpp.

Verified (CPU): both demos unchanged (answerability -> "unanswerable",
query_rewrite -> rewritten query); concurrent two-sequence isolation
passes; multi-turn carry-over matches the vLLM/HF contract.

* granite-switch: drop scratch tests and mac demo for upstream PR

Remove the local-only development artifacts that should not ship in the
upstream PR:
  - granite-switch-mac-demo.sh (local Metal build + demo driver)
  - scratch/concurrent_switch_test.cpp
  - scratch/multiturn_leak_test.cpp

Also drop the now-dangling reference to the scratch tests from the
granite_switch.cpp header comment. Leaves only the core architecture
support (conversion, gguf constants, llama-arch/model/kv-cache, and the
granite_switch graph).

* granite-switch: trim comments to match native llama.cpp style

* granite-switch: trim conversion comments to match native style

* granite-switch: drop unused adapter_ranks metadata

* granite-switch: rename arch to graniteswitch and drop obid alias

* granite-switch: fix non-ASCII comments and document router gain assumption

* granite-switch: drop section comments from constants.py to match native style

* granite-switch: add functional tensor block comments matching Granite4 Vision style

* granite-switch: clarify n_expert_used comment

State the actual constraint: mul_mat_id needs n_expert_used == 1, and
since the GGUF carries expert_count = 0 the generic loader's
n_expert == 0 => n_expert_used == 0 assertion has already passed by the
time load_arch_hparams runs, so it is forced to 1 here.

* granite-switch: note n_layer_nextn reuse has no MTP

The router carving reuses n_layer_nextn, normally the MTP/next-token
count. Clarify in the comment that it is borrowed here purely as the
trailing-layers lever and that there is no MTP head, to spare readers
the double-take.

* granite-switch: rename source file and apply review nits

* granite-switch: don't force LoRA tensors to F16, follow --outtype instead

* granite-switch: drop redundant _permute_qk wrapper, call LlamaModel.permute directly

* granite-switch: read router gain from GGUF (control_token_gain) instead of hardcoding 15.0

* granite-switch: derive n_slots()

* granite-switch: move llm_graph_input_switch into granite-switch.cpp

* granite-switch: cut AI-style narration comments

* granite-switch: collapse multi-line comments

* granite-switch: rename control_token_* maps to adapter_token_*

* granite-switch: cut noise comments

* granite-switch: rename embedded LoRA tensors to <base>.lora_a/lora_b

* granite-switch: GGML_ASSERT token input to avoid UB on embeddings

* granite-switch: TODO for raw embedding input support

* granite-switch: collapse LoRA tensor constants to .lora_a/.lora_b suffix

* granite-switch: drop n_expert_used hack, guard mul_mat_id buft probe

* granite-switch: stop forcing dense expert counts, read from config

* granite-switch: renamed control_token_gain metadata key to router_gain

* granite-switch: trim header comments to match native style

* granite-switch: collapse LoRA tensors to base name + suffix

* granite-switch: inline suffix checks in tensor op resolution

* granite-switch: drop switch-lora struct comment

* granite-switch: guard router layer index and inline n_slots

* granite-switch: group adapter metadata under {arch}.adapters.* namespace

* granite-switch: add hparams.has_rope(il) for KV-shift rope skipping

* granite-switch: skip arch in test-llama-archs (adapter fixture missing, TODO)

* granite-switch: Keys.Adapters namespace + simplify n_slots

* granite-switch: validate substitute token ids against n_vocab

* granite-switch: bound adapter count and lora rank from GGUF

* granite-switch: reject MTP context type when router_layer is set

* granite-switch: throw on bad adapter metadata instead of GGML_ASSERT

* granite-switch: use ASCII +/- in router K signal comment

* granite-switch: document n_layer_nextn repurpose and its leak points

* granite-switch: gate lora_a/lora_b op mapping on router_layer

* granite-switch: label all three preview model sizes

4 weeks agoreadme : remove dev branches (#26832)
Georgi Gerganov [Mon, 10 Aug 2026 06:53:26 +0000 (09:53 +0300)]
readme : remove dev branches (#26832)

4 weeks agoui: Linting & Formatting scripts (#26819)
Aleksander Grygier [Mon, 10 Aug 2026 06:38:37 +0000 (08:38 +0200)]
ui: Linting & Formatting scripts (#26819)

4 weeks agoserver: gate the docker tools runtime tests on a real container run (#26826)
Pascal [Mon, 10 Aug 2026 06:32:58 +0000 (08:32 +0200)]
server: gate the docker tools runtime tests on a real container run (#26826)

docker info only proves the daemon answers, so the Windows CI passes
the check and then dies trying to run a linux image. The hosted
Windows runners cannot run one: GitHub states the VMs are not enabled
for nested virtualization and will not be, since they already sit one
level deep and the hypervisor does not support more levels
(https://github.com/orgs/community/discussions/25491). Probing the
image itself skips those tests there, and pulls it before the server
waits for the container id.

4 weeks agomodel-saver : fix expert shared/chunk FFN length key clobber (#26693)
Caleb DeLeeuw [Mon, 10 Aug 2026 06:32:01 +0000 (23:32 -0700)]
model-saver : fix expert shared/chunk FFN length key clobber (#26693)

The saver called add_kv with LLM_KV_EXPERT_SHARED_FEED_FORWARD_LENGTH twice, the
second time passing n_ff_chexp. gguf_set_val_u32 removes-then-appends, so the second
call clobbers the first: the saved shared_feed_forward_length ends up as n_ff_chexp
(0 for every arch except GroveMoE), and expert_chunk_feed_forward_length is never
written at all.

So a save->load roundtrip of any MoE model with a shared expert loses n_ff_shexp. On
reload the arch falls back to n_ff for the shexp tensor shape, that no longer matches
the saved tensor, and the model FAILS to load. Hits qwen2moe, qwen3-next, granite-moe,
hunyuan-moe, ernie4.5, bailingmoe2, nemotron-h, and the other shared-expert MoEs.

Fix: the second call writes LLM_KV_EXPERT_CHUNK_FEED_FORWARD_LENGTH.

test-llama-archs: set expert_shared_feed_forward_length to a value distinct from n_ff
in the MoE setup so the roundtrip exercises it. Without the fix the reload fails on a
shexp tensor-shape mismatch; with it, every arch roundtrips clean.

4 weeks agoci: fix the ctest sanitize runs (#26593)
Eve [Mon, 10 Aug 2026 06:31:28 +0000 (06:31 +0000)]
ci: fix the ctest sanitize runs (#26593)

* Update build-sanitize.yml

* make it run on pr

* fix thread

* Update build-sanitize.yml

* Update build-sanitize.yml

* just run thread on github machine

4 weeks agoggml-webgpu : refactor several wgsl files and simplify flash_attn wgsl. (#26134)
Masashi Yoshimura [Mon, 10 Aug 2026 06:29:41 +0000 (15:29 +0900)]
ggml-webgpu : refactor several wgsl files and simplify flash_attn wgsl. (#26134)

4 weeks agoui: degrade the working directory picker when file search is off (#26811)
Pascal [Sun, 9 Aug 2026 19:20:23 +0000 (21:20 +0200)]
ui: degrade the working directory picker when file search is off (#26811)

The picker mounts whenever a cwd-aware builtin tool is enabled, so
it can open while file_glob_search is not served or was disabled by
the user. Every typed query then fired a search that could only
fail with a raw error.

Gate the debounced search on the tool state, the same way the
mention picker does, and show a message in place of the results
list that explains why search is unavailable. Manual entry with
Enter still commits a directory. The Browse button and the search
scope footer are hidden as well: Browse resolves the picked folder
name through file_glob_search, and the client-side toggle would not
stop that call.

4 weeks agoci: add pr-draft-label (#26801)
Xuan-Son Nguyen [Sun, 9 Aug 2026 14:51:21 +0000 (16:51 +0200)]
ci: add pr-draft-label (#26801)

4 weeks agoggml-cpu : fix missing Q5_0 dispatch in SpaceMiT backend (#26792)
Hao-Chen2337 [Sun, 9 Aug 2026 10:16:53 +0000 (18:16 +0800)]
ggml-cpu : fix missing Q5_0 dispatch in SpaceMiT backend (#26792)

4 weeks agoci: rm `GGML_HIP_ROCWMMA_FATTN` (#26760)
Aaron Teo [Sun, 9 Aug 2026 10:15:28 +0000 (18:15 +0800)]
ci: rm `GGML_HIP_ROCWMMA_FATTN` (#26760)

Signed-off-by: Aaron Teo <redacted>
4 weeks agoserver: report the isolate working directory from get_info (#26773)
Pascal [Sat, 8 Aug 2026 22:42:50 +0000 (00:42 +0200)]
server: report the isolate working directory from get_info (#26773)

* server: report the isolate working directory from get_info

Without an explicit cwd, get_info fell back to the server process
working directory even when a tools runtime was configured. That named a
host path no tool would ever run in, since an isolate starts in a
directory of its own.

It now asks the isolate for its working directory in that case, and
keeps the process one only when the tools run on the host.

* remove redundant comment

---------

Co-authored-by: Xuan-Son Nguyen <redacted>
4 weeks agoCUDA: fuse rms_norm + mul + rope (+ view + set_rows) (#26767)
Rafail Giavrimis [Sat, 8 Aug 2026 16:32:37 +0000 (17:32 +0100)]
CUDA: fuse rms_norm + mul + rope (+ view + set_rows) (#26767)

* CUDA: fuse rms_norm + mul + rope (+ view + set_rows)

* tests: add broadcast weight case to rms_norm_mul_rope

* CUDA: check memory ranges before rms_norm rope fusion

* CUDA: check memory ranges in rope set_rows fusion

4 weeks agoserver, ui: only offer a working directory when a tool reads it (#26762)
Pascal [Sat, 8 Aug 2026 14:36:21 +0000 (16:36 +0200)]
server, ui: only offer a working directory when a tool reads it (#26762)

The working directory chip showed up as soon as the server exposed any
builtin tool, so a server started with just get_datetime, or a user who
turned every filesystem tool off in the settings, still got a control
that nothing would read.

Tools now declare whether they resolve their paths and run against the
working directory, next to the write permission they already publish in
the /tools listing. The WebUI shows the chip and enables the /cwd
command only when at least one such tool is both served and left
enabled.

4 weeks agoserver: add initial tool isolation support (via docker) (#26507)
Xuan-Son Nguyen [Sat, 8 Aug 2026 14:35:53 +0000 (16:35 +0200)]
server: add initial tool isolation support (via docker) (#26507)

* server: add initial tool isolation support (via docker)

* add docs

* adapt get_info

* py: fix type check

* cont

* separate tools_io_sandbox / tools_io_docker

* rename sandbox --> isolate

* x-tool-docker --> x-tool-runtime

---------

Co-authored-by: Pascal <redacted>
4 weeks agoCUDA: fix thread/block count in quantized cpy kernel launches (#26731)
Rafail Giavrimis [Sat, 8 Aug 2026 04:40:04 +0000 (05:40 +0100)]
CUDA: fix thread/block count in quantized cpy kernel launches (#26731)

* CUDA: fix thread/block count in quantized cpy kernel launches

* tests: add uneven block count cpy case

4 weeks agotts: account for the vocoder pass in the timings line (#26733)
Pascal [Fri, 7 Aug 2026 20:35:52 +0000 (22:35 +0200)]
tts: account for the vocoder pass in the timings line (#26733)

get_output runs the waveform work the pipeline defers to it, from a
single trailing window to a full pass depending on the model. Measuring
it keeps the reported total and the audio to process ratio honest.

4 weeks agoallozaur/feat/chat form contenteditable (#26717)
Aleksander Grygier [Fri, 7 Aug 2026 18:40:10 +0000 (20:40 +0200)]
allozaur/feat/chat form contenteditable (#26717)

* feat: Add contenteditable tokenizer for badge/code-chip chat input

* feat: Add source-space undo/redo history for the rich input

* feat: Split text glued to a closing code fence onto its own line

* feat: Add ChatFormContenteditable rich input renderer

* feat : wire the contenteditable into ChatForm with auto-switch gating

4 weeks agotests : speed-up server test suite 3x (#26734)
Georgi Gerganov [Fri, 7 Aug 2026 18:38:32 +0000 (21:38 +0300)]
tests : speed-up server test suite 3x (#26734)

* tests : speed-up test suite 3x

* cont : print 30 slowest tests

4 weeks agoallozaur/feat/chat slash commands (#26716)
Aleksander Grygier [Fri, 7 Aug 2026 18:20:01 +0000 (20:20 +0200)]
allozaur/feat/chat slash commands (#26716)

* base : slash-command/misc foundation - model icon and focus-selector constants

* feat : slash-command picker and command parsing helpers

* refactor : wire command and @-mention pickers into the chat form

* ui : improve model selector keyboard navigation and load/dismiss

* feat: Unify markdown/raw-text rendering under one setting with migration

* fix: Misc fixes - tool-call subtitle, assistant wrap, progress guards

* feat: Clamp and style numeric settings inputs from registry bounds

4 weeks agosycl: coalesce the ssm_conv window loads (#26612)
Titaniumtown [Fri, 7 Aug 2026 18:09:32 +0000 (11:09 -0700)]
sycl: coalesce the ssm_conv window loads (#26612)

test-backend-ops perf -o SSM_CONV on an Arc Pro B70, interleaved A/B against
master, 6 reps, us/run:

  ne_a=[515,3328,1,1] ne_b=[4,3328,1,1]   n_t=512     97.68 -> 52.95   1.85x
  ne_a=[937,8192,1,1] ne_b=[4,8192,1,1]   n_t=934    516.16 -> 276.13  1.87x
  ne_a=[4,3328,1,1]   ne_b=[4,3328,1,1]   n_t=1        2.73 -> 2.71    flat

llama-bench on qwen35 27B Q4_K - Medium (48 of its 64 blocks run ssm_conv),
-ngl 99 -fa 1 -ctk f16 -ctv f16, interleaved passes of r=3:

  -b 2048 -ub 2048  pp2048  1045.1 / 1043.5 / 1043.7 -> 1069.5 / 1066.3 / 1065.9  +2.2%
  -b 2048 -ub 512   pp2048   771.8 /  772.7          ->  785.5 /  786.6           +1.8%
  -b 2048 -ub 512   tg128     23.81 /  23.88         ->   23.87 /  23.86          flat

4 weeks agometal : fix NORM/RMS_NORM for row lengths that leave a partial simdgroup (#26708)
robertomeroni [Fri, 7 Aug 2026 18:09:07 +0000 (20:09 +0200)]
metal : fix NORM/RMS_NORM for row lengths that leave a partial simdgroup (#26708)

ggml_metal_op_norm sized the threadgroup with
`nth = std::min(nth, args.ne00_t)`, which can leave nth not a multiple of
the simdgroup size. The kernels finish their row reduction with a
cross-simdgroup step where each lane of the last simdgroup reads one
per-simdgroup partial sum out of shmem_f32:

    if (tiisg == 0) { shmem_f32[sgitg] = sumf; }
    threadgroup_barrier(mem_flags::mem_threadgroup);
    sumf = shmem_f32[tiisg];
    sumf = simd_sum(sumf);

When the last simdgroup is partial it has fewer lanes than the
threadgroup has simdgroups, so the tail of the partial sums is never
read and the row sum is too small. For ne00_t = 33 nth becomes 33: two
simdgroups, but only one lane in the second, so one of the two partial
sums is dropped. The mean and variance are then wrong for the whole row.

Round ne00_t up to a whole number of simdgroups instead. Rounding up
rather than dropping the clamp keeps the threadgroup as small as
possible: deleting the line would raise nth to the next power of two
(ne00_t = 544 -> 1024 instead of 544), which costs idle lanes on 26 row
lengths below 8192 that were already correct, including 1536 and 3584.

GGML_OP_NORM is affected as well as GGML_OP_RMS_NORM - both dispatch
through ggml_metal_op_norm.

No mainstream LLM hidden size hits this: ne00_t is ne00/4 on the
vectorized path, so 4096, 8192, 2048 and friends all give a multiple of
32. It is reachable from other norm shapes, e.g. 320-channel norms.

Add NORM and RMS_NORM cases for ne0 = 33, 132 and 260 across the
existing eps values. 33 exercises the scalar path and 132/260 the
vectorized one, since only those divide by 4.

Before, on M3 Pro:

    test-backend-ops test -b MTL0 -o NORM        25/50
    test-backend-ops test -b MTL0 -o RMS_NORM    26/51

After:

    test-backend-ops test -b MTL0 -o NORM        50/50
    test-backend-ops test -b MTL0 -o RMS_NORM    51/51
    test-backend-ops test -b MTL0                13943/13943

4 weeks agoui: Filesystem `@mentions` for Chat Form (#26715)
Aleksander Grygier [Fri, 7 Aug 2026 16:45:54 +0000 (18:45 +0200)]
ui: Filesystem `@mentions` for Chat Form (#26715)

* base : @-mention picker foundation - glob search, picker nav, highlight

* feat : @-mention file/folder picker and mention badges in message bubbles

* fix: Imports

* feat : wire the @-mention picker into the chat form

* fix: Bound the glob-search result cache key and prune stale entries

4 weeks agomtmd: fix longest_edge ignoring min/max pixels (#26638)
Xuan-Son Nguyen [Fri, 7 Aug 2026 16:05:15 +0000 (18:05 +0200)]
mtmd: fix longest_edge ignoring min/max pixels (#26638)

* mtmd: fix longest_edge ignoring min/max pixels

* nits

4 weeks agosync : ggml
Georgi Gerganov [Fri, 7 Aug 2026 14:10:39 +0000 (17:10 +0300)]
sync : ggml

4 weeks agoggml : bump version to 0.19.0 (ggml/1581)
Georgi Gerganov [Fri, 7 Aug 2026 14:10:01 +0000 (17:10 +0300)]
ggml : bump version to 0.19.0 (ggml/1581)

4 weeks agoserver : clarify comment in eval_llama_cmpl_schema [no ci] [no release] (#26720)
Daniel Bevenius [Fri, 7 Aug 2026 13:39:33 +0000 (15:39 +0200)]
server : clarify comment in eval_llama_cmpl_schema [no ci] [no release] (#26720)

4 weeks agowebui: load the model selected via ?model= when ?load=true (#26707)
Emanuil Rusev [Fri, 7 Aug 2026 13:31:40 +0000 (16:31 +0300)]
webui: load the model selected via ?model= when ?load=true (#26707)

* webui: load the model selected via ?model=

Opening the WebUI with ?model= selects the model but doesn't load it. The load only starts when you send your first message, so you wait for it then.

This loads it as soon as the page opens, while you're still typing your prompt. It's what the model dropdown already does, and it isn't awaited, so the UI still works while the model loads.

This is the path the Llama macOS app uses to open the WebUI, so it's a common way in.

* webui: gate the load behind ?load=true

Loading on landing is opt-in, so a plain ?model= link behaves as before and doesn't allocate memory on its own.

* webui: name the chat URL params

Collects the query params the chat routes read into a URL_PARAMS constant, instead of repeating the literals across three files. NEW_CHAT_PARAM folds into it.

4 weeks agoui: set npm `min-release-age` to protect against supply-chain attacks (#26711)
Niklas Wenzel [Fri, 7 Aug 2026 12:53:51 +0000 (14:53 +0200)]
ui: set npm `min-release-age` to protect against supply-chain attacks (#26711)

* ui: set npm `min-release-age` to protect against supply-chain attacks

* ui: bump to 7 days

4 weeks agoserver: (router) add LRU scheduler (#26572)
Xuan-Son Nguyen [Fri, 7 Aug 2026 12:46:53 +0000 (14:46 +0200)]
server: (router) add LRU scheduler (#26572)

* add lru_sched

* handle coalescing (req leaves waiting queue)

* add tests

* fix stream case

* address review comments

4 weeks agoserver: (router) do not evict busy models (#26567)
Xuan-Son Nguyen [Fri, 7 Aug 2026 12:39:59 +0000 (14:39 +0200)]
server: (router) do not evict busy models (#26567)

4 weeks agomtmd: stop feeding the text stream again during Qwen3-TTS generation (#26706)
Pascal [Fri, 7 Aug 2026 11:32:52 +0000 (13:32 +0200)]
mtmd: stop feeding the text stream again during Qwen3-TTS generation (#26706)

The reference implementation has two mutually exclusive prompt layouts.
In non streaming mode the prefill carries the whole utterance text plus
tts_eos summed with codec_pad, and the trailing text hidden collapses to
a single tts_pad row. In streaming mode the prefill carries only the
first text token and the trailing rows stream the rest of the text
followed by tts_eos.

The pipeline built the non streaming prefill but the streaming overlay,
so the talker saw the utterance a second time during generation and read
it twice before emitting codec_eos.

The overlay is now the single tts_pad row that matches the prefill.

4 weeks agoggml : add aarch64 HWCAP fallbacks and fix fp16 variant detection (#25554)
Kilian Hu [Fri, 7 Aug 2026 11:07:10 +0000 (13:07 +0200)]
ggml : add aarch64 HWCAP fallbacks and fix fp16 variant detection (#25554)

* ggml : add fallback definitions for missing aarch64 HWCAP bits

* ggml : require HWCAP_ASIMDHP for the aarch64 fp16 cpu variants

Also rename has_fp16_va to has_fp16, the field gates the whole FEAT_FP16
extension, scalar and vector half-precision arithmetic together.

4 weeks agoui: read model modalities from the router model list (#26709)
Pascal [Fri, 7 Aug 2026 10:07:58 +0000 (12:07 +0200)]
ui: read model modalities from the router model list (#26709)

* ui: read model modalities from the router model list

The router advertises input modalities for every model, loaded or not.
Reading them at list build time lets the UI accept image and audio
uploads for a model selected through ?model=, which has no /props yet.

* enum

4 weeks agoMitigate crashing issue on Windows MSYS2 UCRT64 environment (GCC 16.1.0) (#26555)
Masato Nakasaka [Fri, 7 Aug 2026 09:17:16 +0000 (02:17 -0700)]
Mitigate crashing issue on Windows MSYS2 UCRT64 environment (GCC 16.1.0) (#26555)

4 weeks agosycl: fix UE4M3 parsing (#25608)
Chris Lee [Fri, 7 Aug 2026 05:28:53 +0000 (23:28 -0600)]
sycl: fix UE4M3 parsing (#25608)

The NVFP4 quantization format stores a scaling factor for every group of
16 weights, packed into a single UE4M3 byte.

The SYCL GPU code was converting these scale values using the E4M3 path,
but that's *signed*, and these are unsigned values.

4 weeks agosycl: *glu flat path (#26354)
Titaniumtown [Fri, 7 Aug 2026 05:24:40 +0000 (22:24 -0700)]
sycl: *glu flat path (#26354)

* tests: add SWIGLU perf cases

perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and
2048 tokens, f16 and f32, with the operands both fused and split.

* sycl: consolidate fused-GLU kernels

They differed only in which op_* they called, so take the op as an argument and share a common launcher.
Their block sizes were all 256, so launch geometry is unchanged;
SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped.

* sycl: contiguous fast path for the fused GLU ops

o0 == n and o1 == n collapse the de-interleave index math to the
identity, so dispatch a flat kernel in that case. It fires for
ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the
strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split
+14% f16 and +4% f32, fused unchanged.

4 weeks agosycl : Support DSv4 OPs: LIGHTNING_INDEXER,DSV4_HC_COMB,DSV4_HC_POST,DSV4_HC_PRE...
Neo Zhang [Fri, 7 Aug 2026 05:22:23 +0000 (13:22 +0800)]
sycl : Support DSv4 OPs: LIGHTNING_INDEXER,DSV4_HC_COMB,DSV4_HC_POST,DSV4_HC_PRE (#26568)

* support DSv4 OPs: LIGHTNING_INDEXER,DSV4_HC_COMB,DSV4_HC_POST,DSV4_HC_PREwq

* update ops.md

* fix format issue

4 weeks agosycl : update guide Q&A and script for device setting (#26442)
Neo Zhang [Fri, 7 Aug 2026 05:18:47 +0000 (13:18 +0800)]
sycl : update guide Q&A and script for device setting (#26442)

4 weeks agosycl : fix error Error OP FLASH_ATTN_EXT on arc770 (#26441)
Neo Zhang [Fri, 7 Aug 2026 05:17:56 +0000 (13:17 +0800)]
sycl : fix error Error OP FLASH_ATTN_EXT on arc770 (#26441)

4 weeks agosycl : enhance OP set_rows to support all missed data types (#26515)
Neo Zhang [Fri, 7 Aug 2026 04:52:52 +0000 (12:52 +0800)]
sycl : enhance OP set_rows to support all missed data types (#26515)

* support fp16 to fp16/fp32

* support all missed data types in set_rows

* refactor the code to support all data types

4 weeks agocuda: fix warnings for unused variable/function (#26688)
David Friehs [Fri, 7 Aug 2026 04:51:56 +0000 (06:51 +0200)]
cuda: fix warnings for unused variable/function (#26688)

4 weeks agoci: abort if build requirements are missing (#26368)
Niklas Wenzel [Fri, 7 Aug 2026 04:50:48 +0000 (06:50 +0200)]
ci: abort if build requirements are missing (#26368)

1. Abort CI if build requirements are missing.
2. Add check to make sure Git LFS has been configured.
3. Add trailing newlines to log messages.

4 weeks agometal : avoid `threadgroup` matrix array instantiation in kernel_lightning_indexer...
JamePeng [Fri, 7 Aug 2026 04:49:14 +0000 (12:49 +0800)]
metal : avoid `threadgroup` matrix array instantiation in kernel_lightning_indexer (#26646)

- In MSL, declaring an array of matrix types like `threadgroup half4x4` causes
a 'no matching constructor' compilation error because MSL matrix types do not
have zero-argument default constructors and threadgroup variables cannot have
initializers.

- Fix this by declaring a POD `threadgroup half` array instead and casting
to `threadgroup half4x4 *` for matrix indexing.

Signed-off-by: JamePeng <redacted>
4 weeks agomtmd: add chunk save/load function (#26645)
Xuan-Son Nguyen [Thu, 6 Aug 2026 17:46:40 +0000 (19:46 +0200)]
mtmd: add chunk save/load function (#26645)

* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT

4 weeks agoserver: fix empty response for /cors-proxy (#26656)
Xuan-Son Nguyen [Thu, 6 Aug 2026 13:07:22 +0000 (15:07 +0200)]
server: fix empty response for /cors-proxy (#26656)

4 weeks agoconvert : fix DeepseekV4 rope parameters with transformers 5.x (#26673)
Sigbjørn Skjæret [Thu, 6 Aug 2026 13:06:52 +0000 (15:06 +0200)]
convert : fix DeepseekV4 rope parameters with transformers 5.x (#26673)

4 weeks agomodel-loader : fix quantized reshaped tensor strides (#26672)
Georgi Gerganov [Thu, 6 Aug 2026 12:21:44 +0000 (15:21 +0300)]
model-loader : fix quantized reshaped tensor strides (#26672)

4 weeks agoconvert : accept "ExaoneMoeForCausalLM" arch spelling (#26660)
Csaba Kecskemeti [Thu, 6 Aug 2026 10:56:04 +0000 (03:56 -0700)]
convert : accept "ExaoneMoeForCausalLM" arch spelling (#26660)

4 weeks agoci : onboard AMD ROCm CI with gfx1151 fixes (#26544)
Jim Wu [Thu, 6 Aug 2026 08:43:26 +0000 (01:43 -0700)]
ci : onboard AMD ROCm CI with gfx1151 fixes (#26544)

* ci: prepare for amd rocm ci

Signed-off-by: Aaron Teo <redacted>
* ci: fix editorconfig-checker

Signed-off-by: Aaron Teo <redacted>
* ci: fix device not recognised

Signed-off-by: Aaron Teo <redacted>
* ci: rename gpu-amd to gpu-hip

Signed-off-by: Aaron Teo <redacted>
* ci: gpu-hip to gpu-rocm

haha

Signed-off-by: Aaron Teo <redacted>
* CUDA: allow integrated-GPU host output buffer in debug assert

On integrated GPUs (APUs), the scheduler can legitimately place a graph
node's output on the host-visible buffer, which ggml_cuda_compute_forward
already handles. The debug assert in ggml_cuda_graph_evaluate_and_capture
required every node output to be on the device buffer, so a debug build
aborts on such a node (e.g. attn_residual ADD -> ROCm_Host on RDNA3.5).
The source-tensor assert directly below already permits this via the
integrated + cuda_host exception; apply the same exception to the node's
own output buffer. Debug-only; no effect on release/compute.

Fixes test-recurrent-state-rollback on gfx1151 (Strix Halo).

* ci: enable unified memory for ROCm gfx1151 job

Work around a coherence issue on integrated RDNA3.5 (gfx1151) where GPU
kernels reading mmap-loaded weights can return incorrect output, which
makes test-llama-archs (and real inference) intermittently wrong.
GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 uses managed memory, which restores
coherence. Remove once the underlying ROCm/HIP issue is fixed.

* test-llama-archs: skip jamba on HIP backend

jamba produces incorrect output (~0.55 NMSE vs CPU) on the HIP backend on
RDNA3.5 (gfx1151); the SSM kernels need separate investigation. Skip it
for now, matching the existing per-backend carve-outs (WebGPU), so the
ROCm CI can run the test for the remaining architectures.

* ci: use HIP_LAUNCH_BLOCKING for ROCm gfx1151 job

The gfx1151 ROCm CI job produced incorrect inference output (qwen3 perplexity ~88 vs ~9.4) due to an async-execution correctness issue in the HIP path. Serializing kernel launches with HIP_LAUNCH_BLOCKING=1 restores correctness. This replaces the earlier GGML_CUDA_ENABLE_UNIFIED_MEMORY workaround, which did not fix batched inference.

* test-backend-sampler: skip top-k subtests on HIP backend

The ROCm backend does not support the TOP_K/ARGSORT op at vocab scale (no CUB; bitonic argsort is capped at ncols <= 1024), so top-k/top-p backend samplers cannot be offloaded. The penalties, set_sampler, mixed, and top_p subtests assert that offload happened, so they fail on HIP. Skip them until TOP_K is supported on the ROCm backend.

* Update tests/test-backend-sampler.cpp

Co-authored-by: Aaron Teo <redacted>
* Update tests/test-backend-sampler.cpp

Co-authored-by: Georgi Gerganov <redacted>
---------

Signed-off-by: Aaron Teo <redacted>
Co-authored-by: Aaron Teo <redacted>
Co-authored-by: Jim Wu <redacted>
Co-authored-by: Aaron Teo <redacted>
Co-authored-by: Georgi Gerganov <redacted>
4 weeks agomodel-conversion : add --model-name to conversion scripts (#26665)
Daniel Bevenius [Thu, 6 Aug 2026 07:38:06 +0000 (09:38 +0200)]
model-conversion : add --model-name to conversion scripts (#26665)

This commit adds the --model-name flag to the causual and embedding
model conversion scripts.

The motivation for this is that this is the name used for the metadata
field general.name and it can be useful to specify this explicitely if
the default (the basename of the model path) is not what we want.

4 weeks agovulkan: fix submission batching size, add debug tools for diagnosing causes of Device...
Ruben Ortlam [Thu, 6 Aug 2026 07:24:13 +0000 (09:24 +0200)]
vulkan: fix submission batching size, add debug tools for diagnosing causes of DeviceLost drivers errors (#26371)

* vulkan: add debug tooling to get more information about a DeviceLost error

* fix submission threshold applied too late

* use logging macros, throw instead of aborting

* clean up circular dependency

4 weeks agomtmd/ggml: add ggml_build_forward_order (#26649)
Pascal [Wed, 5 Aug 2026 22:47:59 +0000 (00:47 +0200)]
mtmd/ggml: add ggml_build_forward_order (#26649)

* ggml: add ggml_build_forward_order

ggml_build_forward_expand marks the tensor and all its ancestors for
compute, so using it as a pure ordering hint (keeping q, k and v
together) defeats ggml_build_forward_select: the unselected branch is
forced to run with inputs that were never uploaded. In the mtmd audio
graph this makes GEN_WAV calls execute the GEN_CODE branch with a
stale inp_code0, hitting the get_rows bound assert on CPU.

Add ggml_build_forward_order, which inserts nodes without the compute
flag; the flag is restored when the branch is actually selected.
Switch the q/k/v hints in clip_graph::build_attn to it.

* nit: reduce comments (AGENTS.md)

4 weeks agoserver: harden the file_glob_search directory walk (#26626)
Pascal [Wed, 5 Aug 2026 19:31:54 +0000 (21:31 +0200)]
server: harden the file_glob_search directory walk (#26626)

* server: don't walk Windows junctions in file_glob_search

std::filesystem reports a junction as a plain directory, so the symlink
guard misses it and a junction pointing back at an ancestor is walked
until the path length gives out

read the reparse tag and treat a symlink and a mount point as links,
leaving any other reparse point walkable so cloud placeholders and dedup
stubs still get searched

look junk directory names up case insensitively on Windows, where NTFS
makes Build the same directory as build

test that a junk directory stays selectable while its contents stay out
of search results

* server: report a directory the walk could not read

a directory that fails to open or to iterate was skipped in silence, so
a caller got a listing that looked complete while a whole subtree was
missing: a path over the platform limit, a volume going away, a name the
filesystem rejects

skip_permission_denied never reaches this path, so an error here is an
incomplete answer rather than a deliberate omission, and it now sets the
truncated flag

* server: simplify the file_glob_search listing plumbing

return a small result struct instead of two out params and a caller path
that only fed an error string, taking list_entries from six parameters
down to three

scope the error code to the directory being read, act on the status code
the entry lookups already returned, and treat an unreadable link state as
a link so the walk never descends on a guess

check the deadline when a directory is popped, not only per entry, so a
tree of empty directories cannot outlive the budget

read the path parameter once, and reject an invalid limit the way an
invalid type is already rejected, instead of silently falling back

normalize the resolved path, so a "." or ".." a caller typed reaches
neither git nor the client, and return the generic path form with '/'
separators on every platform, so the base sent to clients no longer needs
a local fixup

* ui: expire cached picker searches

the cache grew for the lifetime of the component: entries went stale
after the TTL but were never removed, so every distinct query typed in a
session stayed in memory

drop expired entries when a new result is stored

* server: address review from @ngxson

trim comments to one line each, and drop two that restate the code

rename junk_lookup_name to get_effective_name, and move it and the link
check to private static members next to junk_dir_names

merge the Windows and Linux link checks into one is_link, so symlinks are
checked everywhere and junctions only add to it on Windows

* server: convert tool paths as UTF-8 on Windows

a narrow path uses the active code page there, so a file name came back
mangled and a path with an accent could not be opened at all

convert explicitly at every crossing between a std::string, which always
carries UTF-8 here, and fs::path

read the home directory through the wide environment, since the narrow
one returns the profile path in the active code page too

the walker no longer normalizes separators by hand, since paths now come
back in generic form

* server: fold the platform branch inside console_output_to_utf8

match the shape of the other helpers, one definition with the #if inside,
instead of two definitions wrapped in #if and #else

inline the single caller helper and trim the comment

4 weeks agotests: re-enable MiniMax M3 in `test-llama-archs` (#26633)
Niklas Wenzel [Wed, 5 Aug 2026 15:58:34 +0000 (17:58 +0200)]
tests: re-enable MiniMax M3 in `test-llama-archs` (#26633)

4 weeks agomtmd: Unlimited-OCR fix max_tiles, setting in converter (#25614)
Saba Fallah [Wed, 5 Aug 2026 13:30:14 +0000 (15:30 +0200)]
mtmd: Unlimited-OCR fix max_tiles, setting in converter (#25614)

4 weeks agogrammar : degrade max repetition >= 2000 to unbounded (#26613)
Aldehir Rojas [Wed, 5 Aug 2026 12:39:10 +0000 (07:39 -0500)]
grammar : degrade max repetition >= 2000 to unbounded (#26613)

4 weeks agomtmd: support multi-row batching for deepseek-ocr (#26154)
Xuan-Son Nguyen [Wed, 5 Aug 2026 11:34:52 +0000 (13:34 +0200)]
mtmd: support multi-row batching for deepseek-ocr (#26154)

* mtmd: support multi-row batching for deepseek-ocr

* mtmd: weave deepseek-ocr rows in one shot instead of per row (#26615)

---------

Co-authored-by: Saba Fallah <redacted>
4 weeks agofit: Fix memory allocation for MTP layers (#26605)
Sergey Malinin [Wed, 5 Aug 2026 11:29:45 +0000 (14:29 +0300)]
fit: Fix memory allocation for MTP layers (#26605)

4 weeks agosecurity : clarify about AI-generated reports (#26579)
Xuan-Son Nguyen [Wed, 5 Aug 2026 11:27:06 +0000 (13:27 +0200)]
security : clarify about AI-generated reports (#26579)

* security : clarify about AI-generated reports

* nits

* nits 2

4 weeks agoserver: Adding spec-decode counters to /metrics endpoint (#26389)
Bhavik Sharda [Wed, 5 Aug 2026 10:36:01 +0000 (16:06 +0530)]
server: Adding spec-decode counters to /metrics endpoint (#26389)

* * server: add spec-decode counters to /metrics endpoint

* server: fixed review comments and now aligned param names exactly with vLLM.

4 weeks agoconvert: Add endianness conversion for Q1 and TQ2 quantizations (#26618)
Andreas Krebbel [Wed, 5 Aug 2026 10:06:09 +0000 (12:06 +0200)]
convert: Add endianness conversion for Q1 and TQ2 quantizations (#26618)

* Add endianness conversion for Q1 and TQ2 quantizations

* lint

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
5 weeks agovendor : apply patches for subprocess.h (#26606)
Xuan-Son Nguyen [Wed, 5 Aug 2026 09:26:20 +0000 (11:26 +0200)]
vendor : apply patches for subprocess.h (#26606)

5 weeks agoui: show generation statistics by default in chat settings (#26624)
Aleksander Grygier [Wed, 5 Aug 2026 09:03:23 +0000 (11:03 +0200)]
ui: show generation statistics by default in chat settings (#26624)

5 weeks agobuild : remove GGML_METAL_USE_BF16 from all build scripts (#26604)
Niklas Wenzel [Wed, 5 Aug 2026 08:44:34 +0000 (10:44 +0200)]
build : remove GGML_METAL_USE_BF16 from all build scripts (#26604)

5 weeks agoui: Update vulnerable packages + cleanup Storybook config (#26607)
Aleksander Grygier [Wed, 5 Aug 2026 06:06:37 +0000 (08:06 +0200)]
ui: Update vulnerable packages + cleanup Storybook config (#26607)

* chore: Upgrade Storybook

* chore: Bump package-lock

* chore: bump vitest to 4.1.10

* ui: bump fast-uri to 3.1.5

* ui: bump ip-address to 10.4.0

* ui: bump js-yaml to 4.3.1

* ui: bump immutable to 5.1.9

* ui: bump postcss to 8.5.25

* ui: bump brace-expansion to safe versions

* ui: bump sharp to 0.35.3 via override

* ui: bump body-parser to 2.3.0

* ui: bump vite to 7.3.6 and esbuild to 0.28.1

Assisted-by: Claude Sonnet
* ui: bump hono to 4.13.0

* ui: bump dompurify to 3.4.13

* ui: bump @sveltejs/kit to 2.70.2

* ui: bump @modelcontextprotocol/sdk to 1.30.0

* ui: bump valibot to 1.4.2 via override

* chore: Remove legacy setup file

* refactor: Nits cleanup

5 weeks agoPrefer npm ci over install for security (#26601)
Evan Huus [Tue, 4 Aug 2026 22:14:22 +0000 (18:14 -0400)]
Prefer npm ci over install for security (#26601)

5 weeks agoserver: decode Windows OEM output to UTF-8 in built-in tools (#26597)
Pascal [Tue, 4 Aug 2026 20:24:55 +0000 (22:24 +0200)]
server: decode Windows OEM output to UTF-8 in built-in tools (#26597)

a child process writes in the OEM code page, which is not UTF-8 on a
western Windows install, so accented output reaches the JSON layer as
invalid bytes and gets replaced there, silently losing the characters

run() spawns without a console, so the child never inherits the console
code page and GetOEMCP is the one that applies

decode with MB_ERR_INVALID_CHARS so a wrong code page returns the text
untouched instead of emitting replacement characters, and pass text that
already decodes as UTF-8 through so a child emitting UTF-8 is never
decoded twice

the check drops an incomplete trailing sequence before validating, since
a streamed chunk can end in the middle of a multi-byte character

5 weeks agomtmd: correcting duplicate empty audio chunks for short inputs (#26536)
Abhinay Krishna [Tue, 4 Aug 2026 20:05:56 +0000 (16:05 -0400)]
mtmd: correcting duplicate empty audio chunks for short inputs (#26536)

* correcting duplicate empty audio chunks for short inputs

* tests.sh code restored

5 weeks agosampler : remove "full-context windows" from history-based samplers (#26524)
Oliver Simons [Tue, 4 Aug 2026 18:28:55 +0000 (20:28 +0200)]
sampler : remove "full-context windows" from history-based samplers (#26524)

* Resolve -1 to 1024 instead of ctx-len for samplers

Because of backend-sampling we initialize samplers before the complete
llama_context is there. Therefore, we cannot infer the resolved context
length yet at the time we construct the samplers.

* Shared default of 64 for history-based samplers, remove context_size

5 weeks agogguf-split: Add option to delete split parts during merge (#26538)
Guilherme Quintino [Tue, 4 Aug 2026 18:27:47 +0000 (19:27 +0100)]
gguf-split: Add option to delete split parts during merge (#26538)

* Add delete-files option to split parameters

Added a new option to delete split files during execution to free up disk space.

* Add test for delete files on merge option

* Fix tests

* Update tools/gguf-split/gguf-split.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update tools/gguf-split/gguf-split.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Uncomment tests

* Improvements to address PR comments

* Fix formatting

* Fix formatting

* Rename --delete-files to --delete-splits

* Comment tests

* Move delete inside loop

* style cleanup

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
5 weeks agoui: CWD for agent (#26518)
Aleksander Grygier [Tue, 4 Aug 2026 17:05:48 +0000 (19:05 +0200)]
ui: CWD for agent (#26518)

* server : extend file_glob_search for UI pickers

* ui : add per-conversation working directory with picker

* ui : add path navigation and search scope to cwd picker

Treat path-like queries (starting with / or ~) as directory navigation
instead of glob-matching the whole query: search the parent for the last
segment, and descend into an exactly-typed directory by listing its
children. Show the effective search scope in the footer and auto-search
on open so the current directory and its siblings appear immediately.

Assisted-by: Claude
* db : persist per-call tool cwd on tool result messages

* ui : abbreviate tool paths under home with a tilde

* ui : show the per-call cwd on exec shell rows

* ui : clarify the synthetic cwd message for the model

* ui : reuse the trailing cwd row on a repeated pick

* ui : don't jump when a cwd row is injected mid-chat

* chore: Formatting

* refactor: Cleanup comments

* ui : unify working directory naming and add a synthetic-message flag

* ui : render synthetic cwd rows without a scroll jump

* ui : decouple the working directory picker into utils and sub-components

* ui : add get_info tool call block

* chore: Formatting

* refactor: Cleanup

* refactor: Cleanup

* refactor: Cleanup

* fix: UI

* server : harden file_glob_search listing (kind enum, timeout, symlink guard, absolute base)

* ui : use persisted isSynthetic flag for cwd rows, drop legacy formats

* ui : cache picker search, fail visibly on native resolve

* ui : escape glob metacharacters in picker search glob

* ui : simplify auto-scroll pin

* chore: Format

* fix: Use `SvelteMap`

* refactor: Post-review fixes

* ui: accept Windows roots in the working directory picker

recognize a drive root (C:) and a UNC share (//host/share) as path
navigation, alongside the POSIX root and ~, so a query like D:\repos
lists that directory instead of glob-matching it under the home dir

split below the root, so a bare drive resolves to its root rather than
to a drive-relative prefix

rewrite backslashes into forward slashes only when the query carries a
Windows root, since a backslash is a legal POSIX filename character

paths keep travelling with forward slashes, which is what the server
returns and what Windows accepts

---------

Co-authored-by: Pascal <redacted>
5 weeks agomtmd: support Qwen3-TTS (note: breaking change to llama-tts binary) (#26254)
Xuan-Son Nguyen [Tue, 4 Aug 2026 15:26:15 +0000 (17:26 +0200)]
mtmd: support Qwen3-TTS (note: breaking change to llama-tts binary) (#26254)

* convert text model

* main model load ok

* convert encoder ok

* speaker encoder loading ok

* speaker enc graph

* adapt vocab for backbone (with some tricks)

* add suppress_tokens

* poc new mtmd gen api

* convert code_predictor to gguf

* load gen_code model ok

* add clip_encode

* wire up

* code gen cgraph init version

Co-authored-by: Pascal <redacted>
* code2wav convert to gguf

* code2wav graph ok

* wire up in/out

* (wip) subgraph

* wire up

* wip, correct code2wav

* demo (to be removed)

* code2wav preserve kv between calls

* demo voice clone

* llama: add llama_model_get_tok_embd

* mtmd_helper_gen_audio API

* fix clamp cold prefix

Co-authored-by: Pascal <redacted>
* fuse snake op

Co-authored-by: Pascal <redacted>
* demo: use proper sampling

* update dev docs

* polymorphism helper

* revamp llama-tts binary

* update docs

* fix compile

* fix lint

* nits

* add guide + docs

* more timings info

* clean up code comments

* security fixes

* update docs

* use ggml_build_forward_select, clean up comments

* fix ci

* use ISO 639-1 language code

* rename CODE2WAV --> GEN_WAV, update docs

* clean up

* clean up tts.cpp

* add seq_id

* add step_prompt()

* mtmd_helper_model_can_chat

* clean up comments

---------

Co-authored-by: Pascal <redacted>
5 weeks agomodels : fix dflash wo_a reshape on load (#26577)
Georgi Gerganov [Tue, 4 Aug 2026 13:56:49 +0000 (16:56 +0300)]
models : fix dflash wo_a reshape on load (#26577)

5 weeks agoci: fix pre-built binaries no longer working on macOS 15 and below (#26375)
Niklas Wenzel [Tue, 4 Aug 2026 13:03:38 +0000 (15:03 +0200)]
ci: fix pre-built binaries no longer working on macOS 15 and below (#26375)

* ci: fix pre-built binaries no longer working on macOS 15 and below

* ci: add macOS deployment target to disabled KleidiAI build

5 weeks agospeculative : refactor enabled configs common_speculative_init (#26510)
Daniel Bevenius [Tue, 4 Aug 2026 11:17:15 +0000 (13:17 +0200)]
speculative : refactor enabled configs common_speculative_init (#26510)

This commit contains a suggestion to reduce some code duplication in
common_speculative_init when adding the enabled speculative decoding
configurations.

No tests were added but the existing server tests still passes with this
change:
```console
$ ./tests.sh unit/test_speculative.py -v -x
```

5 weeks agogguf-py: validate n_dims and guard against uint64 overflow in reader (#25401)
hcl [Tue, 4 Aug 2026 09:12:48 +0000 (17:12 +0800)]
gguf-py: validate n_dims and guard against uint64 overflow in reader (#25401)

The Python GGUF reader lacked two guards the C++ loader has:
- n_dims read as uint32 with no GGML_MAX_DIMS bound -> crafted file with
  huge n_dims triggers oversized memmap read / OOM.
- np.prod(dims) on uint64 wraps silently -> a crafted dims triple can
  overflow to a tiny element count, passing an undersized read through.

Add a GGML_MAX_DIMS check and compute the element count with Python ints.

Fixes #25378

5 weeks agosync : ggml
Georgi Gerganov [Tue, 4 Aug 2026 08:54:13 +0000 (11:54 +0300)]
sync : ggml

5 weeks agoggml : bump version to 0.18.1 (ggml/1578)
Georgi Gerganov [Tue, 4 Aug 2026 08:44:52 +0000 (11:44 +0300)]
ggml : bump version to 0.18.1 (ggml/1578)

5 weeks agoconvert : add missing return after setting tekken vocab (#25947)
Angel Galindo [Tue, 4 Aug 2026 08:41:18 +0000 (01:41 -0700)]
convert : add missing return after setting tekken vocab (#25947)

5 weeks agovulkan backend ops: implemented GATED_LINEAR_ATTN (#25601)
Pranav Uttarkar [Tue, 4 Aug 2026 08:40:54 +0000 (03:40 -0500)]
vulkan backend ops: implemented GATED_LINEAR_ATTN (#25601)

* vulkan : add GATED_LINEAR_ATTN op

* docs : update Vulkan ops

* vulkan : remove unused GLA spec constant

* Updated ops.md

* ops.md update

5 weeks agovocab : validate plamo2 byte tokens (#26511)
Sigbjørn Skjæret [Tue, 4 Aug 2026 08:40:02 +0000 (10:40 +0200)]
vocab : validate plamo2 byte tokens (#26511)

* validate plamo2 byte tokens

* --typo

5 weeks agoconvert : import bytes_to_unicode from convert_slow_tokenizer (#26217)
Caleb DeLeeuw [Tue, 4 Aug 2026 07:34:30 +0000 (00:34 -0700)]
convert : import bytes_to_unicode from convert_slow_tokenizer (#26217)

bytes_to_unicode was removed from transformers.models.gpt2.tokenization_gpt2
in huggingface/transformers#40936, but it had already been copied into
transformers.convert_slow_tokenizer in huggingface/transformers#30334
(transformers 4.54.1), so import it directly from there.

Applies the same fix to chatglm.py.

5 weeks agomodel : allow reshape of tensors during load (#26531)
Georgi Gerganov [Tue, 4 Aug 2026 06:06:44 +0000 (09:06 +0300)]
model : allow reshape of tensors during load (#26531)

5 weeks agollama : move n_vocab from llama_sampler_data to penalty_sampler (#26520)
Oliver Simons [Tue, 4 Aug 2026 06:02:49 +0000 (08:02 +0200)]
llama : move n_vocab from llama_sampler_data to penalty_sampler (#26520)

This matches how it is done for logit_bias and mirostat samplers, see
https://github.com/ggml-org/llama.cpp/pull/25262#discussion_r3703951151

5 weeks agoci: fix vulkan llvmpipe runs (#26533)
Eve [Tue, 4 Aug 2026 03:28:57 +0000 (03:28 +0000)]
ci: fix vulkan llvmpipe runs (#26533)

5 weeks agosycl: parallelize the non-contiguous concat kernel (#25852)
Titaniumtown [Tue, 4 Aug 2026 02:08:05 +0000 (19:08 -0700)]
sycl: parallelize the non-contiguous concat kernel (#25852)

* sycl: parallelize the non-contiguous concat kernel

Launch geometry only: the non-contiguous concat kernel launched a single-lane
work-group (1, 1, 1), now it will launch a (1, 1, SYCL_CONCAT_BLOCK_SIZE) one.

SYCL_CONCAT_BLOCK_SIZE is defined in `ggml/src/ggml-sycl/presets.hpp`.

llama-bench (Arc Pro B70, Qwen3.6-27B-UD-Q4_K_XL, -fa on, q8_0 KV),
on top of upstream master: pp2048 920 -> 1006 t/s (+9.4%)

* sycl: cap non-contiguous concat block at ne0

* sycl: make non-contiguous concat block width env-tunable (GGML_SYCL_CONCAT_BLOCK_SIZE)

* Revert "sycl: make non-contiguous concat block width env-tunable (GGML_SYCL_CONCAT_BLOCK_SIZE)"

This reverts commit 2709909e790d298cc0746950caff16ad8ecf9d6f.

5 weeks agoExtended SYCL oneDNN SDPA to non-FP16 KV caches (Q4_0–Q8_0 and FP32) (#25874)
Ozymandias_EBON [Tue, 4 Aug 2026 02:07:23 +0000 (21:07 -0500)]
Extended SYCL oneDNN SDPA to non-FP16 KV caches (Q4_0–Q8_0 and FP32) (#25874)

* sycl: extend oneDNN SDPA to Q4_0-Q8_0 and F32 KV caches

Extends the oneDNN SDPA path (PR #25222) to handle non-F16 KV caches by
dequantizing or converting K/V to dense FP16 on-device before feeding
them into the SDPA graph. The fused systolic kernel then runs identically
to the native FP16 path.

Supported KV types:
  - Q4_0, Q4_1, Q5_0, Q5_1, Q8_0: to_fp16_sycl / to_fp16_nc_sycl
  - F32: cont_to_f16_sycl<float>
  - BF16 and IQ types are excluded (no conversion kernel available)

Gate: non-F16 requires K >= 1024 and Q >= 32 (prefill only).
F16 KV runs at any length (existing behavior).

Also includes the stream sync fix (stream->wait_and_throw() unconditional,
PR #25741 by @malsbat) and removal of V_is_K_view aliasing (K and V are
always dequantized to separate buffers).

Co-Authored-By: Claude <redacted>
* docs: drop GGML_SYCL_FA_DEBUG from SYCL.md (not shipped in this PR)
Co-Authored-By: Claude <redacted>
---------

Co-authored-by: Claude <redacted>