]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
3 months agoAvoid PDL race conditions by disabling __restrict__ when PDL is used (#24030)
Andreas Kieslinger [Wed, 3 Jun 2026 11:56:42 +0000 (13:56 +0200)]
Avoid PDL race conditions by disabling __restrict__ when PDL is used (#24030)

* Removes __restrict__ from PDL kernel headers due to incompatibility with
PDL. Adds preprocessor directives based on arch in kernel body to add
__restrict__ to retain performance on older architectures.

* Simplifies new __restrict__ usage via macro

* Add hopper to PDL __restrict__ fix.

Co-authored-by: Oliver Simons <redacted>
---------

Co-authored-by: Oliver Simons <redacted>
3 months agoggml-cpu: use runtime SVE width in FWHT (#24059)
Charles Xu [Wed, 3 Jun 2026 10:45:10 +0000 (12:45 +0200)]
ggml-cpu: use runtime SVE width in FWHT (#24059)

3 months agocuda: reserve space for quantize kv-cache at startup (#23907)
Aman Gupta [Wed, 3 Jun 2026 10:39:59 +0000 (18:39 +0800)]
cuda: reserve space for quantize kv-cache at startup (#23907)

* cuda: reserve space for quantize kv-cache at startup

* address review comments

* remove forward decl

Co-authored-by: Johannes Gäßler <redacted>
* remove assert in ggml-cuda.cu

Co-authored-by: Johannes Gäßler <redacted>
---------

Co-authored-by: Johannes Gäßler <redacted>
3 months agotests : add support for qwen3 SSM archs (#24031)
Georgi Gerganov [Wed, 3 Jun 2026 07:15:27 +0000 (10:15 +0300)]
tests : add support for qwen3 SSM archs (#24031)

* tests : add support for qwen3 SSM archs

* arch : add LLM_KV_ATTENTION_RECURRENT_LAYERS

* cont : naming + TODOs

3 months agoupdate BoringSSL to 0.20260526.0 (#23794)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Wed, 3 Jun 2026 05:42:58 +0000 (02:42 -0300)]
update BoringSSL to 0.20260526.0 (#23794)

3 months agoci : disable ccache for msvc windows release jobs (#23911)
Georgi Gerganov [Wed, 3 Jun 2026 05:05:21 +0000 (08:05 +0300)]
ci : disable ccache for msvc windows release jobs (#23911)

3 months agoarg : removed unecesary mmproj download when users pass --no-mmproj (#23425)
Ryan Mangeno [Wed, 3 Jun 2026 05:04:46 +0000 (22:04 -0700)]
arg : removed unecesary mmproj download when users pass --no-mmproj (#23425)

3 months agoopencl: use flat variants of q4_K and q6_K gemv for very large M (#24006)
lhez [Tue, 2 Jun 2026 21:16:17 +0000 (14:16 -0700)]
opencl: use flat variants of q4_K and q6_K gemv for very large M (#24006)

3 months agohexagon: profiler output fix and script updates (#24042)
Max Krasnyansky [Tue, 2 Jun 2026 21:08:29 +0000 (14:08 -0700)]
hexagon: profiler output fix and script updates (#24042)

* hex-ops: fix profiler output (ie remove the redundant NONEs)

* hex-prof: update profiling script to support tot.usec column

3 months agomodel: add Mellum architecture (#23966)
Mikhail Podvitskii [Tue, 2 Jun 2026 19:11:12 +0000 (21:11 +0200)]
model: add Mellum architecture (#23966)

* model: support for Mellum architecture

* model: improve mellum.py formatting

* model: improve mellum.py formatting once again

* deps: downgrade transformers to 4.57.6 (to fix CI)

* deps: remove huggingface_hub dependency

* deps: remove huggingface_hub from test requirements

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agomodel : support granite multilingual embeddings R2 (ibm-granite/granite-embedding...
Hans Florian [Tue, 2 Jun 2026 15:55:11 +0000 (11:55 -0400)]
model : support granite multilingual embeddings R2 (ibm-granite/granite-embedding-{97,311}m-multilingual-r2) (#22716)

* Add support for the ibm-granite/granite-embedding-{97m,311m}-multilingual-r2 embedding models:

* Added a version of the gpt4o tokenizer that has a fixed regex (better handling of marks), and different token merging setting for the 97m model
* Reused gemma4 tokenizer for the 311m model

* granite-embedding-*-multilingual-r2 : add support SwiGLU FFN for Granite Embedding Multilingual R2

* added new GGUF key <arch>.hidden_activation (LLM_KV_HIDDEN_ACT) + writer
* added a forward declaration of llm_ffn_op_type to llama-hparams.h
* added llm_ffn_op in hparams
* added LLM_FFN_NONE = 0 sentinel to llm_ffn_op_type (value-initialization), modern-bert: explicitly assigns LLM_FFN_GEGLU before reading GGUF (unchanged).
* centralized hidden_act mapping in llama-model.cpp, added llm_ffn_op_type_from_string() helper, mirroring rope_scaling_type/llama_rope_scaling_type_from_string()
* modern-bert reads the GGUF key (when present) and uses the resulting op in its FFN graph

* Added granite-embedding-{97m,311m}-multilingual-r2 to the converter code

* Added the hashes for the granite embedding multilingual R2 models
* Set the hidden_activation in the GGUF if the field is present in config.json (such as for the granite embedding models)

3 months agoStepFun 3.5 MTP (#23274)
Piotr Wilkin (ilintar) [Tue, 2 Jun 2026 15:44:35 +0000 (17:44 +0200)]
StepFun 3.5 MTP (#23274)

* StepFun 3.5 MTP

* Simplify to single layer

* Rollback core changes

* fix flake8 errors

* Remove scripts

* modify to convention

* Apply suggestions from code review

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

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agocommon : fix state save in common_prompt_batch_decode (#23468)
Daniel Bevenius [Tue, 2 Jun 2026 13:44:15 +0000 (15:44 +0200)]
common : fix state save in common_prompt_batch_decode (#23468)

* common : fix state save in common_prompt_batch_decode

This commit addresses a bug in common_prompt_batch_decode that affects
the session state store/restore in completion.cpp and
save-load-state.cpp.

The motivation for this is that currently the code is saving n-1 tokens
in both the session_tokens and in the KV cache. Then when loading the
session tokens, and if the prompt matches, it would replay the last
saved token (n-1) into the next position, effectively replaying the
same token in the wrong position.

The fix is to store all n tokens in session_tokens, while the memory
state only reflects n-1 processed tokens as the saving happens before
the last token is decoded in common_prompt_batch_decode.

I ran both completion.cpp and save-load-state.cpp with a transformer, a
recurrent, and a hybrid model.

Resolves: https://github.com/ggml-org/llama.cpp/issues/23400

Co-authored-by: fairydreaming <redacted>
3 months agoserver: add SSE ping interval (#24013)
Xuan-Son Nguyen [Tue, 2 Jun 2026 12:14:55 +0000 (14:14 +0200)]
server: add SSE ping interval (#24013)

3 months agoci : reduce self-hosted server workflow jobs (#24012)
Georgi Gerganov [Tue, 2 Jun 2026 10:17:59 +0000 (13:17 +0300)]
ci : reduce self-hosted server workflow jobs (#24012)

Reduce the number of parallel jobs in server-self-hosted.yml by stacking
test configurations as sequential steps within a single job, following the
pattern from #23927.

- server-metal: 4 matrix jobs -> 1 job with 4 sequential test steps
- server-cuda: 2 matrix jobs -> 1 job with 2 sequential test steps
- server-kleidiai: removed unnecessary single-entry matrix
- removed unused Setup Node.js step from server-metal

Total: 7 parallel jobs -> 3 parallel jobs

Assisted-by: llama.cpp:local pi
3 months agodocs : update HOWTO-add-model.md (#23883)
Mikhail Podvitskii [Tue, 2 Jun 2026 09:40:22 +0000 (11:40 +0200)]
docs : update HOWTO-add-model.md (#23883)

* docs: update HOWTO-add-model.md with new model registration and graph-building instructions

* docs: improve formatting in HOWTO-add-model.md

* Update docs/development/HOWTO-add-model.md

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

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agoui: simplify network error handling (#23431)
Marcos Del Sol Vives [Tue, 2 Jun 2026 08:45:25 +0000 (10:45 +0200)]
ui: simplify network error handling (#23431)

Previously error to string conversion was split in two different files,
with one converting errors into strings, and another function analyzing
those strings to generate yet another string.

Now the the error handling for network fetches has been centralised and
uses directly HTTP error codes whereas possible to generate the
human-readable error strings.

It also fixes an issue where all JSON errors reported from the backend,
such as "Invalid API key", would get turned incorrectly in to
"Failed to connect to server" due to poor matching logic in the
now-gone getErrorMessage function.

3 months agoui: Add Thinking mode toggle with reasoning effort levels + improvements for Chat...
Aleksander Grygier [Tue, 2 Jun 2026 08:23:19 +0000 (10:23 +0200)]
ui: Add Thinking mode toggle with reasoning effort levels + improvements for Chat Form Add Action UI (#23434)

* feat: Add "Thinking" toggle and status icon + redesign Chat Form Actions Add panel

* test: Update test reference

* fix: Icon

* fix: E2E test command

* fix: wait for greeting h1 to be visible in e2e test

* fix: remove duplicate PDF option in attachment dropdown

* fix: use label-based group toggle to avoid stale references

* refactor: inline MCP server and tool toggles in mobile sheet

* fix: serve correct build directory in e2e playwright config

* feat: add reasoning effort levels selector in model dropdown

* feat: Reasoning effort

* refactor: Make server origin configurable via environment variable

* feat: Add chat template thinking detector utility

* feat: Add thinking support detection to models store

* refactor: Update model selector components with thinking detection and message-specific indicators

* feat: Update chat form components for model selection and thinking support

* feat: Improve Reasoning controls UI

* refactor: Apply suggestions from code review

Co-authored-by: Aleksander Grygier <redacted>
* fix: Model tags

* refactor: Cleanup

* refactor: Remove unneeded components

* refactor: Cleanup

3 months agokv-cache : SWA checkpoints store only non-masked cells (#23981)
Georgi Gerganov [Tue, 2 Jun 2026 08:06:29 +0000 (11:06 +0300)]
kv-cache : SWA checkpoints store only non-masked cells (#23981)

3 months agoconvert : support Step3.7-Flash (#23845)
forforever73 [Tue, 2 Jun 2026 07:54:49 +0000 (15:54 +0800)]
convert : support Step3.7-Flash (#23845)

* feat: support step3.7

* fix: register Step-3.7 BPE pre-tokenizer hash

* delete fromjson

* register step3.7 arch to Step35Model

* drop vit projector in base filter

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <redacted>
* restore blank line

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agollama : deprecate `llama_set_warmup` (#24009)
Georgi Gerganov [Tue, 2 Jun 2026 07:30:38 +0000 (10:30 +0300)]
llama : deprecate `llama_set_warmup` (#24009)

* llama : deprecate `llama_set_warmup`

* cont : fix type

Co-authored-by: Daniel Bevenius <redacted>
---------

Co-authored-by: Daniel Bevenius <redacted>
3 months agohexagon: MUL_MAT, MUL_MAT_ID, FLASH_ATTN and GDN cleanup and optimizations for latest...
Max Krasnyansky [Tue, 2 Jun 2026 06:40:08 +0000 (23:40 -0700)]
hexagon: MUL_MAT, MUL_MAT_ID, FLASH_ATTN and GDN cleanup and optimizations for latest models  (#23989)

* hex-mm: initial support for F32 * F32 -> F32 matmuls

* hex-rms-norm: fix src1 stride use in fused rms_norm_mul

* hex-ops: clear spad pointers in the ops that clober it

This fixes an odd case where fused rms-norm-mul was failing but only in qwen3.5-2B and only at searth op-bath sizes.

* hmx-mm: add support for F32 * F32 -> F32 matmul_2d on HMX

Decided to use Q4_0 * F32 -> F32 matmul for this.
Q4_0 gets dequantized and tiled into F16, and here we quantize and tile F32 into F16.
Super simple and pretty efficient.

* hmx-mm: route f16 2D matmuls through the same kernel used for all other types

* hmx-mm: re-introduce pipelined vs non-pipelined mode that we used to have but is much more generic way

This update futher improves matmul performance and at the same time removes most of the redudant logic
we had in different paths.

* hmx-fa: slighlty improved pipeline simimar to matmul updates

* hmx-mm: initial version of MAT_MUL_ID support for HMX

* hmx-mm: fixed mxfp4 handling for MUL_MAT_ID

* hex-gdn: optimize GATED_DELTA_NET

DMA prefetch/double-buff, vectorize everything with HVX, in other words -- the usual :)

* hmx-mm: missed one more case where we can use fastmod

* hexagon: update DCVS settings for a slight perf bump

* hmx-fa: use fastdiv in hmx-flash-attn

* hmx-fa: precompute slope values to avoid disrupting the inner loop

* hvx-utils/fa: new HVX helpers for powf and logf and using those to speed up FA alibi

* hex-ops: fixed a bug in fusion logic that was messing up the order of the src tensors when some srcs are empty

* hex-fa: correctly fallback to HVX if we have sinks or the dims are not quite right

3 months agohexagon: add gelu_quick (#24007)
Todor Boinovski [Tue, 2 Jun 2026 06:19:07 +0000 (23:19 -0700)]
hexagon: add gelu_quick (#24007)

3 months agoserver: real-time reasoning interruption via control endpoint (#23971)
Pascal [Tue, 2 Jun 2026 05:26:20 +0000 (07:26 +0200)]
server: real-time reasoning interruption via control endpoint (#23971)

* server: real-time reasoning interruption via control endpoint

Builds on the manual reasoning budget trigger from #23949. Adds a
CONTROL task that mirrors the CANCEL path on the live slot and calls
common_sampler_reasoning_budget_force to end thinking mid-generation.
POST /v1/chat/completions/control with { id_slot, action }, opt-in
reasoning_control arms the budget sampler on demand. Router and single
model. Minimal WebUI button as a skeleton for further UI work.

* ui: track reasoning phase via explicit streaming state

Add isReasoning to the chat store, mirroring the isLoading pattern:
per conversation map, private setter, public accessor and reactive
export. Set from the stream callbacks, true on reasoning chunks, false
on the first content chunk, reset on stream end and resynced on
conversation switch. The skip button now keys off isReasoning so it
shows only during the thinking phase, not the whole generation.

* ui: extract control endpoint and action into constants

Move the chat completion routes, the slots route and the reasoning
control action out of chat.service into api-endpoints and a dedicated
control-actions module. No behavior change, drops the magic strings so
the control protocol has a single source of truth.

* server: target reasoning control by completion id

Address @ngxson review on the control endpoint.

Switch from id_slot to the chat completion id to avoid a TOCTOU: the
slot can be reassigned between the lookup and the control request, so
matching the live completion (oaicompat_cmpl_id) is safe and a finished
one simply matches nothing. Rename the action to reasoning_end, guard
it on the reasoning_control flag of the target slot, and reduce the
response to {success} with an optional message.

* ui: target reasoning control by completion id

Keep the streamed completion id on the message and post it back to the
control endpoint instead of probing /slots. Drops the slot discovery
and the TOCTOU that came with it. Action renamed to reasoning_end,
response read as {success}.

* server: address review from @ngxson

Move the control fields into task_params and drop the redundant
comments on the control path.

* server: document the reasoning control endpoint

* Update tools/ui/src/lib/types/database.d.ts

Co-authored-by: Aleksander Grygier <redacted>
* ui: rename cmplId to completionId

Per @allozaur review, clearer name for the streamed completion id.

* ui: wire completion id capture through the agentic flow

The webui streams through the agentic flow, which relayed onModel but
not onCompletionId, so the completion id never reached the message and
the control request was never sent. Relay it through the flow and its
callbacks type, declare id on the chunk type, and log an explicit error
when the button fires without a usable id.

* ui: target reasoning control model from the message

The model is a property of the completion, so read it from the streaming
message like the id, not from the model dropdown which is unrelated UI
state. Makes the request self-consistent by construction instead of just
unlikely to drift.

---------

Co-authored-by: Aleksander Grygier <redacted>
3 months agoclean up unused variables warnings (#23975)
Anav Prasad [Tue, 2 Jun 2026 02:38:37 +0000 (19:38 -0700)]
clean up unused variables warnings (#23975)

3 months agoopencl: fix compiler warnings for non-adreno path (#23922)
lhez [Tue, 2 Jun 2026 02:15:09 +0000 (19:15 -0700)]
opencl: fix compiler warnings for non-adreno path (#23922)

* opencl: fix compiler warnings for non-adreno path

* opencl: fix const cast warning

3 months agorevert to using global_invocation_id for cpy shader (#23955)
Masashi Yoshimura [Mon, 1 Jun 2026 23:59:06 +0000 (08:59 +0900)]
revert to using global_invocation_id for cpy shader (#23955)

3 months agospeculative : fix n_outputs_max and remove draft-simple auto-enable (#23988)
Georgi Gerganov [Mon, 1 Jun 2026 19:26:58 +0000 (22:26 +0300)]
speculative : fix n_outputs_max and remove draft-simple auto-enable (#23988)

* speculative : add common_speculative_n_max helper function

Extract the speculative max-draft-size logic from server_n_outputs_max
into a reusable common_speculative_n_max() function in common/speculative.

Assisted-by: llama.cpp:local pi
* cont : draft context always has n_parallel outputs

* llama : log n_outputs_max

* speculative : remove draft-simple auto-enable

* ci : enable server tests on PRs

3 months agonix : add nix-nodejs facilities to build Web UI (#23846)
Christian Hoener zu Siederdissen [Mon, 1 Jun 2026 18:01:26 +0000 (20:01 +0200)]
nix : add nix-nodejs facilities to build Web UI (#23846)

* nix: add nix-nodejs facilities to build Web UI

Build the Web UI locally using standard Nix systems for building NodeJS
packages.

- Create derivation for the web UI
- npm dependencies are imported via buildNodeModules. Does not require
  setting any shasum.
- Copy build artifacts to the correct folders.
- Prevents having to download from huggingface.co

Fixes #23067

* nix: simplify webui derivation using LLAMA_UI_OUT_DIR

- Move npm build to installPhase with LLAMA_UI_OUT_DIR=$out to write
  output directly to the Nix store
- Copy built assets to tools/ui/dist (source tree) instead of
  build/tools/ui/dist so CMake's copy_src_dist() finds them

3 months agoopencl: add basic support for q5_0 and q5_1 (#23548)
shaofeiqi [Mon, 1 Jun 2026 17:06:50 +0000 (10:06 -0700)]
opencl: add basic support for q5_0 and q5_1 (#23548)

* opencl: add general q5_0 support

* opencl: add general q5_1 support

* opencl: support non-uniform workgrp size

---------

Co-authored-by: Li He <redacted>
3 months agovendor : update cpp-httplib to 0.46.1 (#23980)
Adrien Gallouët [Mon, 1 Jun 2026 16:40:10 +0000 (18:40 +0200)]
vendor : update cpp-httplib to 0.46.1 (#23980)

Signed-off-by: Adrien Gallouët <redacted>
3 months agollama: limit max outputs of `llama_context` (#23861)
Aman Gupta [Mon, 1 Jun 2026 15:01:38 +0000 (23:01 +0800)]
llama: limit max outputs of `llama_context` (#23861)

* llama: save more VRAM by reserving n_outputs == n_seqs when possible

* add n_outputs_per_seq

* move n_outputs_max to server-context

* change ubatch to batch everywhere

3 months agometal: template GLU kernels to support f16/f32 (#23882)
Shrivas Shankar [Mon, 1 Jun 2026 12:40:28 +0000 (07:40 -0500)]
metal: template GLU kernels to support f16/f32 (#23882)

Drops the hardcoded f32 GLU kernels in favor of a single template. We now load/store in the native tensor type (half or float) to save memory bandwidth, but keep the actual ALU compute in float to avoid exploding math in geglu/swiglu. Also opened up the dispatch gate to allow f16 inputs.

3 months agovulkan: don't hold the device mutex while compiling pipelines (#23641)
Jeff Bolz [Mon, 1 Jun 2026 12:04:01 +0000 (07:04 -0500)]
vulkan: don't hold the device mutex while compiling pipelines (#23641)

* vulkan: don't hold the device mutex while compiling pipelines

We need to hold a lock while we traverse all pipelines and lazily initialize
them, but we don't need to hold it while the pipeline is being compiled. And
it doesn't need to be the same lock as the device mutex. We call load_shaders
each time a pipeline is needed, so we only need to compile that one pipeline
(and, for example, don't want to end up compiling a pipeline that another
thread should be compiling).

* remove 'needed'

3 months agovulkan: reduce host memory lock contention (#23376)
Winston Ma [Mon, 1 Jun 2026 12:03:32 +0000 (20:03 +0800)]
vulkan: reduce host memory lock contention (#23376)

* vulkan: reduces lock contention

* replace unique_lock with lock_guard

3 months agovocab: add normalizer.lowercase support to WPM (#23899)
o7si [Mon, 1 Jun 2026 11:26:47 +0000 (19:26 +0800)]
vocab: add normalizer.lowercase support to WPM (#23899)

* vocab : add jina-embeddings-v2-base-zh (whitespace tokenizer)

* vocab : add normalizer.lowercase support to WPM

* vocab : default normalizer.lowercase to false for whitespace pre-tokenizer

3 months agoTP: quantized KV cache support (#23792)
Johannes Gäßler [Mon, 1 Jun 2026 10:30:10 +0000 (12:30 +0200)]
TP: quantized KV cache support (#23792)

* TP: quantized KV cache support

* fix partial view

* remove overly strict assert

3 months agosecurity : disable private disclosures (#23963)
Georgi Gerganov [Mon, 1 Jun 2026 10:14:12 +0000 (13:14 +0300)]
security : disable private disclosures (#23963)

3 months agomodel: Add EXAONE 4.5 implementations (#21733)
Junwon Hwang [Mon, 1 Jun 2026 09:48:53 +0000 (18:48 +0900)]
model: Add EXAONE 4.5 implementations (#21733)

* Add EXAONE 4.5 and Add GQA for MMproj

* mtmd: EXAONE 4.5 vision markers and projector path

EXAONE 4.5 uses <vision> and </vision> for image boundaries; Qwen keeps
<|vision_start|> and <|vision_end|>.

Route EXAONE 4.5 through the Qwen2.5-VL-style encode path (window attention
pattern, optional mmproj input norm). Update exaone4_5 projector weights and
convert_hf_to_gguf for mmproj export.

* mtmd: load EXAONE4 nextn tensors correctly

Align EXAONE4 tensor registration with EXAONE_MOE for NextN/MTP slots and avoid skip-flag propagation on duplicated rope_freqs so model loading succeeds for EXAONE 4.5 GGUF.

* Minor fixes

* Address PR feedback

* Address PR feedback

* Fix EXAONE after merge

* Fix EXAONE 4.5 conversion

* Address PR feedback

* Refactor EXAONE 4.5 conversion

* Address PR feedback

* Fix unintended deletion

* Minor fix

---------

Co-authored-by: LG-AI-EXAONE <redacted>
3 months agovulkan: Block-load Q3_K/Q6_K block data and subtract on 32b ints (#23056)
Matt Corallo [Mon, 1 Jun 2026 09:46:48 +0000 (09:46 +0000)]
vulkan: Block-load Q3_K/Q6_K block data and subtract on 32b ints (#23056)

Q2_K/Q3_K/Q6_K do much better when using MMVQ on Intel BMG even
though they're only 2-byte aligned, and Q3_K still wins on
NVIDIA as well.

mesa isn't all that great at coalescing back-to-back loads from
alternating arrays, so we force it instead. Further, we can do
subtraction directly on a full int32_t rather than an i8vec4
with bit twiddling because the high bit is always free to start.

On Intel BMG on mesa, the switch to MMVQ provides an immediate
~57% perf increase in tg128 for unsloth/Qwen3.5-9B-GGUF:Q3_K and
~78% perf increase in tg128 for unsloth/Qwen3.5-9B-GGUF:Q6_K.

The futher switch to block loads leads to a ~24% perf increase in
tg128 for unsloth/Qwen3.5-9B-GGUF:Q3_K and a ~48% perf increase in
tg128 for unsloth/Qwen3.5-9B-GGUF:Q6_K.

Finally, Xe2 wins on MMVQ even for small k, so we take the NVIDIA
override for K quants on Xe2 as well.

3 months agovulkan: Removed unused functions (#23175)
Winston Ma [Mon, 1 Jun 2026 09:46:23 +0000 (17:46 +0800)]
vulkan: Removed unused functions (#23175)

3 months agocommon : support manually triggering the reasoning budget end sequence (#23949)
Aldehir Rojas [Mon, 1 Jun 2026 09:37:11 +0000 (05:37 -0400)]
common : support manually triggering the reasoning budget end sequence (#23949)

3 months agoci : add missing Linux label to cpu-x64-high-perf runner (#23958)
Georgi Gerganov [Mon, 1 Jun 2026 07:39:59 +0000 (10:39 +0300)]
ci : add missing Linux label to cpu-x64-high-perf runner (#23958)

Fixes: https://github.com/ggml-org/llama.cpp/pull/23927#discussion_r3332213086
The cpu-x64-high-perf job was missing the Linux label in its runs-on
specification, causing the runner to not be discovered. All other
self-hosted Linux jobs include this label.

Assisted-by: llama.cpp:local pi
3 months ago[SYCL] Support Q4_1, Q5_0, Q5_1 in Flash-attention (#23812)
Neo Zhang [Mon, 1 Jun 2026 06:53:53 +0000 (14:53 +0800)]
[SYCL] Support Q4_1, Q5_0, Q5_1 in Flash-attention (#23812)

* support Q4_1, Q5_0, Q5_1

* update ut case

3 months ago[SYCL] Add more types in GET_ROWS OP (#23710)
Neo Zhang [Mon, 1 Jun 2026 06:53:04 +0000 (14:53 +0800)]
[SYCL] Add more types in GET_ROWS OP (#23710)

* add to support Q1_0, NVFP4, IQ2_XXS, IQ2_XS, IQ2_S, IQ3_XXS, IQ1_S, IQ1_M, IQ3_S, IQ4_NL, IQ4_XS, I32, MXFP4, Q2_K, Q3_K, Q5_K, and Q6_K in GET_ROWS OP

* correct the link

3 months agosycl : Optimize Q3_K mul_mat by reorder (#23725)
Neo Zhang [Mon, 1 Jun 2026 06:50:55 +0000 (14:50 +0800)]
sycl : Optimize Q3_K mul_mat by reorder (#23725)

3 months agoci: remove redundant or duplicate jobs (#23927)
Eve [Mon, 1 Jun 2026 03:32:17 +0000 (03:32 +0000)]
ci: remove redundant or duplicate jobs (#23927)

* remove redundant apple job

openvino gpu and cpu test can share the same build and machine

Update build-rpc.yml

Update build-openvino.yml

cpu any doesnt make sense as we have an arm job already, so do high perf on both x86 and arm

remove duplicate x86 vulkan

combine backend sampling

Update server.yml

run server on arm as windows is x86

* emdawn on one machine only

* fix openvino, remove cpu tag as we dont have many x64 machines with that tag

3 months agoserver : handle If-None-Match weak ETags (#23916)
Eric Zhang [Sun, 31 May 2026 21:21:08 +0000 (05:21 +0800)]
server : handle If-None-Match weak ETags (#23916)

3 months agoci : limit trigger paths for the CPU workflow (#23938)
Georgi Gerganov [Sun, 31 May 2026 16:02:47 +0000 (19:02 +0300)]
ci : limit trigger paths for the CPU workflow (#23938)

3 months agovocab : add tokenizer support for jina-embeddings-v2-base-zh (#18756)
o7si [Sun, 31 May 2026 10:37:35 +0000 (18:37 +0800)]
vocab : add tokenizer support for jina-embeddings-v2-base-zh (#18756)

* vocab : add jina-embeddings-v2-base-zh (whitespace tokenizer)

* lowercase defaults to true

* type fix

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agoui: fix ETag truncation with MSVC compiler (#23917)
Eric Zhang [Sun, 31 May 2026 09:21:23 +0000 (17:21 +0800)]
ui: fix ETag truncation with MSVC compiler (#23917)

3 months agodocs : update ZenDNN docs for Q8 support (#23791)
Vladislav [Sun, 31 May 2026 08:26:42 +0000 (11:26 +0300)]
docs : update ZenDNN docs for Q8 support (#23791)

* docs zendnn added information about Q8 support

* docs zendnn rm unnecessary data

* docs update, links to ZenDNN docs provided

* docs zenDNN update: clarified explanation

* docs zenDNN update: one more explanation clarified

---------

Co-authored-by: plotnikov.v10 <redacted>
3 months agollama: only use one iGPU device by default (#23897)
Ruben Ortlam [Sun, 31 May 2026 06:17:47 +0000 (08:17 +0200)]
llama: only use one iGPU device by default (#23897)

3 months agowebui: add custom CSS injection via config (#23904)
Pascal [Sat, 30 May 2026 21:49:31 +0000 (23:49 +0200)]
webui: add custom CSS injection via config (#23904)

* webui: add custom CSS injection via config

register a customCSS setting in the Developer section under Custom JSON,
syncable so it rides the existing ui-config pass through. inject the value
into a single style element in the head, reactive on the setting. lets an
operator theme a prebuilt binary through --ui-config without rebuilding,
and lets a user set it from the settings panel.

* ui: address review from @niutech and @allozaur, rename custom JSON key and CSS field

* ui: address review from @allozaur, move custom CSS injection to a style tag in svelte:head

* ui: inject custom CSS through a svelte action instead of a bound element

move the textContent write into a use: action on the head style node.
the action is the idiomatic way to touch a node, so the no-dom-manipulating
lint rule is satisfied without a disable. value stays text through
textContent, never parsed as HTML.

* Update tools/ui/src/lib/constants/settings-keys.ts

Co-authored-by: Aleksander Grygier <redacted>
* ui: address review from @allozaur, rename custom config key to customJson with migration

rename the custom config key to customJson across the type, the chat
request builder, the settings save check and the custom tools reader,
keeping the custom API param name unchanged. add a non destructive
migration that copies the legacy custom key to customJson at startup.
only render the head style tag when custom CSS is set.

---------

Co-authored-by: Aleksander Grygier <redacted>
3 months agoSupport `-fa auto` in llama-bench (#23714)
Gaurav Garg [Sat, 30 May 2026 20:33:57 +0000 (02:03 +0530)]
Support `-fa auto` in llama-bench (#23714)

* Support `-fa auto` in llama-bench

Make the default value of `-ngl` -1, similar to other tools.

Update README with latest usage and examples

* Address review comments

3 months agoopencl: support bf16 by converting to f16 (#23839)
lhez [Sat, 30 May 2026 17:17:47 +0000 (10:17 -0700)]
opencl: support bf16 by converting to f16 (#23839)

3 months agoui: exclude generated build dirs from prettier and eslint so lint errors stop being...
Pascal [Sat, 30 May 2026 14:50:54 +0000 (16:50 +0200)]
ui: exclude generated build dirs from prettier and eslint so lint errors stop being masked (#23910)

3 months agoTP: fix granularity for Qwen 3.5/3.6 + 3 GPUs (#23843)
Johannes Gäßler [Sat, 30 May 2026 13:48:00 +0000 (15:48 +0200)]
TP: fix granularity for Qwen 3.5/3.6 + 3 GPUs (#23843)

* TP: fix granularity for Qwen 3.5/3.6 + 3 GPUs

* fix afmoe TP

3 months agometal : restore im2col implementation for large kernels (#23901)
Georgi Gerganov [Sat, 30 May 2026 12:26:13 +0000 (15:26 +0300)]
metal : restore im2col implementation for large kernels (#23901)

3 months agotest: (test-llama-archs) log the config name first (#23885)
Xuan-Son Nguyen [Sat, 30 May 2026 10:22:38 +0000 (12:22 +0200)]
test: (test-llama-archs) log the config name first (#23885)

3 months agoci : update ios-xcode release job to macos-26 (#23906)
Georgi Gerganov [Sat, 30 May 2026 10:21:46 +0000 (13:21 +0300)]
ci : update ios-xcode release job to macos-26 (#23906)

* ci : disable libcommon build from xcframework

* ocd : fix name

* ci : ios-xcode change to macos-26

* cont : pin xcode

* cont : pin xcode to minor version

3 months agoggml : add some lsx support (#23798)
Jinyang He [Sat, 30 May 2026 08:53:26 +0000 (16:53 +0800)]
ggml : add some lsx support (#23798)

* loongarch : optimize LSX fp16 load/store with native intrinsics

Use __lsx_vfcvtl_s_h and __lsx_vfcvt_h_s instead of scalar loops in
__lsx_f16x4_load and __lsx_f16x4_store.

* loongarch : add LSX implementation for q8_0 dot product

* loongarch : add LSX implementation for q6_K dot product

* loongarch : add LSX implementation for iq4_xs dot product

* Improve reduce ops when sun int16 pairs to int32

3 months agovulkan: add Flash Attention support for BFloat16 KV cache (#23420)
Ruben Ortlam [Sat, 30 May 2026 08:39:31 +0000 (10:39 +0200)]
vulkan: add Flash Attention support for BFloat16 KV cache (#23420)

* vulkan: add flash attention bf16 kv support

* vulkan: bf16 FA coopmat1 support

* vulkan: bf16 FA coopmat2 support

* fix FA bf16 f32 fallback

* fix FA bf16 coopmat1 shader

* fix FA bf16 coopmat2 shader

* code cleanup

* cleanup comment change

* address feedback

* add O_TYPE for cm2 FA

* use O_TYPE for gqaStore function

* reduce BFLOAT16 ifdefs

3 months agoci : fix s390x release job (#23898)
Georgi Gerganov [Sat, 30 May 2026 06:21:38 +0000 (09:21 +0300)]
ci : fix s390x release job (#23898)

* ci : fix s390x release job

* ci : multi-thread build for `ios-xcode`

* ocd : names

3 months agoci : clear cache instead of "no timestamp" keys + fix macos (#23895)
Georgi Gerganov [Sat, 30 May 2026 05:52:30 +0000 (08:52 +0300)]
ci : clear cache instead of "no timestamp" keys + fix macos (#23895)

* ci : ios use macos-15 again

* ci : add and test ccache-clear

* cont : fix

* cont : set permission

* cont : another permission

* cont : token

* cont : print key

* cont : bring back perms

* cont : test windows

* cont : add token

* cont : cleanup

* ci : make release jobs clean-up their ccache

3 months agollama : do not skip iGPU when only RPC devices are present (#23868)
Radoslav Gerganov [Sat, 30 May 2026 04:48:22 +0000 (07:48 +0300)]
llama : do not skip iGPU when only RPC devices are present (#23868)

After #23007 reclassified integrated CUDA/HIP devices as IGPU, the device
selection logic dropped the local iGPU whenever any RPC server was added,
because RPC devices made `model->devices` non-empty. On systems where the
"iGPU" is the main compute device (e.g. Strix Halo with 128 GiB of unified
memory), this caused all tensors to be allocated on the RPC peer alone and
model loading to fail.

Gate the iGPU inclusion on `gpus.empty()` instead, so RPC peers no longer
suppress the local iGPU.

closes: #23858

3 months agoserver: in SSE mode, send HTTP headers when slot starts (#23884)
Xuan-Son Nguyen [Fri, 29 May 2026 22:06:29 +0000 (00:06 +0200)]
server: in SSE mode, send HTTP headers when slot starts (#23884)

* server: in SSE mode, send HTTP headers when slot starts

* ref to pr

* stream should be false by default

3 months agoggml-webgpu: Check earlier for WebGPU required features (#23879)
Reese Levine [Fri, 29 May 2026 21:16:05 +0000 (14:16 -0700)]
ggml-webgpu: Check earlier for WebGPU required features (#23879)

3 months agoggml-webgpu: add q4_0/q8_0 SET_ROWS (#23760)
Reese Levine [Fri, 29 May 2026 21:14:11 +0000 (14:14 -0700)]
ggml-webgpu: add q4_0/q8_0 SET_ROWS (#23760)

* Add q8_0 and q4_0 set_rows

* Add fast(er) quantization set_rows path

* formatting/naming

* a little more naming

* Remove unused constant

* Don't override other override

* Avoid bitcast

* Narrow relaxation

3 months agoserver-bench : add speed-bench for speculative decoding benchmarking (#23869)
Ruixiang Wang [Fri, 29 May 2026 21:09:47 +0000 (23:09 +0200)]
server-bench : add speed-bench for speculative decoding benchmarking (#23869)

* spec: add speed-bench support for benchmarking

* speed-bench : add trailing newline to requirements.txt

* speed-bench : bump datasets to 4.8.0 to fix ty check

* server-bench : remove now-unused type: ignore after datasets bump

3 months agoapp: add llama update self updater (#23865)
Pascal [Fri, 29 May 2026 21:02:40 +0000 (23:02 +0200)]
app: add llama update self updater (#23865)

* wip: llama update POC

* cleaning: llama update

* llama-gen-docs

* app: delegate llama update to the install script

* app: spawn the installer detached so llama update can replace a running binary

* cleaning: inline llama update into llama.cpp, drop app-update.{cpp,h}

* app: make llama_update static

Address review from @angt

3 months agoui: handle audio/vnd.wave as audio WAV file (#23754)
ValdikSS [Fri, 29 May 2026 19:41:35 +0000 (22:41 +0300)]
ui: handle audio/vnd.wave as audio WAV file (#23754)

Firefox on Linux uses this MIME type

3 months agovocab : support tokenizer for LFM2.5-8B-A1B (#23826)
Tarek Dakhran [Fri, 29 May 2026 18:25:43 +0000 (20:25 +0200)]
vocab : support tokenizer for LFM2.5-8B-A1B (#23826)

* vocab: Support tokenizer for LFM2.5-8B-A1B

* Keep liquid6 tokenizer in models

3 months agograph : ensure DS32 kq_mask_lid is F32 (#23864)
Sigbjørn Skjæret [Fri, 29 May 2026 17:55:14 +0000 (19:55 +0200)]
graph : ensure DS32 kq_mask_lid is F32 (#23864)

3 months agoserver: remove obsolete scripts (#23870)
Xuan-Son Nguyen [Fri, 29 May 2026 17:47:30 +0000 (19:47 +0200)]
server: remove obsolete scripts (#23870)

3 months agoci : update macos release to use macos-26 runner (#23878)
Georgi Gerganov [Fri, 29 May 2026 17:41:57 +0000 (20:41 +0300)]
ci : update macos release to use macos-26 runner (#23878)

3 months agodownload: add option to skip_download (#23059)
Xuan-Son Nguyen [Fri, 29 May 2026 14:30:55 +0000 (16:30 +0200)]
download: add option to skip_download (#23059)

* download: add option to skip_download

* fix

* fix 2

* if file doesn't exist, respect skip_download flag

3 months agomtmd: Add DeepSeekOCR 2 Support (#20975)
Saba Fallah [Fri, 29 May 2026 14:13:51 +0000 (16:13 +0200)]
mtmd: Add DeepSeekOCR 2 Support (#20975)

* mtmd: DeepSeek-OCR 2 support, with multi-tile dynamic resolution

* introduced clip_image_f32::add_viewsep

* address PR review

- drop redundant ggml_cpy ops in both deepseekocr versions build
- drop no-op ggml_cont in build_sam
- assert num_image_tokens deepseekocr2
- view_seperator as (1, n_embd) at conversion (for both versions)
- drop redundant ggml_reshape_2d

* Update tools/mtmd/models/deepseekocr2.cpp

Co-authored-by: Xuan-Son Nguyen <redacted>
---------

Co-authored-by: Xuan-Son Nguyen <redacted>
3 months agoCUDA: Check PTX version on host side to guard PDL dispatch (#23530)
Oliver Simons [Fri, 29 May 2026 10:28:18 +0000 (12:28 +0200)]
CUDA: Check PTX version on host side to guard PDL dispatch (#23530)

* CUDA: Check PTX version on host side to guard PDL dispatch

Checking on `__CUDA_ARCH_LIST__` alone is insufficient for JIT, as this
variable doesn't differentiate between compiling for say sm_90, sm_90a
or sm_90f (so forward-jittable PTX vs. arch/family-specific PTX).

Thus, one can have a bug when compiling with
`DCMAKE_CUDA_ARCHITECTURES="89;90a"`, where current code would wrongly
dispatch to PDL on sm_90/sm_120 in forward-JIT mode.

This PR fixes this issue by checking `cudaFuncAttributes::ptxVersion` of
the incoming kernel at runtime. A check on ptxVersion alone is
sufficient, as device-codes will always be >= ptxVersion (and any
violation of this would be a severe bug in CUDA/nvcc), see:
 https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#gpu-code-code-code

* Implement MurmurHash3 mixer for better hash distribution

Magic constants were taken from boost:
https://github.com/boostorg/container_hash/blob/2698b43803c012601e6bb1a6116e83767b97986c/include/boost/container_hash/detail/hash_mix.hpp#L19-L65

* Update ggml/src/ggml-cuda/common.cuh

Co-authored-by: Johannes Gäßler <redacted>
* Address review comments, make seed non-zero

* Apply code-formatting

* Replace std::size_t -> size_t for consistency

---------

Co-authored-by: Johannes Gäßler <redacted>
3 months agoserver: bump timeout to 3600s (#23842)
Xuan-Son Nguyen [Fri, 29 May 2026 08:23:17 +0000 (10:23 +0200)]
server: bump timeout to 3600s (#23842)

* server: bump timeout to 3600s

* nits: change wording

3 months agomodel : support for DeepseekV32ForCausalLM with generic DeepSeek Sparse Attention...
fairydreaming [Fri, 29 May 2026 08:15:17 +0000 (10:15 +0200)]
model : support for DeepseekV32ForCausalLM with generic DeepSeek Sparse Attention (DSA) implementation (#23346)

* llama : support DeepSeek V3.2 model family (with DSA lightning indexer)

* convert : handle DeepseekV32ForCausalLM architecture

* ggml : support for f16 GGML_OP_FILL

* memory : separate hparams argument in llama_kv_cache constructor

* memory : add llama_kv_cache_dsa memory (KV cache + lightning indexer cache)

* llama : support for LLM_ARCH_DEEPSEEK32

* model : llama_model_deepseek32 implementation

* model : merge two scale operations into one in DSA lightning indexer implementation

* chore : remove unused code

* model : support NVFP4 in DeepSeek V3.2

Co-authored-by: Sigbjørn Skjæret <redacted>
* memory : refactoring TODO

Co-authored-by: ggerganov <redacted>
---------

Co-authored-by: Stanisław Szymczyk <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: ggerganov <redacted>
3 months agollama: use f16 mask for FA to save VRAM (#23764)
Aman Gupta [Fri, 29 May 2026 07:44:43 +0000 (15:44 +0800)]
llama: use f16 mask for FA to save VRAM (#23764)

* llama: use f16 mask for FA

* review: add llama_cast + formatting

* simplify

3 months agosync : ggml
Georgi Gerganov [Fri, 29 May 2026 06:53:41 +0000 (09:53 +0300)]
sync : ggml

3 months agoggml : bump version to 0.13.1 (ggml/1523)
Georgi Gerganov [Fri, 29 May 2026 06:46:12 +0000 (09:46 +0300)]
ggml : bump version to 0.13.1 (ggml/1523)

3 months agongram-mod : Add missing include (#23857)
Omid Azizi [Fri, 29 May 2026 06:21:37 +0000 (23:21 -0700)]
ngram-mod : Add missing include (#23857)

[no release]

Signed-off-by: Omid Azizi <redacted>
3 months agollama: add llm_graph_input_mtp (#23643)
Aman Gupta [Fri, 29 May 2026 06:17:32 +0000 (14:17 +0800)]
llama: add llm_graph_input_mtp (#23643)

* llama: add llm_graph_input_mtp

* rename input_mtp -> input_token_embd

* add TODO about mtmd embedding

* cont : clean-up

---------

Co-authored-by: Georgi Gerganov <redacted>
3 months agoapp : move licences to llama-app (#23824)
Adrien Gallouët [Fri, 29 May 2026 05:46:11 +0000 (07:46 +0200)]
app : move licences to llama-app (#23824)

Signed-off-by: Adrien Gallouët <redacted>
3 months agocuda : disables launch_fattn PDL enrollment due to compiler bug (#23825)
Andreas Kieslinger [Fri, 29 May 2026 04:46:10 +0000 (06:46 +0200)]
cuda : disables launch_fattn PDL enrollment due to compiler bug (#23825)

3 months agometa : Add missing `buffer` set in allreduce fallback !COMPUTE clear (#23480)
Matt Corallo [Fri, 29 May 2026 03:30:24 +0000 (03:30 +0000)]
meta : Add missing `buffer` set in allreduce fallback !COMPUTE clear (#23480)

Without this at least the vulkan backend will skip the `* 0` for
!COMPUTE tensors, causing corrupt output.

3 months agohexagon: basic/generic op fusion support and RMS_NORM+MUL fusion (#23835)
Max Krasnyansky [Thu, 28 May 2026 21:05:54 +0000 (14:05 -0700)]
hexagon: basic/generic op fusion support and RMS_NORM+MUL fusion (#23835)

Updating infra to enable op fusion and using RMS_NORM+MUL as the use-case.

3 months agomtmd-debug: add color and rainbow mode (#23829)
Xuan-Son Nguyen [Thu, 28 May 2026 18:59:14 +0000 (20:59 +0200)]
mtmd-debug: add color and rainbow mode (#23829)

* mtmd-debug: add color and rainbow mode

* fix M_PI

* max_dist

3 months agomtmd: fix gemma 4 projector pre_norm (#23822)
Xuan-Son Nguyen [Thu, 28 May 2026 18:58:55 +0000 (20:58 +0200)]
mtmd: fix gemma 4 projector pre_norm (#23822)

3 months agoopencl: move backend info printing into its own function (#23702)
lhez [Thu, 28 May 2026 18:05:42 +0000 (11:05 -0700)]
opencl: move backend info printing into its own function (#23702)

* opencl: move backend info print into its own function

* opencl: move new log line

* opencl: fix for non adreno path

3 months agoci : run ui publish on ubuntu-slim (#23818)
Sigbjørn Skjæret [Thu, 28 May 2026 17:58:32 +0000 (19:58 +0200)]
ci : run ui publish on ubuntu-slim (#23818)

* run ui publish on self-hosted fast

* run on ubuntu-slim

3 months agoui: fix audio and video modality detection (#23756)
ValdikSS [Thu, 28 May 2026 15:36:10 +0000 (18:36 +0300)]
ui: fix audio and video modality detection (#23756)

When model props are fetched asynchronously from the server,
modelPropsVersion is incremented to trigger reactivity, but
only the vision effect was listening to it.

3 months agoci : releases use Github-hosted builds for the UI (#23823)
Georgi Gerganov [Thu, 28 May 2026 14:50:32 +0000 (17:50 +0300)]
ci : releases use Github-hosted builds for the UI (#23823)

* ci : releases use Github-hosted builds for the UI

* cont : fix name

3 months agoapp : improve help output (#23805)
Adrien Gallouët [Thu, 28 May 2026 14:45:06 +0000 (16:45 +0200)]
app : improve help output (#23805)

Signed-off-by: Adrien Gallouët <redacted>
3 months agomtmd: n_head_kv defaults to n_head (#23782)
Saba Fallah [Thu, 28 May 2026 14:44:36 +0000 (16:44 +0200)]
mtmd: n_head_kv defaults to n_head (#23782)

removed AI-generated comment

3 months agomtmd: fix gemma 4 audio rms norm eps (#23815)
Xuan-Son Nguyen [Thu, 28 May 2026 14:31:37 +0000 (16:31 +0200)]
mtmd: fix gemma 4 audio rms norm eps (#23815)

* mtmd: fix gemma 4 audio rms norm eps

* Update tools/mtmd/clip.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agoci : change Vulkan builds to Release to reduce ccache (#23820)
Georgi Gerganov [Thu, 28 May 2026 14:29:11 +0000 (17:29 +0300)]
ci : change Vulkan builds to Release to reduce ccache (#23820)

* ci : disable all CPU variant builds for Vulkan workflow

* cont : change cache key

* cont : change build type