]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
3 months agovocab : fix HybridDNA tokenizer (#23466)
Kashif Rasul [Fri, 22 May 2026 09:17:31 +0000 (11:17 +0200)]
vocab : fix HybridDNA tokenizer (#23466)

* vocab : mark hybriddna k-mers to avoid BPE token collisions

* improved loop

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agocmake : add install() for impl libraries + fix apple builds (#23511)
Georgi Gerganov [Fri, 22 May 2026 08:46:26 +0000 (11:46 +0300)]
cmake : add install() for impl libraries + fix apple builds (#23511)

* pi : update

* ci : fix ios build

* ci : fix andoroid

* ci : fix apple builds

* cmake : add install() for impl libraries

Add install(TARGETS <target> LIBRARY) for all -impl libraries that were
changed from STATIC to shared (controlled by BUILD_SHARED_LIBS) in
commit bb28c1fe2. Without this, cmake --install fails to copy the shared
libraries, causing runtime errors like:

  llama-server: error while loading shared libraries: libllama-server-impl.so

Ref: https://github.com/ggml-org/llama.cpp/issues/23494#issuecomment-4512912515

Assisted-by: llama.cpp:local pi
* ci : fix xcframework build

3 months agoCUDA: fix PDL CC check for JIT compilation (#23471)
Johannes Gäßler [Thu, 21 May 2026 21:35:29 +0000 (23:35 +0200)]
CUDA: fix PDL CC check for JIT compilation (#23471)

3 months agocmake : remove STATIC from impl libraries, enable LLAMA_BUILD_APP by default (#23462)
Georgi Gerganov [Thu, 21 May 2026 18:13:59 +0000 (21:13 +0300)]
cmake : remove STATIC from impl libraries, enable LLAMA_BUILD_APP by default (#23462)

* cmake : remove STATIC from impl libraries, allow BUILD_SHARED_LIBS control

Remove explicit STATIC from all -impl libraries (server, cli, completion, bench,
batched-bench, fit-params, quantize, perplexity) so BUILD_SHARED_LIBS controls
shared vs static linkage.

Add WINDOWS_EXPORT_ALL_SYMBOLS ON for proper DLL export on Windows.

Assisted-by: llama.cpp:local pi
* cmake : enable LLAMA_BUILD_APP by default

Assisted-by: llama.cpp:local pi
* ci : disable app in build-cmake-pkg.yml

3 months agoUpdate WebGPU support and add link to blog/demo (#23483)
Reese Levine [Thu, 21 May 2026 18:00:27 +0000 (11:00 -0700)]
Update WebGPU support and add link to blog/demo (#23483)

3 months agovulkan: fuse snake activation (mul, sin, sqr, mul, add) (#22855)
Pascal [Thu, 21 May 2026 17:39:42 +0000 (19:39 +0200)]
vulkan: fuse snake activation (mul, sin, sqr, mul, add) (#22855)

* vulkan: fuse snake activation (mul, sin, sqr, mul, add)

Add snake.comp shader with F32 / F16 / BF16 pipelines and
ggml_vk_snake_dispatch_fused. The matcher recognizes the naive 5 op
decomposition emitted by audio decoders (BigVGAN, Vocos) for snake
activation y = x + sin(a*x)^2 * inv_b and rewrites it to a single
elementwise kernel.

test_snake_fuse from the CUDA PR now also compares CPU naive vs
Vulkan fused across F32 / F16 / BF16.

* vulkan: address jeffbolznv review for fused snake activation

Rename T / C to ne0 / ne1 in the shader and push constants to match
the standard naming convention used across the Vulkan backend.

Tighten ggml_vk_can_fuse_snake: require x and dst to be contiguous
(the shader uses idx = i0 + i1 * ne0) and require a / inv_b to be
tightly packed on the broadcast dim (the shader reads data_a[i1]).

* vulkan: tighten snake fusion type checks for all operands (address jeffbolznv review)

* vulkan: reject snake fusion when ne[2] or ne[3] > 1 (address jeffbolznv review)

* vulkan: address 0cc4m review for fused snake activation

snake.comp is renamed to follow the ggml DATA_A_* / A_TYPE convention.
A_TYPE now applies to the activation tensor data_a instead of the
broadcast multiplier, and the bindings become data_a (A_TYPE), data_b
(float), data_c (float) and data_d (D_TYPE). A header at the top of
the shader maps each buffer to its role in y = x + sin(b * x)^2 * c.

On the C++ side, ggml_vk_can_fuse_snake reuses the existing snake_pattern
constant instead of duplicating the op list, sin_node is extracted as a
named local alongside the other chain nodes, and the broadcast operands
a and inv_b are now required to be GGML_TYPE_F32 to match the hardcoded
float bindings on data_b and data_c (the previous a->type == x->type
would silently reject any future BF16 or F16 chain once the supports_op
gate for SIN / SQR is lifted). ggml_vk_snake_dispatch_fused gets an
explicit GGML_TYPE_F32 case and GGML_ABORT on default in place of the
silent f32 fallback, and a stale comment about data_a[i1] / data_inv_b[i1]
is refreshed to match the new binding names.

3 months agofix(flash-attn): replace f32 with kv_type and q_type (#23372)
Chen Yuan [Thu, 21 May 2026 14:58:49 +0000 (10:58 -0400)]
fix(flash-attn): replace f32 with kv_type and q_type (#23372)

3 months agotests : move save-load-state from examples to tests (#23336)
Georgi Gerganov [Thu, 21 May 2026 11:41:50 +0000 (14:41 +0300)]
tests : move save-load-state from examples to tests (#23336)

* tests : move save-load-state from examples to tests

- Move examples/save-load-state/ to tests/test-save-load-state.cpp
- Remove subdirectory reference from examples/CMakeLists.txt
- Add test to tests/CMakeLists.txt as a model test
- Remove CODEOWNERS entry for removed example directory

Assisted-by: llama.cpp:local pi
* cont : update ci

3 months agoserver: expose prompt token counts in /slots endpoint (#23454)
ScrewTSW [Thu, 21 May 2026 11:29:13 +0000 (13:29 +0200)]
server: expose prompt token counts in /slots endpoint (#23454)

Add n_prompt_tokens, n_prompt_tokens_processed, and n_prompt_tokens_cache
to the /slots JSON response. These fields are already tracked internally
but were not exposed, making it impossible for clients to monitor prompt
evaluation progress during processing.

3 months agometal : optimize concat kernel and fix set kernel threads (#23411)
Georgi Gerganov [Thu, 21 May 2026 10:34:08 +0000 (13:34 +0300)]
metal : optimize concat kernel and fix set kernel threads (#23411)

* metal : fix GGML_OP_SET kernel threads

* tests : extend test_cpy to support different src/dst shapes

Extend test_cpy to support different source and destination tensor shapes
for CPY operations (reshaping), where the total number of elements must match.

- Renamed ne -> ne_src, added ne_dst parameter (default: use src shape)
- Added 50 new reshaping test cases covering 1D<->2D<->3D<->4D conversions
- Tests exercise 1024 boundary, small shapes, and large dimensionality changes
- Fixed dangling reference bug (storing & to temporary std::array)
- Updated all existing test calls with permute/transpose args for compatibility

Assisted-by: llama.cpp:local pi
* metal : optimize concat kernel with row batching for small widths

When ne0 < 256, batch multiple rows into a single threadgroup to improve
occupancy. This avoids underutilizing the GPU when processing narrow tensors.

- Dispatch nth = min(256, ne0) threads per group
- Calculate nrptg (rows per threadgroup) to fill up to 256 threads
- Update kernel index calculation to handle the row batching
- Add boundary check for i1 >= ne1

Assisted-by: llama.cpp:local pi
* tests : clean-up

* tests : refactor CPY shape tests to use dimension permutations

Replace 75 hardcoded test cases with a loop over permutations of
{3, 5, 7, 32} (total elements: 3360). Each src permutation is tested
against canonical sorted and reverse dst, skipping identical shapes.
Covers F32, F16, and Q4_0 (when both src and dst ne0 == 32).

Assisted-by: llama.cpp:local pi
3 months agoserver : free draft/MTP resources on sleep to fix VRAM leak (#23461)
Aman Gupta [Thu, 21 May 2026 08:11:11 +0000 (16:11 +0800)]
server : free draft/MTP resources on sleep to fix VRAM leak (#23461)

The destroy() function in server_context_impl only cleaned up the main
model and context (via llama_init.reset()) but did not free the speculative
decoder (spec), draft context (ctx_dft), or draft model (model_dft).

For MTP (Multi-Token Prediction) models, ctx_dft holds GPU-allocated
resources (KV cache, compute buffers) that are not freed when entering
the sleeping state. On each sleep/resume cycle, new resources are
allocated without the old ones being freed, leading to a VRAM leak
that eventually crashes the server with out-of-memory errors.

Fix by explicitly resetting spec, ctx_dft, and model_dft in destroy()
before resetting llama_init, ensuring proper cleanup order to avoid
use-after-free.

ref: https://github.com/ggml-org/llama.cpp/issues/23395

Assisted-by: llama.cpp:local pi
3 months agoserver: re-inject subcommand when router spawns children under unified binary (#23442)
Pascal [Thu, 21 May 2026 08:09:19 +0000 (10:09 +0200)]
server: re-inject subcommand when router spawns children under unified binary (#23442)

3 months agoapp : add batched-bench, fit-params, quantize & perplexity (#23459)
Adrien Gallouët [Thu, 21 May 2026 07:29:44 +0000 (09:29 +0200)]
app : add batched-bench, fit-params, quantize & perplexity (#23459)

* app : add batched-bench, fit-params, quantize & perplexity

Signed-off-by: Adrien Gallouët <redacted>
* Add missing main.cpp

Signed-off-by: Adrien Gallouët <redacted>
* Add EOL

Signed-off-by: Adrien Gallouët <redacted>
---------

Signed-off-by: Adrien Gallouët <redacted>
3 months agomtp: use inp_out_ids for skipping logit computation (#23433)
Aman Gupta [Thu, 21 May 2026 07:23:14 +0000 (15:23 +0800)]
mtp: use inp_out_ids for skipping logit computation (#23433)

when doing a follow-up decode for the draft model, we were always doing the logit computation even though it is not required.

3 months agovocab : add Carbon-3B (HybridDNATokenizer) support (#23410)
Kashif Rasul [Thu, 21 May 2026 06:34:32 +0000 (08:34 +0200)]
vocab : add Carbon-3B (HybridDNATokenizer) support (#23410)

* vocab : add Carbon-3B (HybridDNATokenizer) support

Adds a new BPE pre-type LLAMA_VOCAB_PRE_TYPE_CARBON for the
HybridDNATokenizer used by HuggingFaceBio/Carbon-{500M,3B,8B}.
The base BPE is Qwen3-4B-Base's; what differs is that text inside
<dna>...</dna> regions is chunked into fixed 6-mers (right-padded
with 'A' on the trailing partial), and any base outside ACGT maps
to <oov>.

* src/llama-vocab.{h,cpp}: new pre-type, dispatched from
  llm_tokenizer_bpe_session::tokenize.
* src/llama-vocab-carbon.h: pure helpers (tokenize_carbon,
  emit_dna_kmers) factored out for unit testing — no llama_vocab
  dependency, vocab access goes through a std::function.
* conversion/base.py: detect HybridDNATokenizer by class name in
  get_vocab_base_pre (chktxt collides with Qwen3 base since it
  has no <dna>), and pass trust_remote_code=True in get_vocab_base
  so the custom tokenizer class can load.
* tests/test-tokenizer-carbon.cpp: 12 cases covering single 6-mer,
  multi 6-mer, lowercase, invalid base -> <oov>, partial k-mer
  right-pad, mixed text+DNA, empty <dna></dna>, unterminated <dna>,
  two regions, vocab miss.

* vocab : align Carbon-3B changes with llama.cpp conventions

* Fold tokenize_carbon + emit_dna_kmers inline into
  llm_tokenizer_bpe_session (drop src/llama-vocab-carbon.h),
  matching how every other tokenizer keeps its helpers inside
  llama-vocab.cpp.

* Replace the standalone unit test with the conventional
  test-tokenizer-0 row backed by models/ggml-vocab-carbon.gguf
  (vocab-only conversion) + .inp/.out fixtures covering single
  6-mer, multi 6-mer, lowercase, invalid base -> <oov>, partial
  right-pad, mixed text+DNA, empty <dna></dna>, unterminated <dna>,
  two regions.

* Register "carbon" in convert_hf_to_gguf_update.py's model list
  (pointing at HuggingFaceBio/Carbon-3B) and teach both
  AutoTokenizer call sites in the updater to pass
  trust_remote_code=True for it, matching how t5 is special-cased.

* vocab : move Carbon dispatch to _set_vocab_carbon + LlamaModel branch

Refactor the conversion-side changes to follow the per-tokenizer-family
convention used by _set_vocab_qwen, _set_vocab_interns1, _set_vocab_glm,
etc. instead of conditionalising the shared get_vocab_base /
get_vocab_base_pre paths.

* conversion/base.py: add _set_vocab_carbon — self-contained, loads
  with trust_remote_code=True so HybridDNATokenizer's merged Qwen3 + DNA
  vocab is visible, writes tokenizer.ggml.pre = "carbon" directly.
* conversion/llama.py: branch in LlamaModel.set_vocab on
  tokenizer_config.json["tokenizer_class"] == "HybridDNATokenizer" and
  dispatch to _set_vocab_carbon. Same precedent as conversion/bert.py
  (tokenizer_class branch between BertTokenizer / RobertaTokenizer) and
  conversion/phi.py.
* conversion/base.py: revert the conditional in get_vocab_base and the
  class-name short-circuit in the auto-generated get_vocab_base_pre.

* tests : expand ggml-vocab-carbon.gguf fixtures with model-card examples

Add 6 cases from the Carbon-3B model card on top of the existing edge
coverage: the unterminated basic-completion prompt, the closed 33-bp
example, the metadata-conditioned prompt (with <vertebrate_mammalian>
and <protein_coding_region> which BPE-decompose since they are not in
the vocab), the documented anti-pattern of raw DNA without <dna> tags,
and the two likelihood-scoring examples. Brings the suite to 19 cases.

* vocab : promote HybridDNATokenizer to its own LLAMA_VOCAB_TYPE

Refactor per upstream review:

> This should be its own tokenizer model, ie. carbonhybriddna instead
> of gpt2 and not carbon pre-tokenizer. That way you can keep the
> correct pre-tokenizer, in case that ever changes.

Previously the tokenizer was modelled as LLAMA_VOCAB_TYPE_BPE plus a
new LLAMA_VOCAB_PRE_TYPE_CARBON, which (a) put a CARBON-specific
branch inside llm_tokenizer_bpe_session::tokenize (only existing
pre-types differ in regex, not dispatch logic), and (b) conflated
"hybrid DNA tokenization" with "Qwen3 BPE pre-tokenizer".

This change moves it to its own vocab type, peer to PLAMO2, with the
GGUF model name matching the HF tokenizer class (HybridDNATokenizer):

* include/llama.h: new LLAMA_VOCAB_TYPE_HYBRIDDNA = 7.
* src/llama-vocab.cpp: new llm_tokenizer_hybriddna + session that
  owns std::unique_ptr<llm_tokenizer_bpe> for non-<dna> text and
  routes raw text through a DNA-aware splitter; wired into
  init_tokenizer, tokenize, type_name, byte_to_token, and the
  BPE-style token_to_piece case (DNA k-mers + <dna>/</dna>/<oov>
  are pure ASCII, so byte-level BPE decoding handles them).
  LLAMA_VOCAB_TYPE_HYBRIDDNA gets its own branch in the vocab-type
  config block alongside SPM/WPM/UGM/RWKV, where pre_type is set
  to QWEN2 and the matching add_space_prefix / escape_whitespaces /
  clean_spaces flags are applied — mirroring qwen2's BPE path so
  byte-level BPE merging stays bit-identical to the Python
  reference for non-DNA text.
* src/llama-vocab.h: drop the short-lived LLAMA_VOCAB_PRE_TYPE_CARBON.
* conversion/base.py: _set_vocab_hybriddna writes
  tokenizer.ggml.model = "hybriddna" (no separate pre).
* conversion/llama.py: dispatch on tokenizer_class ==
  "HybridDNATokenizer" same as bert.py / phi.py do.
* models/ggml-vocab-hybriddna.gguf{,.inp,.out}: renamed fixture +
  regenerated metadata.
* convert_hf_to_gguf_update.py: drop the stale chkhsh entry and
  trust_remote_code special-case (no longer needed since dispatch
  is now class-name driven, not chkhsh).

Verified end-to-end against HuggingFaceBio/Carbon-{500M,3B,8B}:
tokenization is bit-identical to the Python HybridDNATokenizer for
all 19 test fixtures plus the model-card metadata-conditioned
prompt; greedy completion produces the same DNA continuation as
the Python reference; spec-dec with 500M as draft for 8B still
works.

* vocab : relax llm_tokenizer_bpe assert to allow HYBRIDDNA

* vocab : drop llm_tokenizer_bpe vocab-type assert

* vocab : write tokenizer.ggml.pre for HYBRIDDNA, share BPE dispatch

* vocab : assert BPE or HYBRIDDNA in llm_tokenizer_bpe

* vocab : annotate #endif with PRETOKENIZERDEBUG

* vocab : drop local hybriddna fixture (moves to ggml-org/vocabs)

* deduplicate

* simplify

* simplify

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agodoc: fix spec mtp typo (#23435)
Ruixiang Wang [Thu, 21 May 2026 06:30:55 +0000 (08:30 +0200)]
doc: fix spec mtp typo (#23435)

3 months agoui: Improve Git Hooks for UI development (#23403)
Aleksander Grygier [Thu, 21 May 2026 06:27:50 +0000 (08:27 +0200)]
ui: Improve Git Hooks for UI development (#23403)

* refactor: Improve Git Hooks for UI development

* fix: Address review comments

* fix: Use absolute git path for `/hooks`

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

Co-authored-by: Pascal <redacted>
3 months agoggml : Check the right iface method before using the fallback 2d get (#23306)
Matt Corallo [Thu, 21 May 2026 06:24:40 +0000 (06:24 +0000)]
ggml : Check the right iface method before using the fallback 2d get (#23306)

Probably no backends implement only one of 2d get/set, but this
might be annoying for some future backend developer trying to add
2d get/set.

3 months agollama-graph: fix null-buffer crash in llm_graph_input_attn_kv_iswa for SWA-only model...
Daniel Elliott [Thu, 21 May 2026 06:20:51 +0000 (23:20 -0700)]
llama-graph: fix null-buffer crash in llm_graph_input_attn_kv_iswa for SWA-only models (#23131)

When a model has zero non-SWA attention layers (e.g. a SWA-only slice of Gemma 4),
the base KV cache has no layer tensors. The input tensors (self_k_idxs, self_v_idxs,
self_kq_mask) are created as graph input nodes but never consumed by any compute node,
so the backend scheduler never allocates a buffer for them. Calling
mctx->get_base()->set_input_k_idxs() on an unallocated tensor then hits
GGML_ASSERT(buffer) at ggml-backend.cpp:194.

The same scenario applies symmetrically: if a model had zero SWA layers, the SWA
tensors would be unallocated.

Fix: guard both the base and SWA set_input calls with null/buffer checks, matching
the pattern already used by llm_graph_input_mem_hybrid_iswa::set_input (line ~674)
which has the comment: 'base tensors may not be allocated if there are no non-SWA
attention layers'.

Also fix can_reuse() in the same class to skip the ne[0] and kq_mask checks for
unallocated tensors, preventing a null-dereference on the reuse path.

3 months agohexagon: ssm-conv fix for large prompts (#23307)
Todor Boinovski [Thu, 21 May 2026 05:14:13 +0000 (22:14 -0700)]
hexagon: ssm-conv fix for large prompts (#23307)

* hexagon: remove gathers and better handling of vtcm in ssm-conv

* hexagon: relax ssm-conv gating requirements

* hexagon: add new prefill ssm-conv backend test

* hexagon: remove trailing white space

* hex-rope: uninline rope_cache_init, otherwise it breaks after rebaseing with SSM_CONV changes

---------

Co-authored-by: Max Krasnyansky <redacted>
3 months agoapp : show version (#23426)
Adrien Gallouët [Thu, 21 May 2026 04:21:13 +0000 (06:21 +0200)]
app : show version (#23426)

Signed-off-by: Adrien Gallouët <redacted>
3 months agomtmd, model : merge HunyuanOCR into HunyuanVL and fix OCR vision precision (#23329)
wendadawen [Wed, 20 May 2026 22:35:37 +0000 (06:35 +0800)]
mtmd, model : merge HunyuanOCR into HunyuanVL and fix OCR vision precision (#23329)

- HunyuanOCR shares the same HF arch and vision layout as HunyuanVL butwas split into a separate path that skipped the +0.1 bilinear sampler used by the HF reference.
- Collapse OCR into the HUNYUANVL projector + HUNYUAN_VL text arch

3 months agoui: Add max image size option (#22849)
stduhpf [Wed, 20 May 2026 22:00:09 +0000 (00:00 +0200)]
ui: Add max image size option (#22849)

* webui: Add max image size option

* remove magic numbers

* support all image formats

* use const

* Move regex to match b64 images to constants

* use SETTINGS_KEYS to get max image resolution setting

* Do not touch the image if already under the size threshold

3 months agoMove to backend sampling for MTP draft path (#23287)
Gaurav Garg [Wed, 20 May 2026 17:04:45 +0000 (22:34 +0530)]
Move to backend sampling for MTP draft path (#23287)

* Move to backend sampling for MTP draft path

Run top_k(10) on the draft backend. D2H transfers happen only for the top 10 logits

Make backend sampling more robust and fallback to CPU on failure cases, such as with "-sm tensor" or when a backend doesn't support TOP_K.

* Allow sampler chains to be partially offloaded to backend

* Add --spec-draft-backend-sampling argument. Enabled by default.

3 months agoopencl: refactor backend initilization (#23318)
lhez [Wed, 20 May 2026 16:57:36 +0000 (09:57 -0700)]
opencl: refactor backend initilization (#23318)

* opencl: refactor initialization

* opencl: refactor GPU identification

* opencl: rename for consistency

* opencl: cache global mem size in dev_ctx

* opencl: adjust log level

* opencl: load argsort and flash_attn kernels in supports_op

* argsort kernel must be built for supports_op for querying the max
  workgroups
* flash_attn kernel has many variants, only load them when needed

3 months agocommon/speculative : fix nullptr crash in get_devices_str (#23386)
Georgi Gerganov [Wed, 20 May 2026 16:44:30 +0000 (19:44 +0300)]
common/speculative : fix nullptr crash in get_devices_str (#23386)

ggml_backend_dev_by_name always appends a nullptr sentinel to the devices
vector. Skipping nullptr entries prevents assertion failure in
ggml_backend_dev_name.

Assisted-by: llama.cpp:local pi
3 months agomtmd : DeepSeek-OCR image processing fixes, img_tool::resize padding refactor (#23345)
Saba Fallah [Wed, 20 May 2026 15:37:10 +0000 (17:37 +0200)]
mtmd : DeepSeek-OCR image processing fixes, img_tool::resize padding refactor (#23345)

* mtmd : deepseek-ocr fixes, improvements and refactoring

- image processing changes to achieve full parity with Pillow (reference impl)
- SAM mask casting only when flash-attn is on
- SAM refactor (build_sam() extracted so deepseek-ocr-2 can reuse it)
- llama-chat changes to fix server/WebUI issue (new media_markers_first())
- adapted test-chat-template and added test cases for deepseek-ocr
- changed regression test for deepseek-ocr to use CER+chrF scores for ground-truth comparison; removed embedding-model
- ty.toml ignore unresolved-import for tools/mtmd/tests/**

* image-text reordering fix removed

* refactor bool add_padding + pad_rounding enum into a single pad_style enum

3 months agovulkan: optimize operations in the IM2COL shader (#22685)
Daniele [Wed, 20 May 2026 15:15:13 +0000 (17:15 +0200)]
vulkan: optimize operations in the IM2COL shader (#22685)

* vulkan: optimize operations in the IM2COL shader

* Add comments and improve the code formatting

3 months agofeat: Add WAV MIME type variants and improve audio format detection (#23396)
Aleksander Grygier [Wed, 20 May 2026 14:55:24 +0000 (16:55 +0200)]
feat: Add WAV MIME type variants and improve audio format detection (#23396)

3 months agohexagon: HMX quantized matmul rework (#23368)
Max Krasnyansky [Wed, 20 May 2026 14:39:01 +0000 (07:39 -0700)]
hexagon: HMX quantized matmul rework (#23368)

* hmx-mm: update debug logging in hmx-mm

* hmx-mm: update dequant logic to use HVX_vector_x2/4

* hmx-mm: remove non-pipelined version of the quantize matmul

It seems that we don't reall need non-pipelined version

* hmx-mm: use activation depth mode and update naming

Co-authored-by: Kim-Chyan Gan <redacted>
* hex-mm: minor hmx matmul naming updates

* hmx-mm: remove unused vars

* snapdragon: scripts bump default ubatch-size to 1K

* hexagon: combine HMX and power and clock settings into a single set_power call

* hmx-mm: remove leftover of the scale repl helper

* hexagon: fix editconf error

---------

Co-authored-by: Kim-Chyan Gan <redacted>
3 months agoProgrammatic Dependent Launch (PDL) for more performance on newer NVIDIA GPUs (Hopper...
Andreas Kieslinger [Wed, 20 May 2026 11:59:02 +0000 (13:59 +0200)]
Programmatic Dependent Launch (PDL) for more performance on newer NVIDIA GPUs (Hopper+) (#22522)

* Adds initial PDL setup.

* Adds PDL barriers based on simple heuristic: place "sync" before first input pointer access, and "launch" after last write, e.g. to tensors like dst.

* Further optimization pass of the first half of kernels

* Optimized PDL barriers for the second batch of kernels

* Further refinements after rebase.

* Moves pdl logic to separate function, removes some whitespace

* Strips post-hoc PDL logic

* Adds stream capture PDL setup. Enrolls quantize_q8_1 to leverage pdl to
overlap execution with previous kernels

* Enrolls mul_mat_vec_q, rms_norm_f32 and k_bin_bcast (partly) into PDL

* Enrolls mmvf, rope, set-rows and topk kernels for gpt-oss into PDL

* Introduce ggml_cuda_kernel_launch, to abstract away cudaLaunchKernelEx,
to enable hip/musa compatibility

* Enrolls cpy_scalar_contiguous, k_get_rows_float and rms_norm_f32

* Enrolls flash_attn_combine_results

* Fix: Drops needless and broken check of CUDA arch for PDL. PDL either
works or is without effect.

* Enrolls flash-attention kernels to pdl

* Fix: inlines ggml_cuda_kernel_launch, and uses perfect forwarding for
kernels args. This fixes PDL.

* Perf: Enrolls k_bin_bcast variadic template invocation into PDL, via
and template alias and template expansion

* Enrolls all remaining kernels for qwen3-coder-next into PDL

* Remove all PDL LC calls to create a baseline

* Added LC according to internal guidance and tested kernel performance.

* Enrols missing qwen3-5 kernels passively into PDL.

* Kernel optimizations (LC signals) for qwen3.5

* Enrolls ssm-scan kernels into PDL

* Adds GGML_CUDA_PDL command line option to toggle PDL.

* Fix: Ada and lower compilation by guarding PDL calls correctly

* Cleanup: Removes commented out GGML_CUDA_PDL_LC

* Cleanup: Removes experimental comments

* Adds 90-virtual to build script so that Hopper GPUs can leverage PDL.

* Adds stricter checks to enable PDL, adds env-check to disable it, and removes now superfluous compile option to enable PDL.

* Fix: Correct PDL en/disablement based on device-side arch check. Host
side check is UB. Required moving from macros to inlined functions

* Fix: default-disable PDL. Enable by setting GGML_CUDA_ENABLE_PDL=1

* Enable PDL by default for Hopper+ devices

* Enrolls softcap_f32 and two flash_attn kernels into PDL.

* Improves flash attn PDL barrier placement

* Fix: Perf regression on ada; excludes ada and below from PDL launches

* Improves some sync barrier placements

* Drops superfluous constructor

* Adds #endif guard comments

* Reverts experimental change to top-k-moe.cu, which moved expensive allocations
in front of the PDL barrier. It did not have a meaningful impact.

* Exchanges GGML_CUDA_DISABLE_PDL with GGML_CUDA_PDL. IFF GGML_CUDA_PDL=0
PDL is disabled

* Revert "Drops superfluous constructor". Adds const to remaining
arguments

This reverts commit 12b1d250da0089ae02a9bb71bbb3fd6d70f6f2f1.

* Cleanup: Removes and fixes some comments and whitespace

* Clarifies comment of sync-barrier position

* Relocates and refactors PDL launch functions and accessories

* Adds error checking to the regular kernel launch path

* Drops "auto" in favor of "ggml_cuda_kernel_params"

* Adds "const" to ggml_cuda_kernel_launch_params

* [Whitespace] Adds final newline to common.cuh to make editorconfig CI job happy

3 months agoapp : introduce the llama unified executable (#23296)
Adrien Gallouët [Wed, 20 May 2026 11:22:22 +0000 (13:22 +0200)]
app : introduce the llama unified executable (#23296)

* app : introduce the llama unified executable

Signed-off-by: Adrien Gallouët <redacted>
* Use serve for server

Signed-off-by: Adrien Gallouët <redacted>
* Hide completion and bench, add help command

Signed-off-by: Adrien Gallouët <redacted>
* Remove STATIC

Signed-off-by: Adrien Gallouët <redacted>
* Use -impl targets instead of -lib

Signed-off-by: Adrien Gallouët <redacted>
* Revert "Remove STATIC"

This reverts commit cc44caccb9902b34a3531633edac911e5b3d65cd.

---------

Signed-off-by: Adrien Gallouët <redacted>
3 months agorefactor: Move text attachments up before the message content in chat completions...
Aleksander Grygier [Wed, 20 May 2026 11:04:01 +0000 (13:04 +0200)]
refactor: Move text attachments up before the message content in chat completions payload (#23406)

3 months agomtmd: fit_params now take into account mmproj (#21489)
Xuan-Son Nguyen [Wed, 20 May 2026 09:27:44 +0000 (11:27 +0200)]
mtmd: fit_params now take into account mmproj (#21489)

* mtmd: fit_params now take into account mmproj

* rename alloc_compute_meta to reserve_compute_meta

* rm unused functions

* add ggml_backend_dev_t support

* add debug log

3 months agodocker : copy conversion files (#23370)
Sigbjørn Skjæret [Wed, 20 May 2026 09:03:18 +0000 (11:03 +0200)]
docker : copy conversion files (#23370)

3 months agoui: Refactor `isMobile` as reactive value in `viewport` store (#23330)
Aleksander Grygier [Wed, 20 May 2026 08:52:00 +0000 (10:52 +0200)]
ui: Refactor `isMobile` as reactive value in `viewport` store (#23330)

* refactor: `isMobile` as reactive value in `viewport` store

* refactor: Use Svelte media query for the viewport store

3 months agofix: Div wrapper no pointer events on hidden (#23390)
Aleksander Grygier [Wed, 20 May 2026 07:46:31 +0000 (09:46 +0200)]
fix: Div wrapper no pointer events on hidden (#23390)

3 months agometal : optimize pad + cpy (#23354)
Georgi Gerganov [Wed, 20 May 2026 06:42:00 +0000 (09:42 +0300)]
metal : optimize pad + cpy (#23354)

* metal : optimize pad

* metal : optinmize cpy

* cont : better row packing in threadgroup

3 months agosnapdragon: update toolchain to v0.6 (#23369)
Max Krasnyansky [Wed, 20 May 2026 05:04:04 +0000 (22:04 -0700)]
snapdragon: update toolchain to v0.6 (#23369)

* snapdragon: update compiler flags to enable all CPU features

* snapdragon: update readme to point to toolchain v0.6

* snapdragon: bump toolchain docker to v0.6

3 months agoggml-cuda: tune RDNA3 Q6_K MMVQ nwarps (#23349)
ravel7524 [Wed, 20 May 2026 01:52:21 +0000 (03:52 +0200)]
ggml-cuda: tune RDNA3 Q6_K MMVQ nwarps (#23349)

3 months agoopencl: add MoE support for q4_k, q5_k, q6_k on Adreno (#23303)
shaofeiqi [Tue, 19 May 2026 21:29:00 +0000 (14:29 -0700)]
opencl: add MoE support for q4_k, q5_k, q6_k on Adreno (#23303)

* opencl: add q4_k moe support

* opencl: add q5_k moe support

* opencl: add q6_k moe support

* opencl: adjust format

---------

Co-authored-by: Li He <redacted>
3 months agohexagon: add MROPE and IMROPE support in HTP rope op (#23317)
Aparna M P [Tue, 19 May 2026 21:10:13 +0000 (02:40 +0530)]
hexagon: add MROPE and IMROPE support in HTP rope op (#23317)

3 months agorefactor: Chat Screen UI rendering (#23333)
Aleksander Grygier [Tue, 19 May 2026 20:38:42 +0000 (22:38 +0200)]
refactor: Chat Screen UI rendering (#23333)

3 months agogithub: mention --log-file in issue templates (#23277)
Johannes Gäßler [Tue, 19 May 2026 19:35:10 +0000 (21:35 +0200)]
github: mention --log-file in issue templates (#23277)

3 months agocommon: fix --help for --verbosity (#23278)
Johannes Gäßler [Tue, 19 May 2026 19:34:04 +0000 (21:34 +0200)]
common: fix --help for --verbosity (#23278)

3 months agocommon: fix --fit verbosity with --verbosity 4 (#23282)
Johannes Gäßler [Tue, 19 May 2026 19:33:23 +0000 (21:33 +0200)]
common: fix --fit verbosity with --verbosity 4 (#23282)

3 months agoconvert : update mtp related help (#23334)
Sigbjørn Skjæret [Tue, 19 May 2026 19:16:58 +0000 (21:16 +0200)]
convert : update mtp related help (#23334)

* update mtp related help

* remove outdated experimental text

3 months agohexagon: enable support for NORM op (#23319)
Aparna M P [Tue, 19 May 2026 16:48:21 +0000 (22:18 +0530)]
hexagon: enable support for NORM op (#23319)

3 months agomodel : clarify MTP layer comment in qwen35.cpp [no ci] (#23338)
Daniel Bevenius [Tue, 19 May 2026 16:41:44 +0000 (18:41 +0200)]
model : clarify MTP layer comment in qwen35.cpp [no ci] (#23338)

This commit attempts to clarify a code comment in graph_mtp regarding
where the MTP layer is stored.

The motivation for this is that it was not obvious to me what the
original comment meant and hopefully this makes it clearer.

3 months agollama : MTP clean-up (#23269)
Georgi Gerganov [Tue, 19 May 2026 12:32:58 +0000 (15:32 +0300)]
llama : MTP clean-up (#23269)

* llama : disable equal splits for recurrent memory with partial rollback

* spec : re-enable p-min with MTP drafts

* spec : re-enable ngram spec in combination with RS rollback

* spec : fix ngram-map-* params

* spec : fix acceptance logic in combined ngram + draft configs

* graph : fix reuse for combined `token` + `embd` batches

* spec : log parameters for each speculative implementation

- add LOG_INF in each constructor with implementation type and parameters
- extract device string logic into common_speculative_get_devices_str()
- move 'adding speculative implementation' log from init into constructors

Assisted-by: llama.cpp:local pi
* spec : extend --spec-default with ngram-map-k4v

Assisted-by: llama.cpp:local pi
* minor : fix n_embd log

* args : update draft.n_max == 3 + regen docs

* spec : relax ngram-mod rejection thold to 0.25 @ 5 low

* logs : improve

* docs : update speculative decoding CLI argument documentation

- Add missing draft model CPU scheduling and tensor override parameters
- Update --spec-type to include all available types (excluding draft-eagle3 WIP)
- Fix default values to match implementation (n_max=3, n_min=0, p_min=0.0)
- Remove deprecated options (spec-draft-ctx-size, spec-draft-replace)
- Add environment variables for new parameters

Assisted-by: llama.cpp:local pi
* arg : step-back on adding k4v to the default spec config

* cont : fix name

3 months agoui: Bump packages + address build warnings (#23300)
Aleksander Grygier [Tue, 19 May 2026 08:16:04 +0000 (10:16 +0200)]
ui: Bump packages + address build warnings (#23300)

* chore: Update vulnerable packages

* chore: Formatting

* refactor: Update Tailwind CSS imports

* ci: Use `ubuntu-latest` for Unit/E2E UI tests

* chore: Bump package

* fix: Add missing tag

* refactor: Enums files naming

3 months agoci : install libssl-dev (#23325)
Sigbjørn Skjæret [Tue, 19 May 2026 08:11:04 +0000 (10:11 +0200)]
ci : install libssl-dev (#23325)

3 months agoci : install server kleidiai runner dependencies (#23259)
Sigbjørn Skjæret [Tue, 19 May 2026 07:06:56 +0000 (09:06 +0200)]
ci : install server kleidiai runner dependencies (#23259)

3 months agoserver-context: guarantee there is at least 1 token to decode (#23280)
Pascal [Tue, 19 May 2026 06:49:01 +0000 (08:49 +0200)]
server-context: guarantee there is at least 1 token to decode (#23280)

3 months agoserver : print graphs reused in slot timings (#23279)
Georgi Gerganov [Tue, 19 May 2026 06:46:58 +0000 (09:46 +0300)]
server : print graphs reused in slot timings (#23279)

Add graphs reused counter to the per-slot timing output, printed via
llama_perf_context().

Assisted-by: llama.cpp:local pi
Co-authored-by: ggerganov <redacted>
3 months agosave-load-state : refactor tests and improve readability (#23196)
Georgi Gerganov [Tue, 19 May 2026 06:46:34 +0000 (09:46 +0300)]
save-load-state : refactor tests and improve readability (#23196)

* save-load-state : refactor into separate phase functions

- Split monolithic main() into 4 self-contained phase functions, each
  managing its own context/sampler/batch lifecycle
- Each function tokenizes internally using its local ctx instance
- main() is now a clean orchestrator: init -> run phases -> assert results
- Proper resource cleanup on every exit path (return {} on error)

Assisted-by: llama.cpp:local pi
* save-load-state : use params.out_file instead of separate state_file

- Remove state_file parameter from all phase functions
- Each function accesses params.out_file directly
- Initialize params.out_file in main alongside params.prompt

Assisted-by: llama.cpp:local pi
* save-load-state : use smart pointers for ctx and smpl

- Replace raw llama_context* with llama_context_ptr
- Replace raw llama_sampler* with llama_sampler_ptr
- Remove all manual llama_free() and llama_sampler_free() calls
- Keep llama_batch as raw (managed manually with llama_batch_free)

Assisted-by: llama.cpp:local pi
* save-load-state : add local llama_batch_ptr RAII wrapper

- Add llama_batch_ptr struct holding llama_batch by value
- Calls llama_batch_free() in destructor
- Eliminates all manual llama_batch_free() calls

Assisted-by: llama.cpp:local pi
* save-load-state : replace printf/fprintf with logging macros

- Add log.h include
- Replace fprintf(stderr, ...) errors with LOG_ERR
- Replace fprintf(stderr, ...) info with LOG_TRC
- Replace printf output with LOG

Assisted-by: llama.cpp:local pi
* save-load-state : refactor tests to check results inline

Each follow-up phase now accepts an expected result and performs
the comparison internally instead of collecting results in main().

Assisted-by: llama.cpp:local pi
* save-load-state : improve test output readability

Add phase labels, remove redundant run prefixes, and show
PASS after each test.

Assisted-by: llama.cpp:local pi
* pi : add rule about git signing

* save-load-state : simplify llama_batch_ptr

Change get() to return a reference and remove operator*().
Use batch.get() throughout for consistency.

Assisted-by: llama.cpp:local pi
* save-load-state : extract generate_tokens helper

Factor out the repeated token generation loop into a shared
helper function used by all phases.

Assisted-by: llama.cpp:local pi
* save-load-state : update comments to use test terminology

Replace "Phase" with "Test" and list each test's steps
as bullet points.

Assisted-by: llama.cpp:local pi
* save-load-state : rename test functions

Rename to test_baseline, test_state_load, test_seq_cp_host,
test_seq_cp_device. Update comments and logs accordingly.

Assisted-by: llama.cpp:local pi
* pi : add rule to never git push without confirmation

Assisted-by: llama.cpp:local pi
* common : add model_only option to common_init_from_params

Add bool model_only parameter to skip context creation,
sampler init, and context-dependent setup.

Use in save-load-state to initialize only the model,
with each test creating its own context.

Assisted-by: llama.cpp:local pi
---------

Co-authored-by: ggerganov <redacted>
3 months agollama-eval : add per-task summary stats (#23151)
Georgi Gerganov [Tue, 19 May 2026 06:46:05 +0000 (09:46 +0300)]
llama-eval : add per-task summary stats (#23151)

* llama-eval : add per-problem summary table to HTML reports

- Add chunk_idx and problem_idx to TaskState and saved case dicts
- Group completed cases by problem_idx in dump_html()
- Render per-problem summary table before individual task table
  - Columns: Problem (zero-padded), Runs, Correct (n/r),
    Tokens (min/avg/max), T/s (min/avg/max), Gen s (min/avg/max)
  - Sorted by problem index, monospace font, right-aligned numbers
  - Colspan headers for grouped stats, auto width
- Simulator: add /v1/models endpoint, timings in response,
  template-aware question matching, --dataset arg (aime/aime2025)

Assisted-by: llama.cpp:local pi
* llama-eval : add tabs for Detailed and Summary tables, apply monospace font globally

- Wrap Detailed and Summary tables in switchable tabs (Detailed active by default)
- Remove summary-section wrapper, use tab labels instead
- Apply monospace font to all tables and the top bar

Assisted-by: llama.cpp:local pi
* llama-eval : redesign top bar as CSS grid label/value pairs

- Replace flat span list with 4-column grid layout (2 pairs per row)
- Labels in muted color (#888), values in dark (#222)
- Bold dataset name and model name
- Removed media query, always uses 4 columns

Assisted-by: llama.cpp:local pi
* llama-eval : use realistic token counts and throughput in simulator

- comp_tokens: [30, 80] → [10000, 60000]
- tps_gen: derived → uniform [90.0, 110.0]
- t_gen_ms: now computed from tokens/tps

Assisted-by: llama.cpp:local pi
* llama-eval : color Answer column green/red based on correctness

Use the same .correct/.incorrect CSS classes on the Answer column
to make correct answers green and incorrect answers red.

Assisted-by: llama.cpp:local pi
* llama-eval : fix pyright errors from max(..., key=len) type inference

Use key=lambda x: len(x) instead of key=len so the type checker
infers the return type as str instead of Sized, fixing:
  - unresolved-attribute: Object of type Sized has no attribute lower
  - not-subscriptable: Cannot subscript object of type Sized

Assisted-by: llama.cpp:local pi
3 months agoggml-webgpu : extend GDN for K>1 (#23299)
Reese Levine [Tue, 19 May 2026 06:45:41 +0000 (23:45 -0700)]
ggml-webgpu : extend GDN for K>1 (#23299)

3 months ago[SCYL] add chapter for performance reference in SYCL.md (#23315)
Neo Zhang [Tue, 19 May 2026 06:44:51 +0000 (14:44 +0800)]
[SCYL] add chapter for performance reference in SYCL.md (#23315)

* add chapter for performance reference

* rm unsupported GPU

3 months agoconvert : filter lora tensor names (#23077)
Sigbjørn Skjæret [Tue, 19 May 2026 06:44:25 +0000 (08:44 +0200)]
convert : filter lora tensor names (#23077)

3 months agosycl: add GGML_SYCL_USE_ASYNC_MEM_OP env toggle (#22153)
Intel AI Get-to Market Customer Success and Solutions [Tue, 19 May 2026 06:44:02 +0000 (23:44 -0700)]
sycl: add GGML_SYCL_USE_ASYNC_MEM_OP env toggle (#22153)

* sycl: add GGML_SYCL_USE_ASYNC_MEM_OP env toggle

Signed-off-by: Chun Tao <redacted>
* Use async mem ops for correctness when SYCL graphs are explicitly on.

Signed-off-by: Tao, Chun <redacted>
---------

Signed-off-by: Chun Tao <redacted>
Signed-off-by: Tao, Chun <redacted>
Co-authored-by: Chun Tao <redacted>
3 months agorpc : keep last_graph_uid in the device context (#23273)
Radoslav Gerganov [Tue, 19 May 2026 06:42:36 +0000 (09:42 +0300)]
rpc : keep last_graph_uid in the device context (#23273)

With the introduction of MTP we can have multiple compute contexts for
the same RPC device. In this case last_graph_uid is not updated properly
when contexts are being switched. This patch fixes this by moving
last_graph_uid to the device context, making sure it is always updated.

closes: #23242

3 months agohexagon: add support for TRI op (#22822)
Pranav Dhinakar [Mon, 18 May 2026 21:04:57 +0000 (14:04 -0700)]
hexagon: add support for TRI op (#22822)

* Hexagon: TRI HVX Kernel addition to ggml hexagon HTP ops and context

* addressed PR review comments for TRI op

* hexagon: clang format

* hex-unary: remove merge conflict markers

* hex-ggml: remove duplicate op cases (merge conflict)

* hex-ggml: fix editor config errors

---------

Co-authored-by: Todor Boinovski <redacted>
Co-authored-by: Max Krasnyansky <redacted>
3 months agoggml-hexagon: add PAD op HVX kernel (#23078)
Pranav Dhinakar [Mon, 18 May 2026 20:39:36 +0000 (13:39 -0700)]
ggml-hexagon: add PAD op HVX kernel (#23078)

* ggml-hexagon: add PAD op HVX kernel

Implements GGML_OP_PAD on the Hexagon HTP backend using HVX vectorized
kernels. Supports zero-padding and circular padding across all 4 tensor
dimensions.

* hex-ggml: remove duplicate op cases (merge conflict)

* hex-pad: fix editorconfig checks and macro alignment

---------

Co-authored-by: Max Krasnyansky <redacted>
3 months agodocker : add OCI image labels for version and build date (#21653)
SamareshSingh [Mon, 18 May 2026 20:14:45 +0000 (15:14 -0500)]
docker : add OCI image labels for version and build date (#21653)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <redacted>
---------

Signed-off-by: Samaresh Kumar Singh <redacted>
3 months agocommon : remove hf cache migration (#23266)
Adrien Gallouët [Mon, 18 May 2026 15:11:47 +0000 (17:11 +0200)]
common : remove hf cache migration (#23266)

Signed-off-by: Adrien Gallouët <redacted>
3 months agoui: Update KaTeX package and clean up logs from `sass` warnings (#23275)
Aleksander Grygier [Mon, 18 May 2026 14:26:01 +0000 (16:26 +0200)]
ui: Update KaTeX package and clean up logs from `sass` warnings (#23275)

* ui: migrate katex imports to @use to resolve SCSS deprecation warnings

* ci: Use `ubuntu-slim` for CI (UI) workflow

3 months agofeat: add scroll-to-bottom button to chat + prevent forced scroll down (#23270)
Aleksander Grygier [Mon, 18 May 2026 14:17:21 +0000 (16:17 +0200)]
feat: add scroll-to-bottom button to chat + prevent forced scroll down (#23270)

3 months agoui: Refactor models store, MCP service, and gate logs behind VITE_DEBUG (#23236)
Aleksander Grygier [Mon, 18 May 2026 14:09:40 +0000 (16:09 +0200)]
ui: Refactor models store, MCP service, and gate logs behind VITE_DEBUG (#23236)

* refactor: Scope console logs to `DEV` + `VITE_DEBUG` env vars

* refactor: skip MCP proxy probe when no server requires it

* refactor: suppress expected disconnect errors during MCP client shutdown

* refactor: Deduplicate requests

* refactor: deduplicate model fetching across ROUTER and MODEL modes

* refactor: Clean up models logic

* chore: Add `.env.example` file

* refactor: replace client-side CORS proxy probe with server status flag

* refactor: Post-review fixes

* test: add vitest client setup with API fetch mocks

3 months agoui: Centralize monospace font styles in app.css (#23272)
Aleksander Grygier [Mon, 18 May 2026 13:10:14 +0000 (15:10 +0200)]
ui: Centralize monospace font styles in app.css (#23272)

3 months agowebui: fix Tailwind v4 utility classes missing when built via cmake (#23253)
Martin Andersson [Mon, 18 May 2026 12:08:02 +0000 (14:08 +0200)]
webui: fix Tailwind v4 utility classes missing when built via cmake (#23253)

3 months agollama: initialize pre-norm embedding mask flag (#23256)
Andrei [Mon, 18 May 2026 11:20:49 +0000 (04:20 -0700)]
llama: initialize pre-norm embedding mask flag (#23256)

3 months agoadd myself to conversion (#23261)
Sigbjørn Skjæret [Mon, 18 May 2026 10:42:56 +0000 (12:42 +0200)]
add myself to conversion (#23261)

3 months agoci : added kleidiai-server to server-self-hosted workflow (#22435)
Martin Klacer [Mon, 18 May 2026 09:14:57 +0000 (10:14 +0100)]
ci : added kleidiai-server to server-self-hosted workflow (#22435)

* kleidiai: added kleidiai-server to server-self-hosted workflow

 * Added KleidiAI-enabled Arm64 Linux llama-server CI/integration test
   workflow into the server-self-hosted.yml configuration file

Signed-off-by: Martin Klacer <redacted>
Change-Id: I032e33c525b7e26bc5d53719f638bee610cec1ee

* Added self-hosted executor for KleidiAI server workflow

Signed-off-by: Martin Klacer <redacted>
* Update .github/workflows/server-self-hosted.yml

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

Signed-off-by: Martin Klacer <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agoscripts : allow wc2wt with an existing branch (#23189)
Georgi Gerganov [Mon, 18 May 2026 05:57:28 +0000 (08:57 +0300)]
scripts : allow wc2wt with an existing branch (#23189)

3 months agosycl: scalar SWAR byte-subtract in Q6_K MMVQ dot product (#22156)
Intel AI Get-to Market Customer Success and Solutions [Mon, 18 May 2026 05:12:21 +0000 (22:12 -0700)]
sycl: scalar SWAR byte-subtract in Q6_K MMVQ dot product (#22156)

Signed-off-by: Chun Tao <redacted>
Co-authored-by: Chun Tao <redacted>
3 months agosycl: route small f32 matmuls to oneMKL, bypass oneDNN (#22150)
Intel AI Get-to Market Customer Success and Solutions [Mon, 18 May 2026 05:11:51 +0000 (22:11 -0700)]
sycl: route small f32 matmuls to oneMKL, bypass oneDNN (#22150)

Signed-off-by: Chun Tao <redacted>
Co-authored-by: Chun Tao <redacted>
3 months agosycl : fix error when use -mg 1 error (#23140)
Neo Zhang [Mon, 18 May 2026 05:11:19 +0000 (13:11 +0800)]
sycl : fix error when use -mg 1 error (#23140)

3 months agoupdate bid to match each layers MTP source (#23237)
Incarnas [Mon, 18 May 2026 04:37:12 +0000 (21:37 -0700)]
update bid to match each layers MTP source (#23237)

* update bid to match each layers MTP source

* Update conversion/qwen.py

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

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agocmake : do not check for bin install dir (#23234)
Sigbjørn Skjæret [Mon, 18 May 2026 00:33:14 +0000 (02:33 +0200)]
cmake : do not check for bin install dir (#23234)

3 months agofeat: Support d_conv=15 for ssm-conv.cu (#23017)
Gabe Goodhart [Sun, 17 May 2026 21:05:11 +0000 (15:05 -0600)]
feat: Support d_conv=15 for ssm-conv.cu (#23017)

Branch: ModalityConditionalAdapters
AI-usage: none
Signed-off-by: Gabe Goodhart <redacted>
3 months agocmake : fix LLAMA_BUILD_UI logic (#23190)
Aldehir Rojas [Sun, 17 May 2026 18:42:26 +0000 (14:42 -0400)]
cmake : fix LLAMA_BUILD_UI logic (#23190)

3 months agocmake : do not install conversion script (#23204)
Sigbjørn Skjæret [Sun, 17 May 2026 16:07:21 +0000 (18:07 +0200)]
cmake : do not install conversion script (#23204)

3 months agoCUDA: Continue directly including cuda/iterator (#23102)
Oliver Simons [Sun, 17 May 2026 16:00:10 +0000 (18:00 +0200)]
CUDA: Continue directly including cuda/iterator (#23102)

Cont of #22936, forgot to update one site

3 months agollama: avoid copying logits during prompt decode in MTP (#23198)
Aman Gupta [Sun, 17 May 2026 15:30:25 +0000 (23:30 +0800)]
llama: avoid copying logits during prompt decode in MTP (#23198)

* llama: avoid copying logits during prompt decode in MTP

* review: update comment

* llama-graph: call set_output for t_h_pre_norm

3 months agocommon : delegate assistant continuation to underlying template handlers (#23089)
Aldehir Rojas [Sun, 17 May 2026 11:36:05 +0000 (07:36 -0400)]
common : delegate assistant continuation to underlying template handlers (#23089)

* common : delegate assistant continuation to template handler

* server : implement echo parameter to exclude assistant prefill in the response

* server : fix tests for prefill

* server : use existing llama template

* cont : clean up

3 months agoggml-vulkan/CMakeLists: add a check for SPIRV-Headers (#22009)
Jan Ekström [Sun, 17 May 2026 11:12:11 +0000 (14:12 +0300)]
ggml-vulkan/CMakeLists: add a check for SPIRV-Headers (#22009)

* ci/run: set explicit SPIR-V Headers search path for macOS vulkan CI

For whatever reason, the files are under additional sub-path
`vulkan/` under the cmake directory, which does not match either
current LunarG macOS Vulkan SDK structure (`lib/cmake/SPIRV-Headers`),
nor what gets installed when you run the cmake build+install for
SPIRV-Headers itself on at least Linux (`share/cmake/SPIRV-Headers`).

This allows for SPIRV-Headers to be found, as currently the CI
runner's setup does not seem to include the relevant path in
list of search locations.

* ggml-vulkan/CMakeLists: add a check for SPIRV-Headers

This is installed by the project if it is built and installed.
Receiving an error during the configuration step is generally
preferred to receiving an error in the middle of a build.

3 months agovulkan: add cpy bf16 -> f32 pipelines (#22677)
Pascal [Sun, 17 May 2026 09:31:20 +0000 (11:31 +0200)]
vulkan: add cpy bf16 -> f32 pipelines (#22677)

3 months agovulkan: Support unaligned tensors for ROPE (#22637)
Jeff Bolz [Sun, 17 May 2026 09:30:16 +0000 (04:30 -0500)]
vulkan: Support unaligned tensors for ROPE (#22637)

3 months agocommon : enable streaming JSON argument values (#23173)
Aldehir Rojas [Sun, 17 May 2026 08:44:34 +0000 (04:44 -0400)]
common : enable streaming JSON argument values (#23173)

* common : remove atomic from json arguments

* common : remove parsing logic on JSON arguments

3 months agovulkan: fuse SSM_CONV + BIAS + SILU (#22653)
Jeff Bolz [Sun, 17 May 2026 08:25:50 +0000 (03:25 -0500)]
vulkan: fuse SSM_CONV + BIAS + SILU (#22653)

3 months agoserver : honor --embd-normalize CLI arg (#23125)
Rares Vernica [Sun, 17 May 2026 06:39:04 +0000 (23:39 -0700)]
server : honor --embd-normalize CLI arg (#23125)

The --embd-normalize flag was registered only for the embedding and debug
examples, so llama-server rejected it and the /embedding handler used a
hard-coded default of 2 (L2). Add LLAMA_EXAMPLE_SERVER to the flag's
example set and read params.embd_normalize as the handler's default. The
per-request "embd_normalize" body field continues to override.

3 months agongram : reduce noisy logs (#23185)
ddh0 [Sun, 17 May 2026 06:38:17 +0000 (01:38 -0500)]
ngram : reduce noisy logs (#23185)

* ngram : reduce noisy logs

* ngram : reduce noisy logs

3 months agowebui: support video files as input (#22830)
Judd [Sun, 17 May 2026 00:13:44 +0000 (08:13 +0800)]
webui: support video files as input (#22830)

3 months agoserver: (router) alloc tmp buffer on heap (#23159)
Xuan-Son Nguyen [Sat, 16 May 2026 21:42:16 +0000 (23:42 +0200)]
server: (router) alloc tmp buffer on heap (#23159)

3 months agoserver: skip device enumeration in router mode to avoid creating CUDA primary context...
Pascal [Sat, 16 May 2026 19:21:06 +0000 (21:21 +0200)]
server: skip device enumeration in router mode to avoid creating CUDA primary context (#23137)

3 months agovulkan: removed duplicate #include <memory> in headers (#23144)
Winston Ma [Sat, 16 May 2026 17:57:35 +0000 (01:57 +0800)]
vulkan: removed duplicate #include <memory> in headers (#23144)

3 months agoui: Add request timeout for MCP tool calls (#23138)
Aleksander Grygier [Sat, 16 May 2026 13:20:27 +0000 (15:20 +0200)]
ui: Add request timeout for MCP tool calls (#23138)

* feat: Add request timeout for MCP tool calls in llama-ui

* feat: MCP Settings tab with max timeout setting

3 months agosync : ggml
Georgi Gerganov [Sat, 16 May 2026 12:59:45 +0000 (15:59 +0300)]
sync : ggml

3 months agoggml : bump version to 0.12.0 (ggml/1494)
Georgi Gerganov [Sat, 16 May 2026 12:59:09 +0000 (15:59 +0300)]
ggml : bump version to 0.12.0 (ggml/1494)