]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 months agovendor : update cpp-httplib to 0.49.0 (#25218)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Fri, 3 Jul 2026 08:26:54 +0000 (05:26 -0300)]
vendor : update cpp-httplib to 0.49.0 (#25218)

2 months agollama : add llama_model_ftype_name() (#25134)
Adrien Gallouët [Thu, 2 Jul 2026 15:26:47 +0000 (17:26 +0200)]
llama : add llama_model_ftype_name() (#25134)

* llama : add llama_model_ftype_name()

Expose the model file type (quantization) name, e.g. "Q8_0" or
"Q4_K - Medium", through a new public C API. The returned pointer is
valid for the lifetime of the model and nullptr when the model is
invalid or the file type is unknown.

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

Signed-off-by: Adrien Gallouët <redacted>
* s/llama_model_ftype_name/llama_ftype_name/

Signed-off-by: Adrien Gallouët <redacted>
* Move "(guessed)" to the front in llama_ftype_name

Prepend the "(guessed)" label instead of appending it. This allows removing
the non-thread-safe static std::string, making the function allocation-free.

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

Signed-off-by: Adrien Gallouët <redacted>
* Dont check for model

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

Signed-off-by: Adrien Gallouët <redacted>
2 months agoopencl: allow loading precompiled binary kernels from library (#23042)
lhez [Wed, 1 Jul 2026 17:29:22 +0000 (10:29 -0700)]
opencl: allow loading precompiled binary kernels from library (#23042)

* opencl: allow loading binary kernel

* opencl: add libdl.h

* ggml-backend-dl is in ggml, which depends backend libs, thus
  ggml-opencl cannot depend on ggml-backend-dl
* add libdl.h to break cyclic dep

* opencl: allow loading bin kernel lib

* opencl: load `gemm_moe_mxfp4_f32_ns` from kernel lib if available

* opencl: load q8_0 gemm from kernel lib

* opencl: load q4_0 moe gemm from kernel lib

* opencl: load q4_1 moe gemm from kernel lib

* opencl: load q4_k moe gemm from kernel lib

* opencl: always declare `get_adreno_bin_kernel_func_t`

* opencl: rephrase message

* opencl: fix for rebase

* opencl: update doc

2 months agocommon : use hf primary split as model path (#25194)
Adrien Gallouët [Wed, 1 Jul 2026 16:33:00 +0000 (18:33 +0200)]
common : use hf primary split as model path (#25194)

Fixes #25181

2 months agohexagon: flash attention rework (optimizations, accuracy improvements, etc) (#25085)
Max Krasnyansky [Wed, 1 Jul 2026 13:59:19 +0000 (06:59 -0700)]
hexagon: flash attention rework (optimizations, accuracy improvements, etc) (#25085)

* hex-mm: fold mm quant tasks into the main matmul threads

* hex-mm: minor formatting fixes

* hex-mm: cleanup is_quant checks in dma dispatch

* hex-mm: fix dst-spad alignment

* hex-mm: move fp kernels in the hvx-mm-kernels header

* hex-mm: fuse with ADD

* hex-fa: factor out ukernels into separate headers and unify the rest

* hex-fa: move kernel-params compute into the host

* hex-fa: refactor vtcm alloc for consistency

* hex-fa: add support for FA_SELECT

* hex-fa: update tracing insrumentation to cover all functions

* hex-fa: update hvx fallback thresholds to recover t/g regressions

* hex-fa: update tracing instrumentation

* hex-fa: improved tracing with additional events

* hex-fa: optimize mask processing (fastdiv, etc)

* hex-fa: improve mask dma caching

* hmx-fa: change loop order to maximize mask cache hits

* hex-fa: remove over instrumentation

* hex-fa: breakdown QKV prep trace events

* hmx-fa: further mask proc optimizations

* hex-fa: mask broadcast is the common case, optimize for that

* hex-fa: use aligned loads where possible

* hex-fa: update loops to use uint32_t indices

* hmx-fa: fold vtcm init into q prep task

* hex-fa: update rest of the hmx funcs to use uint32_t

* hmx-fa: fold build_d into the main softmax loop

* hmx-fa: start kv dmas earlier

* hmx-fa: start mask dma a bit earlier

* hex-fa: precompute rows per task to avoid divs

* hmx-fa: specialize fa_o_store for f16 and f32

* hmx-fa: prelim support for Sinks

* hmx-fa: keep softmax accumulators in fp32

* hex-fa: add tanh_f16 and exp2_f16 and use that in FA

* hex-fa: use fp16 math in the hvx kernel

* hex-fa: avoid expensive float -> __fp16 cast for slopes and softcap

* hex-fa: replace most vec_exp_f32 with vec_exp2_f16

* hmx-fa: vectorize sinks update

* hex-fa: minor formatting

* hmx-fa: fold softcap loop into the tile load

* hmx-fa: use vectoralias to populate sinks

* hex-fa: remove redudant check

* hex-fa: fix vtcm size compute to use fp32 for accumulators

* hex-mm: fix trailing spaces

* hmx-fa: dont use -inf to init mask to avoid conversion overflows

* hex-fa: no need to explicitly guard -inf in the f16->f32 converter now

* hmx-fa: cleanup fa sinks handling

* hex-mm: fixed src2 stride handling when mm is fused with add

* hex-fa: make lto happy

2 months agoCUDA: consistent use of __restrict__ + PDL for FA (#25185)
Johannes Gäßler [Wed, 1 Jul 2026 08:55:14 +0000 (10:55 +0200)]
CUDA: consistent use of __restrict__ + PDL for FA (#25185)

2 months agoggml-cpu: add AVX2 optimization for nvfp4 dot product and use UE4M3 LUT (#23961)
ragz4125 [Wed, 1 Jul 2026 07:31:20 +0000 (13:01 +0530)]
ggml-cpu: add AVX2 optimization for nvfp4 dot product and use UE4M3 LUT (#23961)

2 months agoui Prevent tool messages from incorrectly appending to other conversations (#25177)
Aleksander Grygier [Wed, 1 Jul 2026 07:25:18 +0000 (09:25 +0200)]
ui Prevent tool messages from incorrectly appending to other conversations (#25177)

* fix: Prevent tool messages from incorrectly appending to other conversations

* ui: prevent agentic loop from poisoning another conv's currNode

* ui: make editedContent a  so background recompute does not wipe in-progress edits

---------

Co-authored-by: Pascal <redacted>
2 months agoui: Remove PWA navigate fallback to prevent caching API endpoint requests (#25174)
Aleksander Grygier [Wed, 1 Jul 2026 05:32:55 +0000 (07:32 +0200)]
ui: Remove PWA navigate fallback to prevent caching API endpoint requests (#25174)

2 months agoopencl: initial q1_0 support (#25160)
lhez [Wed, 1 Jul 2026 04:43:20 +0000 (21:43 -0700)]
opencl: initial q1_0 support (#25160)

* opencl: general q1_0 support

* opencl: add Adreno GEMM/GEMV for q1_0

2 months agocuda : prevent integer truncation and overflow errors when using KQ mask strides...
fairydreaming [Tue, 30 Jun 2026 18:47:05 +0000 (20:47 +0200)]
cuda : prevent integer truncation and overflow errors when using KQ mask strides in flash_attn_mask_to_KV_max kernel (#24945)

Co-authored-by: Stanisław Szymczyk <redacted>
2 months agomodel : register t_layer_inp for qwen3next (#25141)
Jürgen Schmied [Tue, 30 Jun 2026 15:57:14 +0000 (17:57 +0200)]
model : register t_layer_inp for qwen3next (#25141)

* Fix input assignment in layer processing loop

Fix DFLASH for qwen-coder-next

* add line break

Added tensor for attention normalization in Qwen3 model.

2 months agocommon,server: handle bracketed IPv6 literals in URL authority (#25140)
Pascal [Tue, 30 Jun 2026 14:16:44 +0000 (16:16 +0200)]
common,server: handle bracketed IPv6 literals in URL authority (#25140)

* common,server: handle bracketed IPv6 literals in URL authority

Parse the [host]:port form (RFC 3986) and bracket IPv6 hosts when
formatting a URL authority: listening log, proxy Host header, proxy
log, client rebuild. The per-request remote_addr stays bare.

* common: restore unsupported scheme throw in url parser

Address @ngxson review: keep the explicit reject in port resolution so
the block stays self-contained. Non-http(s) schemes still throw (also
gated at the top of common_http_parse_url).

2 months agoCUDA: fix get_rows_back for tables with more than 65535 rows (grid-y clamp + stride...
Matt Jallo [Tue, 30 Jun 2026 12:16:24 +0000 (05:16 -0700)]
CUDA: fix get_rows_back for tables with more than 65535 rows (grid-y clamp + stride) (#25103)

2 months agoCUDA: fix Gemma E4B MTP FlashAttention (#25148)
Johannes Gäßler [Tue, 30 Jun 2026 12:06:54 +0000 (14:06 +0200)]
CUDA: fix Gemma E4B MTP FlashAttention (#25148)

* CUDA: fix Gemma E4B MTP FlashAttention

* remove unused template declaration

2 months agovulkan: roll bk loop in matmul for asahi linux (#24663)
Kevin Liu [Tue, 30 Jun 2026 10:27:38 +0000 (06:27 -0400)]
vulkan: roll bk loop in matmul for asahi linux (#24663)

* vulkan: roll bk loop in matmul for asahi linux

* vulkan: fix inline comment

* vulkan: revert BK-loop unroll change

* vulkan: edit spirv directly for asahi roll bk loop

* vulkan: remove trailing whitespace at the end of comments

2 months agoHIP: use hipBLAS for dense prefill on gfx900, keep MMQ for MoE (#24588)
zduford [Tue, 30 Jun 2026 09:51:38 +0000 (05:51 -0400)]
HIP: use hipBLAS for dense prefill on gfx900, keep MMQ for MoE (#24588)

* HIP: keep MMQ for gfx900 MoE and Q8_0, use hipBLAS for dense K-quants

Assisted-by: GitHub Copilot CLI
* HIP: tighten conditional block to be explicitly for gfx900

* HIP: Further simplified gfx900 conditional block

* removed unnecessary comment

2 months agoggml-webgpu: add support for NVFP4 (#25143)
Masashi Yoshimura [Tue, 30 Jun 2026 08:20:04 +0000 (17:20 +0900)]
ggml-webgpu: add support for NVFP4 (#25143)

2 months agoRevert "sched : reintroduce less synchronizations during split compute (#20793)"...
Oliver Simons [Tue, 30 Jun 2026 00:41:45 +0000 (02:41 +0200)]
Revert "sched : reintroduce less synchronizations during split compute (#20793)" (#25138)

2 months agocommon : dedup preset and cached model entries in /v1/models (#25131)
Adrien Gallouët [Mon, 29 Jun 2026 15:37:23 +0000 (17:37 +0200)]
common : dedup preset and cached model entries in /v1/models (#25131)

Signed-off-by: Adrien Gallouët <redacted>
2 months agovulkan: use flops instead of weight tensor size for submission heuristic (#25005)
Ruben Ortlam [Mon, 29 Jun 2026 13:24:44 +0000 (15:24 +0200)]
vulkan: use flops instead of weight tensor size for submission heuristic (#25005)

* vulkan: extract flops calculation into function

* use flops instead of matmul src0 tensor size for submission threshold

* use unsigned ints

2 months agoDeepSeek V4 (#24162)
Aman Gupta [Mon, 29 Jun 2026 08:58:51 +0000 (16:58 +0800)]
DeepSeek V4  (#24162)

* convert: add dsv4 conversion

* add basic setup

* add llm_graph_input_dsv4

* add save-load state

* add sinkhorn eps - correction by @fairydreaming

* add rope fix

* cleanup dead code

* fix bugs

* support pro model: added by @fairydreaming

* remove redundant V cache

* Chat template

* remove debugging leftovers

* Add mechanism for inlining templates based on architecture

* s/deepseek-v4-flash/deepseek4/g

* s/deepseek-v4-flash/deepseek4/g continued

* enable graph reuse

* enable FA

* fix test llama archs

* rename

* compatibility with antirez ds4 GGUFs

* simplified set_gguf_parameters() by calling super class method, replaced moe.score_func with expert_gating_func.

* reserve worst-case kv-cache

* revert max split inputs

* address review comments

* add padding to enable FA

* pad only the final value of plan.n_kv to 256

* remove built-in cpp chat template

* cont: remove cpp built-in template

* rm outdated test

* replace ggml_view_3d() with ggml_reshape_3d()

Co-authored-by: Georgi Gerganov <redacted>
* only support n_seq=1 for now

* remove unused var

* cont: remove unused var

* use scale bias

* use correct ptr for can_reuse

* remove gen-chat-inline-templates.py

* simplify graph reuse

* cont: cleanup

* remove unused inputs

* enable partial checkpointing

* add correct shape for kq_mask + set llama_model_n_swa to 0 for dsv4

* precompute source_idx + add comment about dummy write

* support multi-seq

* remove restored_trim_pos

* use split_equal when possible

* fix indent

* address review comments

* use LLM_KV

* fix ci

---------

Co-authored-by: Piotr Wilkin <redacted>
Co-authored-by: Stanisław Szymczyk <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: fairydreaming <redacted>
Co-authored-by: Georgi Gerganov <redacted>
2 months agotools/ui: restore Tailwind scanning in ignored worktrees (#24879)
seryogakovalyov [Mon, 29 Jun 2026 08:55:52 +0000 (11:55 +0300)]
tools/ui: restore Tailwind scanning in ignored worktrees (#24879)

2 months agocommon : remove unused regex-partial (#25118)
o7si [Mon, 29 Jun 2026 06:48:39 +0000 (14:48 +0800)]
common : remove unused regex-partial (#25118)

2 months agojinja, chat: add --reasoning-preserve flag (#25105)
Xuan-Son Nguyen [Sun, 28 Jun 2026 21:33:51 +0000 (23:33 +0200)]
jinja, chat: add --reasoning-preserve flag (#25105)

* jinja, chat: add --reasoning-preserve flag

* correct help message

2 months agoRevert "ui: fix accessibility for hover-gated interactive elements assisted by claude...
Aleksander Grygier [Sun, 28 Jun 2026 19:30:03 +0000 (21:30 +0200)]
Revert "ui: fix accessibility for hover-gated interactive elements assisted by claude(in debugging and tests) (#24727)" (#25098)

2 months agoui: fix stop and reasoning skip in single-model mode (#25084)
Pascal [Sun, 28 Jun 2026 19:06:43 +0000 (21:06 +0200)]
ui: fix stop and reasoning skip in single-model mode (#25084)

2 months agodflash: refactor draft model conversion (#25110)
Ruixiang Wang [Sun, 28 Jun 2026 18:31:48 +0000 (20:31 +0200)]
dflash: refactor draft model conversion (#25110)

* dflash: refactor draft model conversion

* apply fix for eagle3 convert

2 months agochat : implement minicpm5 parser (#24889)
Aldehir Rojas [Sun, 28 Jun 2026 14:53:32 +0000 (09:53 -0500)]
chat : implement minicpm5 parser (#24889)

* Add minicpm5 tool call parser

* Refactor MiniCPM5 PEG parser per review feedback

* Fix jinja min/max API to match Jinja2

* modify by review

* MiniCPM5: use autoparser for XML tool calls and fix grammar preserved-token triggers

* MiniCPM5: fix streaming tool-arg placeholder and remove alt XML markers

* skip min/max attribute tests in -py mode

* test-jinja: use real expected output for min/max attribute tests

* MiniCPM5: revert shared mapper and history fallbacks per review

Drop streaming tool-arg placeholder workarounds from the generic PEG
mapper and restore strict tool-call argument JSON parsing so MiniCPM5
support stays limited to autoparser/diff-analyzer changes.

* chat : refactor minicpm5 back to dedicated parser

* cont : simplify grammar

* cont : refactor

* cont : fixes

* cont : rename template to openbmb-MiniCPM5-1B.jinja

* cont : add message delimiters

* cont : fix tests

---------

Co-authored-by: zhangtao <redacted>
Co-authored-by: 张涛 <>
2 months agojinja: add --dump-prog for debugging (#25086)
Xuan-Son Nguyen [Sun, 28 Jun 2026 13:50:31 +0000 (15:50 +0200)]
jinja: add --dump-prog for debugging (#25086)

* jinja: add --dump-prog for debugging

* Update common/jinja/runtime.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agospec : add DFlash support (#22105)
Ruixiang Wang [Sun, 28 Jun 2026 13:01:34 +0000 (15:01 +0200)]
spec : add DFlash support (#22105)

* spec: add DFlash v2 support

* dflash: support sliding window attention per layer_types

* docs: add dflash section

---------

Co-authored-by: Kashif Rasul <redacted>
2 months agocommon : allow --offline in llama download (#25091)
Adrien Gallouët [Sun, 28 Jun 2026 10:34:11 +0000 (12:34 +0200)]
common : allow --offline in llama download (#25091)

Expose the existing --offline flag to `llama download` so a script can
run it to check whether a model is already cached and ready to be served
without touching the network.

Also fix a latent use-after-free in the URL-task on_done callback:
first_path is block-scoped and was captured by reference, but invoked
after the block ends.

Signed-off-by: Adrien Gallouët <redacted>
2 months agologs : reduce v2 (#25078)
Georgi Gerganov [Sun, 28 Jun 2026 05:52:15 +0000 (08:52 +0300)]
logs : reduce v2 (#25078)

* server : reduce logs

* cont : common

* cont : spec

* cont : CMN_ -> COM_

2 months agoopencl: flash attention improvement (#25069)
Hongqiang Wang [Sat, 27 Jun 2026 22:36:06 +0000 (15:36 -0700)]
opencl: flash attention improvement (#25069)

* opencl: rework FA kernel for f16 and f32

* opencl: flash-attention prefill prepass kernels

- flash_attn_kv_pad_f16    pads the tail KV tile to a BLOCK_N multiple
- flash_attn_mask_pad_f16  pads the matching mask tile
- flash_attn_blk_f16       classifies each KV tile per query block as
                           fully masked / mixed / fully unmasked, so
                           the main kernel can skip fully-masked tiles
                           and the mask lookup for fully-unmasked ones

* opencl: FA kernels for q4_0 and q8_0

* opencl: `set_rows` for f32 to q8_0/q4_0

* opencl: dequant kernels for q4_0 and q8_0

* opencl: add FA tile tuning table with override

* opencl: wire host side for FA

* opencl: q4_0 MoE tensors are also SOA'ed

* opencl: cosmetic fix

* opencl: refactor, also clarify some code paths in comments

* opencl: fix inifity for `-cl-finite-math-only`

---------

Co-authored-by: Li He <redacted>
2 months ago[CUDA] Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy (#25057)
Gaurav Garg [Sat, 27 Jun 2026 12:16:21 +0000 (17:46 +0530)]
[CUDA] Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy (#25057)

* [CUDA] Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy

Add a CUDA ggml_cpy fast path for same-type, same-shape strided copies that are just 2D pitched block copies.
When tensors are not fully contiguous but each row is contiguous, it now uses cudaMemcpy2DAsync instead of the slow element-wise scalar copy kernel.

This fixes the GDN recurrent snapshot update with -np 4, where rollback slots are separated by cache stride gaps.

* Add new tests that execute the new optimized strided copy path

* Return unsupported for strided copy in OpenVINO, as new tests are failing

2 months agosycl : fix failed ut cases of norm (#25044)
Neo Zhang [Sat, 27 Jun 2026 09:13:43 +0000 (17:13 +0800)]
sycl : fix failed ut cases of norm (#25044)

2 months agovulkan: fix step operator for 0 input (#25036)
Ruben Ortlam [Sat, 27 Jun 2026 08:57:31 +0000 (10:57 +0200)]
vulkan: fix step operator for 0 input (#25036)

2 months agobinaries : Improve rpc-server and export-graph-ops names. (#25045)
Christian Kastner [Sat, 27 Jun 2026 07:31:29 +0000 (09:31 +0200)]
binaries : Improve rpc-server and export-graph-ops names. (#25045)

Tests are generally prefixed with -test, so rename export-graph-ops
accordingly.

rpc-server is probably too generic a name for /usr/bin. Because it
should work with any ggml application, it is renamed to ggml-rpc-server.

2 months agoci : add windows-openvino to check-release (#25022)
Sigbjørn Skjæret [Sat, 27 Jun 2026 07:30:56 +0000 (09:30 +0200)]
ci : add windows-openvino to check-release (#25022)

2 months agotests : fix test-chat-template --no-common option (#25075)
Sigbjørn Skjæret [Sat, 27 Jun 2026 07:30:19 +0000 (09:30 +0200)]
tests : fix test-chat-template --no-common option (#25075)

2 months agoapp : allow --version, --licenses & --help (#25054)
Adrien Gallouët [Fri, 26 Jun 2026 21:18:11 +0000 (23:18 +0200)]
app : allow --version, --licenses & --help (#25054)

Signed-off-by: Adrien Gallouët <redacted>
2 months agosched : reintroduce less synchronizations during split compute (#20793)
Andreas Kieslinger [Fri, 26 Jun 2026 14:18:30 +0000 (16:18 +0200)]
sched : reintroduce less synchronizations during split compute (#20793)

* CUDA:  Improve performance via less synchronizations between token (#17795)

* Adds CPU-to-CUDA copy capability to
ggml_backend_cuda_cpy_tensor_async()

* Adds function to relax sync requirements between input copies on
supported backends (CUDA for now)

* Exchanges synchronous copy with async copy function.

* Adds macro guards to allow compilation in non-CUDA builds

* Reworked backend detection in ggml-backend.cpp to avoid linking
conflicts

* Relax requirement of checks in async CUDA copies from backend and buffer type to just buffer type, to avoid linking issues

* Minor cleanup

* Makes opt-in to relax use of explicit syncs more general. Backends like
vulkan which require a synchronization between HtoD copies and graph
execution could also adopt this change now.

* Reintroduces stricter check for CPU->CUDA backend async copy via
GGML_DEVICE_TYPE_CPU.

* Corrects initialization of ggml_backend_sync_mode in
ggml_backend_sched_split initialization

* Simplifies synchronizations to adhere to `saaasg` pattern.

* Apply suggestion from @ggerganov (src->buffer to buf_src)

Co-authored-by: Georgi Gerganov <redacted>
* Apply suggestion from @ggerganov (src->buffer to buf_src) v2

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

Co-authored-by: Georgi Gerganov <redacted>
* Apply suggestions from @johannesgaessler code review

Co-authored-by: Johannes Gäßler <redacted>
* Adds single-GPU synchronizations to multi-GPU settings to fix hip backend pipeline parallel bugs.

* Scheduler Hardening: Exclude hip/MUSA from copy_from_host CPU split ->
GPU split optimization

* Scheduler Hardening: Re-adding original additional synchronizations for
non-async backends

* Adds disclaimer to hip/musa exclusion of copy_from_host. Highlights that it is out of
precaution, but that no perf-impact is visible, and that it can be
revisited separately anytime.

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Johannes Gäßler <redacted>
2 months agodevops : add llama in all docker images (#25035)
Adrien Gallouët [Fri, 26 Jun 2026 13:15:48 +0000 (15:15 +0200)]
devops : add llama in all docker images (#25035)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoarg: fix handling --spec-draft-hf and --hf-repo-v (#25043)
Xuan-Son Nguyen [Fri, 26 Jun 2026 12:36:03 +0000 (14:36 +0200)]
arg: fix handling --spec-draft-hf and --hf-repo-v (#25043)

* arg: fix handling --spec-draft-hf and --hf-repo-v

* fix missing mparams.hf_file

2 months agoopenvino: Update to OV 2026.2.1, self-contained release packages, operator improvemen...
Ravi Panchumarthy [Fri, 26 Jun 2026 12:07:19 +0000 (05:07 -0700)]
openvino: Update to OV 2026.2.1, self-contained release packages, operator improvements (#24974)

* Update to OV 2026.2.1, Make OV release packages self-contained

* Update to OV 2026.2.1, Make OV release packages self-contained

* OpenVINO Backend: Remove compute_op_type hardcoded sets (#222)

* OpenVINO Backend: Remove compute_op_type hardcoded sets

* revert get_op_type removal

* OpenVINO backend: enable softmax with sink input

* OpenVINO backend: opt mul_mat_id convert process for large size

* OpenVINO backend: Modify add_id to support 2D/4D

* OpenVINO Backend: Add glu_swiglu_oai

* PR review: fix paths

* PR review: fix path consistency

---------

Co-authored-by: Mostafa <redacted>
Co-authored-by: Xuejun <redacted>
2 months agosync : ggml
Georgi Gerganov [Fri, 26 Jun 2026 12:04:05 +0000 (15:04 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.3 (ggml/1550)
Georgi Gerganov [Fri, 26 Jun 2026 11:37:43 +0000 (14:37 +0300)]
ggml : bump version to 0.15.3 (ggml/1550)

2 months agovulkan: opt mul_mat_vecq for mi50 (#22933)
nullname [Fri, 26 Jun 2026 11:49:24 +0000 (19:49 +0800)]
vulkan: opt mul_mat_vecq for mi50 (#22933)

2 months agovulkan: add INTEL_XE1 arch enum and enable coopmat1 on Intel Xe-LPG Plus (#24404)
Jiang, Fish [Fri, 26 Jun 2026 11:26:22 +0000 (11:26 +0000)]
vulkan: add INTEL_XE1 arch enum and enable coopmat1 on Intel Xe-LPG Plus (#24404)

* vulkan: add INTEL_PRE_XE2 arch enum and enable coopmat1 on Intel Xe-LPG Plus (1/3, Xe1-ARLH)

Co-authored-by: Xia, Jie <redacted>
Co-authored-by: Liu, Russell <redacted>
* Address comments of bf16 and trailing whitespace

* Rename INTEL_PRE_XE2 to INTEL_XE1 and remove driver workaround

* Add Windows driver check

---------

Co-authored-by: Xia, Jie <redacted>
Co-authored-by: Liu, Russell <redacted>
2 months agoui: fix accessibility for hover-gated interactive elements assisted by claude(in...
Sanjay Ahari [Fri, 26 Jun 2026 10:55:38 +0000 (16:25 +0530)]
ui: fix accessibility for hover-gated interactive elements assisted by claude(in debugging and tests) (#24727)

2 months agovulkan: Workaround compiler bug in conv2d coopmat2 path (#24924)
Jeff Bolz [Fri, 26 Jun 2026 09:53:32 +0000 (04:53 -0500)]
vulkan: Workaround compiler bug in conv2d coopmat2 path (#24924)

* vulkan: Workaround compiler bug in conv2d coopmat2 path

* apply same workaround to CONV_3D

* Apply suggestion from @jeffbolznv

2 months agoCUDA: add cublasSgemmBatched mapping for HIP/MUSA vendor headers (#25033)
leonardHONG [Fri, 26 Jun 2026 09:42:56 +0000 (17:42 +0800)]
CUDA: add cublasSgemmBatched mapping for HIP/MUSA vendor headers (#25033)

2 months agoggml-cpu: fix SVE leftover path in ggml_vec_dot_f32 (#24699)
Tarek Dakhran [Fri, 26 Jun 2026 07:41:56 +0000 (09:41 +0200)]
ggml-cpu: fix SVE leftover path in ggml_vec_dot_f32 (#24699)

* ggml-cpu: fix SVE leftover path in ggml_vec_dot_f32

2D convolutions with kernel size 9 produced different results on SVE
enabled ARM devices. After debugging it turned out that ggml_vec_dot_f32
was using data from inactive lanes.

Use svmla_f32_m(pg, sum1, ax1, ay1) so inactive lanes retain sum1.

* cont : clean-up

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoserver + ui: SSE Replay Buffer (#23226)
Pascal [Fri, 26 Jun 2026 07:31:29 +0000 (09:31 +0200)]
server + ui: SSE Replay Buffer (#23226)

* server: SSE replay buffer, survives client disconnect

Opt in on POST /v1/chat/completions when the client sends
X-Stream-Resume: 1 and a non empty X-Conversation-Id. The conv id is
the session identity end to end, no extra opaque token. The drain
runs detached server side and buffers SSE bytes, the generation
survives HTTP disconnect, F5, or lets users switch from iOS Safari
to another app without losing the actively generated response.

Routes:
  GET    /v1/stream/<conv_id>?from=N       replay
  GET    /v1/streams[?conversation_id=X]   list, drives sidebar spinners
  DELETE /v1/stream/<conv_id>              Stop, idempotent

Router parent fans out to children for list and delete, probes on GET
to route to the owner, fans out DELETE on POST so "one session per
conv" holds across model swaps.

WebUI: the layout snapshots /v1/streams at mount and on
visibilitychange, the sidebar reflects live inferences across all
convs. The chat page reattaches on mount, append vs fresh is detected
from existing content so continue mid stream keeps its prefix.

update_slots: on llama_memory_seq_rm refusal at a deep position, full
clear of the seq and reprefill from zero instead of GGML_ABORT.

OAI strict path unchanged when the opt in headers are absent.

* server: create stream session only after post_tasks succeeds

* server, ui: drop X-Stream-Resume, X-Conversation-Id alone enables the replay buffer

* server: drop magic 17, derive the X-Conversation-Id header length from sizeof at build time

* refactor: address review feedback from ngxson

* server-context: cleaning

* server-stream: fix use-after-free on rd

Guard stop_producer with a shared alive flag, flipped by on_stream_end
before rd dies. Prevents a late cancel (session eviction by a later
POST on the same conv_id, or a DELETE arriving after the producer
ended) from touching a destroyed rd.

* ui: fix cross-conversation contamination

Scope streaming flags per conv so one finishing does not unflag the
others, guard discoverActiveStream against concurrent runs to avoid
duplicate attaches, and stop racing syncRemoteRunningStreams for the
sidebar set.

* server-http: keep request alive in detached SSE drain

The response next() lambda may reach into *request via &req long
after on_complete reset the request shared_ptr. Capture request in
the detached thread so it outlives the drain.

* ui: address review feedback from coder543

Forward Authorization to /v1/stream and /v1/streams fetches, the resumable routes
must obey --api-key like the rest of the API.

Wrap reader.read() in a try/catch, the underlying connection drop rejects with
TypeError instead of resolving done=true, treat it as a premature end of stream
so the existing resume loop kicks in.

Freeze the model at session start in chatStreamingStates.model and thread it
through cancel and resume, the dropdown selection may have changed since the
POST and the server side identity is fixed at that time.

* format

* ui: remove unused selectedModelName

* server-stream: poll session->is_cancelled() in stream_aware_should_stop

Address review feedback from coder543. The cancel propagation through
rd.stop() relies on the slot eventually processing the cancel task and
posting a result that notifies the recv condvar, remove_waiting_task_ids
does not notify directly. Add a defensive poll on session->is_cancelled()
so the producer-side next() loop exits on its next iteration after
cancel() without waiting for the cancel task to round trip through a slot.

* server-stream, ui: replace GET /v1/streams with POST /v1/streams/lookup

Address review feedback from coder543. Listing live sessions leaks the
conversation_id of every concurrent user, which defeats the random UUID
unguessability. The new route takes {conversation_ids: [...]} in the
body and returns matches only for the ids the caller already owns, so
foreign UUIDs stay private. The router fans out the same POST to every
child and aggregates, the WebUI passes the convs visible in its sidebar.

* ui: read conv ids from IndexedDB in syncRemoteRunningStreams

The conversations store is not hydrated yet at +layout onMount, so the
sidebar spinners stayed off for background convs until the user clicked
on them. Read straight from the DB to dodge the init race.

* server-models: deduplicate stream lookup timeouts behind one constant

* ui: extract visibility kick grace into a stream constant, bump to 1000 ms

* make it safer & more simple

* server-stream: survive client disconnect via stream_pipe::finish_producer

After the RAII rewrite the generation stopped the moment the client
disconnected. httplib bails its content provider on the is_peer_alive
check at the top of write_content_chunked, so returning true from the
provider never keeps it producing: the response resets, rd is destroyed
and its task gets cancelled.

Reinstate the disconnect survival inside the pipe. stream_pipe gains
finish_producer, which pumps the response next() into the ring buffer
until the generation ends, and mark_producer_done for the clean wire
end. server-http only triggers them: mark before sink.done on a clean
close, finish in on_complete when the peer left early. No detach, no
stream logic in server-http beyond the trigger, and the strict OAI path
is untouched when no pipe is attached.

Known limitation: finish_producer pumps synchronously on the http
worker, so a disconnected stream keeps its worker busy until the
generation ends. A follow-up will move the drain off the http worker so
no worker is held.

* server-stream: drain disconnected streams on a manager owned thread

The previous commit pumped the post disconnect drain synchronously in
on_complete, on the http worker, so a disconnected stream kept its
worker busy until the generation ended. Under a wave of reloads or tab
closes that pins workers from the pool.

Move the drain off the http worker. on_complete now hands the response
to stream_session_manager::adopt_orphan, which pumps it to completion on
a manager owned thread and releases the worker at once. One thread per
disconnected stream still generating, stored in a list, joined and
reaped on the next adopt, by the GC, and at shutdown. No detach, the
thread lifecycle is fully owned by the manager. needs_drain gates the
handoff so a cleanly finished stream never spawns a thread, and the
strict OAI path stays untouched when no pipe is attached.

stop_gc now cancels sessions before finalizing them, so an in flight
drain sees is_cancelled and exits instead of blocking the shutdown join
until the generation ends naturally.

* ui: add missing JSDoc

* server-stream: drain on the http worker, drop the manager thread

Address @ngxson review: httplib runs a large dynamic pool and a worker
blocked in next() sits on a condvar instead of burning cpu, so draining
the rest of the generation on that worker is fine and much simpler than
a dedicated thread.

on_complete calls finish_producer directly again. Removes adopt_orphan,
the orphan thread list and its reaping, the stop_gc session cancel that
only existed to unblock those threads, and the now dead drain_shutdown
flag.

* server-stream: split stream_pipe into producer and consumer classes

Address @ngxson review: one class covering both ends was messy. stream_pipe
is now a base holding the session and is_cancelled, with stream_pipe_producer
(write, mark_producer_done, finish_producer, cleanup, finalizes on destruct)
and stream_pipe_consumer (read only, no finalize) deriving from it.

Drops the is_producer_ discriminator and its runtime guards, the type now
encodes the role. res.spipe is retyped to shared_ptr<stream_pipe_producer>
since it is only ever a producer. No behavior change.

* server-stream: rename producer methods to unix pipe semantics

Address @ngxson review: mark_producer_done becomes done(), finish_producer
becomes close(), matching a unix pipe write end. The producer_done_ member
follows as done_. write() is unchanged. No behavior change.

* server, ui: route resumable streams via a conv map, persist resume identity

Address ngxson review: drop the polling probe, proxy_post records a conv_id ->
model map and the stream routes resolve the owning child with one lookup. The
map is the single source of truth, the ::model suffix stays for child session
uniqueness but the router never parses it.

UI: the server keys a session by the POST time identity (conv::model), but reload
probed with the bare conv id and missed model tagged sessions, so F5 stopped the
stream and sidebar spinners stayed off. Persist the model and rebuild the exact
identity on resume, single conv and bulk sidebar both send it.

Add unit coverage for the identity round trip.

* ui: resolve continue target by id to stop cross-conversation flash on switch

* ui: skip stream resume when the abort is intentional

* server: move the conv id to model map into a self contained tracker

Address review from ngxson: server_models held two mutexes side by side, the
global one and a bare conv_model_mu guarding a loose map, which made the locking
hard to follow. Wrap the map and its lock in a small conv_model_tracker struct
that owns its mutex, one mutex per struct. The remember, lookup and forget
methods move inline into the tracker, server_models exposes a single conv_models
member and the routes call models.conv_models.lookup and friends. No behavior
change, the map stays the single source of truth for routing resumable streams
to a child.

* ui: replace stream magic values with enums and shared constants

Address review from allozaur: lift the inline literals around the resumable
stream code into named symbols so the intent is explicit and reusable.

* ui: fold the stream resume and discovery helpers into ChatService

Address review from allozaur: drop the two standalone stream-*.service files.
They were used only by the chat service and store, carried no shared state, and
did not follow the static class pattern the other services use, so a separate
abstraction was not warranted. Move the helpers onto ChatService as static
methods. No behavior change, tests now exercise them through ChatService.

* docs: document the SSE replay buffer in server README-dev

Add the resumable streaming section, list stream_session_manager in the
backend component inventory, and link PR 23226 in the related PRs.

* ui: align attachServerStream call with onCompletionId param in handleStreamResponse

* server-http: rename del_ to del to match get and post

* ui: address review feedback from allozaur

* ui: drop duplicate SSE constants, keep sse.ts canonical

* ui: use svelte:document for the visibilitychange listener

address review from allozaur: replace the manual document.addEventListener
in onMount with a declarative <svelte:document onvisibilitychange>. svelte
handles attach, detach and SSR, so the typeof document guard and the onMount
cleanup go away. onMount keeps only the first load snapshot.

* server: trim redundant stream drain comments

Address review from ngxson

* server: balance and clean up stream comments

remove redundant comments and tighten the verbose ones across the resumable
stream code, keeping the concurrency and lifetime rationale that is not obvious
from the code. also fix two stale comments in server.cpp and server-models.h
that still described the old ::model suffix probe and fan out routing, now
replaced by the conv_id -> model map

Address review from ngxson

* ui: balance and clean up stream comments

dedup repeated rationale (frozen conv::model identity, the lookup privacy note,
the abort patterns) down to one canonical spot, tighten the verbose blocks, and
keep the concurrency and resume-offset reasoning. fix stale comments in
stream-identity.ts and chat.service.ts that still described the old loopback
probe and fan out routing, now the conv_id -> model map.

---------

Co-authored-by: Xuan Son Nguyen <redacted>
2 months agosycl : clamp softmax input to avoid underflow (#24941)
Jassieluo [Fri, 26 Jun 2026 07:02:42 +0000 (15:02 +0800)]
sycl : clamp softmax input to avoid underflow (#24941)

2 months agomtmd: add more validations (#25013)
Xuan-Son Nguyen [Fri, 26 Jun 2026 06:43:29 +0000 (08:43 +0200)]
mtmd: add more validations (#25013)

* mtmd: add more validations

* fix

* refactor a bit

* type check for get_arr_int

2 months agoCUDA: batch out_prod broadcast (dps2>1) path with cublasSgemmBatched (#24426)
leonardHONG [Fri, 26 Jun 2026 05:51:25 +0000 (13:51 +0800)]
CUDA: batch out_prod broadcast (dps2>1) path with cublasSgemmBatched (#24426)

2 months agomamba2: remove hardcoded 2x expansion factor and invalid d_inner % d_state check...
Arsen Arutunan [Fri, 26 Jun 2026 05:50:54 +0000 (08:50 +0300)]
mamba2: remove hardcoded 2x expansion factor and invalid d_inner % d_state check (#23082)

* mamba2: remove hardcoded 2x expansion factor, support any expand value

* mamba2: remove invalid d_inner %% d_state check (unrelated parameters)

* Update convert_hf_to_gguf.py: make expand optional with default 2

Co-authored-by: Sigbjørn Skjæret <redacted>
* mamba2: apply expand fix to refactored conversion/mamba.py

* also check for mamba_expand

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoopencl: flush profiling batch at shutdown for incomplete batches (#25016)
shaofeiqi [Fri, 26 Jun 2026 01:48:24 +0000 (18:48 -0700)]
opencl: flush profiling batch at shutdown for incomplete batches (#25016)

2 months agoxcframework : disable mtmd video on i/tv/visionos (#25018)
Sigbjørn Skjæret [Thu, 25 Jun 2026 22:13:59 +0000 (00:13 +0200)]
xcframework : disable mtmd video on i/tv/visionos (#25018)

2 months agomodel : Add label for LFM2.5-230M (#25008)
Tarek Dakhran [Thu, 25 Jun 2026 16:58:52 +0000 (18:58 +0200)]
model : Add label for LFM2.5-230M (#25008)

2 months agoCUDA: Various fixes to `cpy.cu` (#25000)
Oliver Simons [Thu, 25 Jun 2026 15:29:23 +0000 (17:29 +0200)]
CUDA: Various fixes to `cpy.cu` (#25000)

* Add failing test-case to test-backend-ops

Extracted from https://github.com/ggml-org/llama.cpp/issues/24072

* Minimize repro with help of AI

N = 8 * (65535 - 1) + 1 = 524273

* Port and adjust workaround from https://github.com/LostRuins/koboldcpp/commit/0ba798341e0c70517cb226cb63c966b086a3b5b3

Fall-back should share code, also relax y-z constraint to be inclusive

* Add test-case + fallback also for y dim

* Fix x-guards which is 2^{31}-1, so inlusive of INT_MAX

* Fix overflow problems for transposed copy kernel

2 months agomisc: fix labeler (#25012)
Xuan-Son Nguyen [Thu, 25 Jun 2026 15:23:37 +0000 (17:23 +0200)]
misc: fix labeler (#25012)

2 months agoserver: use status code 403 for disabled features (#24970)
Xuan-Son Nguyen [Thu, 25 Jun 2026 14:36:40 +0000 (16:36 +0200)]
server: use status code 403 for disabled features (#24970)

* server: use status code 403 for disabled features

* cont

* fix test case

2 months agomisc: update lables (#24920)
Xuan-Son Nguyen [Thu, 25 Jun 2026 14:26:56 +0000 (16:26 +0200)]
misc: update lables (#24920)

* misc: update lables

* bring back examples, add mtmd

2 months agocommon: refactor model handling (#24980)
Xuan-Son Nguyen [Thu, 25 Jun 2026 13:17:51 +0000 (15:17 +0200)]
common: refactor model handling (#24980)

* common: refactor models handling

* remote preset

* cont

* rm skip_download option

* missing header

* fix plan.model_files

* fix --offline case

* move hf_plan to download

* refactor

* rm redundant curr_ex, add comments

* adapt

2 months agodocs : Eagle3 qwen3 draft model support (#24977)
Kashif Rasul [Thu, 25 Jun 2026 12:58:00 +0000 (14:58 +0200)]
docs : Eagle3 qwen3 draft model support (#24977)

* eagle3: accept Eagle3LlamaForCausalLM draft checkpoints

* docs: add eagle3 speculative decoding section

* docs: address eagle3 review comments

* docs: add more angelslim eagle3 models

* docs: add gpt-oss eagle3 models and link to pr 18039

2 months agoapp : add the llama download subcommand (#24982)
Adrien Gallouët [Thu, 25 Jun 2026 11:36:36 +0000 (13:36 +0200)]
app : add the llama download subcommand (#24982)

* app : add the download command (with llama-download)

Signed-off-by: Adrien Gallouët <redacted>
* Remove llama-download tool for now

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

Signed-off-by: Adrien Gallouët <redacted>
2 months agoggml : address integer overflows in binary ops CUDA implementation (#24706)
fairydreaming [Thu, 25 Jun 2026 08:06:44 +0000 (10:06 +0200)]
ggml : address integer overflows in binary ops CUDA implementation (#24706)

* ggml : address integer overflows in binary ops CUDA implementation

* ggml : add size_t casts to avoid integer overflows

* ggml : add more asserts checking integer overflows in binary ops CUDA implementation

---------

Co-authored-by: Stanisław Szymczyk <redacted>
2 months agoui: fix always-show-sidebar-on-desktop setting after navigation refactor (#24979)
Pascal [Thu, 25 Jun 2026 07:45:55 +0000 (09:45 +0200)]
ui: fix always-show-sidebar-on-desktop setting after navigation refactor (#24979)

2 months agotests : synchronize contexts at end of test-thread-safety (#24935)
Christopher Albert [Thu, 25 Jun 2026 06:22:51 +0000 (08:22 +0200)]
tests : synchronize contexts at end of test-thread-safety (#24935)

Assisted-by: Claude
2 months agobuild: include libmtmd in Apple XCFramework (#21935)
Abraham Gonzalez [Thu, 25 Jun 2026 05:37:30 +0000 (01:37 -0400)]
build: include libmtmd in Apple XCFramework (#21935)

Adds an opt-in LLAMA_BUILD_MTMD CMake option so build-xcframework.sh
can link libmtmd.a into the framework binary without pulling in the
rest of tools/ (which doesn't cross-build cleanly to iOS/tvOS/visionOS).

- CMakeLists.txt: new option, default OFF. When on with
  LLAMA_BUILD_TOOLS=OFF, only the tools/mtmd subdir is added. Useful
  for any binding that wants just libmtmd (Apple XCFramework, WASM).
- tools/mtmd/CMakeLists.txt: gate the CLI exe targets on
  LLAMA_BUILD_TOOLS. Gating on LLAMA_BUILD_COMMON is not enough — it
  defaults ON in standalone builds and visionOS xcodebuild then fails
  with "install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE
  executable target 'llama-mtmd-cli'".
- build-xcframework.sh: turn the option on, pass -DLLAMA_BUILD_MTMD,
  add libmtmd.a to combine_static_libraries, and copy mtmd.h and
  mtmd-helper.h into the framework Headers dir. The umbrella module
  map then exposes them, so Swift / Obj-C consumers can import the
  mtmd C API directly.

After this, nm on ios-arm64/llama.framework/llama shows 52 _mtmd_
symbols. Verified end-to-end: a Swift target links the produced
framework and calls mtmd_default_marker, mtmd_bitmap_init, etc.
without a shim on macos / iphoneos / iphonesimulator / xros slices.

Co-authored-by: Abraham Gonzalez <redacted>
2 months agoquant : fix quantizing moe with mtp (#24986)
Sigbjørn Skjæret [Thu, 25 Jun 2026 05:36:49 +0000 (07:36 +0200)]
quant : fix quantizing moe with mtp (#24986)

2 months agosycl : support --split-mode tensor (#24152)
David Spruill [Thu, 25 Jun 2026 05:35:21 +0000 (01:35 -0400)]
sycl : support --split-mode tensor (#24152)

* Sycl tp stage1 (#1)

* SYCL: tensor parallelism (--split-mode tensor) for dual-GPU

Adds the comm_init/comm_free/comm_allreduce_tensor trio that the
meta-backend queries via get_proc_address to enable backend-specific
all-reduce, mirroring the pattern used by ggml-cuda.cu.

For N=2 (the common dual-GPU case) implements a degenerate ring
all-reduce with two size-branched paths:

  * Small (nelem < 32768): FP32 direct memcpy + per-device ADD kernel
    chained via depends_on(memcpy_event). 4 SYCL submissions/call.

  * Large (nelem >= 32768): BF16-compressed. Each device compresses
    FP32 -> BF16 in a local outbox, cross-device memcpys to the peer's
    inbox (HALF the PCIe bytes), then decompresses + adds into the
    local FP32 partial. 6 SYCL submissions/call but PCIe bytes halved
    -- wins for any tensor where PCIe dominates kernel time.

Threshold and BF16 path pattern mirror the CUDA NCCL allreduce.

Storage: ONE persistent uint8_t buffer per device, 4 * nelem bytes
(matches both path layouts: FP32 nelem floats; BF16 outbox+inbox =
2 * nelem uint16_t each). Single alloc+free per device keeps the
SYCL pool's strict-LIFO invariant trivial.

Initial impl handles N=2 FP32 contiguous tensors. Other cases return
false, causing the meta-backend to use its generic butterfly fallback.

Per-call sync is intentionally omitted. SYCL in-order queue semantics
ensure that the meta-backend's next compute on the same per-device
queue waits for our final ADD, and the next allreduce's first op on
the same persistent buffer waits via the same queue. Only comm_free
does an explicit final wait.

OneCCL is NOT used: OneCCL 2021.17 hardcodes single-device-per-process
in communicator_impl.hpp:47 (condition devices.size() == 1), which is
incompatible with llama.cpp's single-process multi-GPU model.

Measured on dual Intel Arc Pro B70 (NEO 26.05.x, oneAPI 2025.3 +
DPC++ nightly):

  Llama-3.3-70B Q4_K_M, -sm tensor -fa 1 -ctk f16 -ctv f16:
    pp512 = 377.08 t/s  (vs 313.65 layer mode = +20.2%)
    tg128 = 17.40 t/s   (vs   9.74 layer mode = +78.6%)

  Qwen3-Coder-Next-80B-A3B Q3_K_M (MoE):
    pp512 = 216.56 t/s  (vs 156.58 meta-backend butterfly = +38.3%)
    tg128 = 17.60 t/s   (vs  14.31 meta-backend butterfly = +23.0%)

  Qwen3-4B Q4_K_M:
    pp64  = 984.51 t/s, tg16 = 49.29 t/s

Llama-3.3-70B in SYCL TP now comfortably beats production layer mode
on both prefill and decode. Coder-Next-80B-A3B (MoE) also wins on
both — the BF16 path is what unlocks the many-medium-allreduces
prefill pattern.

Build/CMake: no changes. No new dependencies. ~210 lines added across
ggml-sycl.h and ggml-sycl.cpp.

* Fix comments

* documentation update to address PR feedback

* Bring over my device-to-device memcpy chagnes

* move the dev2dev_memcpy calls to the upstream 7-parameter variety

* Fix a typo and remove a trailing whitespace

2 months agosycl : fix the failed UT cases of conv_3d (#24900)
Neo Zhang [Thu, 25 Jun 2026 05:27:58 +0000 (13:27 +0800)]
sycl : fix the failed UT cases of conv_3d (#24900)

2 months agoopencl: support non-contig rows in norm (#24965)
lhez [Thu, 25 Jun 2026 02:21:25 +0000 (19:21 -0700)]
opencl: support non-contig rows in norm (#24965)

2 months agochat: harden caps check (#24973)
Piotr Wilkin (ilintar) [Thu, 25 Jun 2026 00:49:22 +0000 (02:49 +0200)]
chat: harden caps check (#24973)

2 months agohexagon: MUL_MAT and MUL_MAT_ID rework : 32x32 tiled weight repack, kernel-params...
Max Krasnyansky [Wed, 24 Jun 2026 19:14:25 +0000 (12:14 -0700)]
hexagon: MUL_MAT and MUL_MAT_ID rework : 32x32 tiled weight repack, kernel-params, cached graphs (#24954)

* hex-mm: new weight layout and fusion updates

* hvx-mm: unroll the new tiled vec_dots to optimize hvx register util

* hex-mm: optimize dyn.quant format for q8_0 and q8_1 to reduce overhead in vec_dots.

* hvx-mm: parallel quantizer per block for large rows

* hvx-mm: simplify and futher optimize dyn.quant and vec_dots

* hvx-mm: keep intermediate per tile accumulators in fp16

* hmx-mm: optimize weight dequant by aligning the repacked tiles with the DMA

* hmx-mm: remove qweight scratch and just use vtcm_weight

* hmx-mm: remove all unused and obsolete code

* hmx-mm: the new tiled repack format is here to stay -- rename all x4x2 to _tiled

* hmx-mm: improve activation processing with dma prefetch

* hex-mm: fix hmx/hvx fallback logic and MUL_MAT_ID allocation (unbreaks OLMoE)

* hex-mm: align the weight tiles with dma just like we did in hmx-mm

* hex-mm: factor out common mm bits into htp/matmul-ops.h

* hex-mm: start moving mm kernel selection to the host

* hex-mm: move all of the matmul param compute into the host

* hmx-mm: restore pipelined mode

* hmx-mm: unroll the dequant functions to optimize register usage

* hmx-mm: further improve activation process

* hex-mm: use vtcm_seq_alloc for all vtcm allocations and define more common functions

* hex-mm: improve mm optimizer to acount for number of activation threads

* hex-mm: fix matmul-id kernel params selection (unbreaks OLMoE and LFM)

* hexagon: remove support for arch < v73 since HMX is now required for most use-cases

* hex-mm: cleanup naming for consistency

* hex-mm: make sure matmul fusion accounts for vtcm allocation

* hex-mm: minor cleanup for kernel_params definition

* hex-mm: replace hardcoded limits with proper checks for vtcm requirements

* hex-mm: add support for non-tiled mm as a fallback option and factor out hvx kernels into separate header

* hex-mm: remove unused functions

* hex-mm: add shorthand for MM_SELECT in run-tool script

* hvx-mm: factor out hvx/hmx microkernels and unify matmul entry and dispatch

* hex-mm: further cleanup matmul fallback path

* hex-mm: refactor matmul entry point and dispatch a bit further

* hexagon: update cmake build to enable hmx for everything

* hex-ops: optimize kernel_param updates and include summary in the logs

* hex-mm: add support for GGML_HEXAGON_MM_SELECT

* hex-mm: add hex-common header

* hex-mm: pass correct number of tasks to workpool

* hex-mm: add proper checks for no-work in dyn.quant tasks

* hex-mm: convert all quantizers into a macro

* hex-mm: fix hvx-flat fallback to pass all MUL_MAT tests

* hex-mm: vectorize q8_1 quantizer

* hex-mm: improve fused ffn mm stride handling

* hex-mm: consistent use of n_threads and pipeline in kernel_params

* hexagon: minor formatting

* hex-mm: update MUL_MAT_ID kernel_param handling to make sure host/npu are in sync

* hvx-mm: go back to accumulating in fp32 in tiled hvx kernels, more accurate and same perf

* hvx-mm: unroll the loops and remove masking that is not needed for tiled accums

* hmx-mm: optimize activation processing (slit loops, some unrolling, etc)

* hmx-mm: minor optimization for output processing

* hex-mm: consistent use of uint32_t and size_t in mm kernels

* hex-mm: remove legacy restrictions for rows to be multiple of 256

* hexagon: replace sprintf with snprintf

* hex-mm: relax hardcoded nrows checks and rely on VTCM size requirements

* hexagon: minor alignment fix

* hexagon: fix trailing spaces

* hex-mm: relax padding from 256 to 128 (leftovers)

* hex-mm: remove redundant checks for weight align to 128

we always use 2D dma for the weights and align them properly

* hmx-mm: MUL_MAT_ID better work distribution between hvx threads and hmx tracing

* hex-mm: specialize per-token mmid activation handling

* hex-profile: update python scripts to handle kernel-params section in the logging output

* hex-mm: move n_prefetch (aka dma_depth) into kernel params and remove unused fields

* hex-trace: use easier to parse format, simply and fix post-proc scripts

* hmx-mm: relax 32 row limit for output processing which helps utilization

* hmx-mm: use start-chunk idx for tracing info

* hmx-mm: parameterize activation dma pipeline

* hexagon: add support for simple graph caching to avoid recomputing kernel-params

* hex-mm: remove left-over repack functions

* hex-mm: tighten n_prefetch asserts

* hex-mm: remove duplicate round/align_up helper

* hexagon: cleanup common header used in host/npu

* hexagon: update early wakeup threshold

* hmx-mm: define cost constants and update solver to assume that repacked ne[1] is padded to 32

* hmx-mm: make precompute_matmul a bit more readable (split into smaller functions, etc)

* hex-mm: remove n_threads constraint

* hex-mm: minor formatting updates

* hex-mm: remove obsolete profiling logs

* hex-mm: restore hardcode gate to refuse lm-head to avoid repacking that tensor

2 months agomtmd: model: unlimited-ocr: converter + parity test (#24969)
Saba Fallah [Wed, 24 Jun 2026 16:20:22 +0000 (18:20 +0200)]
mtmd: model: unlimited-ocr: converter + parity test (#24969)

2 months agocommon: remove unused json-partial (#24968)
Xuan-Son Nguyen [Wed, 24 Jun 2026 16:12:16 +0000 (18:12 +0200)]
common: remove unused json-partial (#24968)

2 months agovulkan: allow reducing the graph submission batches to avoid timeouts (#24872)
Wagner Bruna [Wed, 24 Jun 2026 14:29:24 +0000 (11:29 -0300)]
vulkan: allow reducing the graph submission batches to avoid timeouts (#24872)

2 months agovulkan: fail the build when a shader fails to compile (#24450)
liminfei-amd [Wed, 24 Jun 2026 09:42:03 +0000 (17:42 +0800)]
vulkan: fail the build when a shader fails to compile (#24450)

* vulkan-shaders-gen: fail the build when a shader fails to compile

vulkan-shaders-gen did not detect shader-compile subprocess failures, so a
broken libggml-vulkan could be produced while the build reported success and
the breakage only surfaced at run time. execute_command() discarded the child
exit code (POSIX waitpid passed nullptr for status; the Windows branch never
called GetExitCodeProcess) and string_to_spv decided success only from whether
stderr was empty, so a non-zero exit with empty stderr, or a subprocess that
failed to launch, was treated as success.

Return the child exit code from execute_command() (WEXITSTATUS on POSIX,
GetExitCodeProcess on Windows), treat a non-zero exit or non-empty stderr or a
launch exception as a failure, and record it in an atomic flag. main() checks
the flag after process_shaders() and returns EXIT_FAILURE before writing the
output files, so the build stops instead of emitting a broken backend.

Fixes #24393

Signed-off-by: liminfei-amd <redacted>
* vulkan-shaders-gen: simplify compile_failed access and drop unreachable return

Address review feedback on #24450:
- Access the std::atomic<bool> compile_failed directly (= / implicit bool)
  instead of .store()/.load(); the flag stays atomic because the worker
  threads in process_shaders() set it concurrently.
- Remove the unreachable trailing return -1 in execute_command(): on POSIX the
  child _exit()s after execvp and the parent returns (fork()<0 throws); on
  Windows the block returns the exit code.

Signed-off-by: liminfei-amd <redacted>
---------

Signed-off-by: liminfei-amd <redacted>
2 months agoui: loading bar below the model picker (#24931)
Pascal [Wed, 24 Jun 2026 08:50:44 +0000 (10:50 +0200)]
ui: loading bar below the model picker (#24931)

* ui: show model load progress on the selector trigger

Mirror the in-dropdown stage progress as a thin bar on the selector
trigger, so the active model's load percent stays visible when the menu
is closed. Same status gating and composite fraction as the dropdown
row, so both bars track the selected model in sync.

Suggested-by: Julien Chaumond <@julien-c>
* ui: show model load progress bar on the in-conversation model selector

* ui: tune model load indicator to a pulsing highlight (suggested by @ngxson)

Also wire the indicator onto the mobile sheet trigger, which was missing
it since mobile uses the sheet instead of the dropdown.

* ui: thin (@allozaur) pulsating (@ngxson) model load bar

2 months agoui: New Logo + Navigation cleanup & Mobile UI/UX improvements (#24897)
Aleksander Grygier [Wed, 24 Jun 2026 08:21:33 +0000 (10:21 +0200)]
ui: New Logo + Navigation cleanup & Mobile UI/UX improvements (#24897)

* chore: `npm audit fix --force`

* feat: Update sidebar toggle to use Logo

* refactor: Clean up favicon SVG

* feat: Refactor logo component and implement theme-aware favicon generation

* feat: Add configurable padding to generated PWA assets

* test: Add unit tests for writeThemeFavicons

* refactor: Componentization

* feat: WIP

* feat: WIP

* feat: WIP

* feat: Mobile UI

* feat: add SEARCH route constant

* feat: create SidebarNavigationSearchResults component

* refactor: use SidebarNavigationSearchResults in conversation list

* feat: enable mobile search navigation in sidebar actions

* feat: add mobile search route and page

* fix: prevent sidebar overflow on mobile viewports

* fix: Mobile sidebar

* feat: Mobile Search WIP

* feat: Mobile WIP

* feat: Add PWA standalone detection and refine mobile UI

* feat: Improve mobile layout, sidebar handling, and chat scrolling

* feat: Improve mobile sidebar visibility and iOS Safari chat spacing

* fix: Disable auto-scroll on mobile

* chore: Linting

* fix: Wrong condition

* feat: Mobile chat scroll

* refactor: WIP

* fix: Desktop initial scroll always working again

* fix: Partial fix for mobile auto-scroll / initial scroll

* fix: Desktop auto-scroll on initial load and during streaming

* fix: Mobile scrolling logic

* refactor: Clean up

* feat: Improve start UI

* feat: Add `delay` to `fadeInView`

* feat: Auto-scroll button

* refactor: Cleanup

* refactor: Extract chat dialogs and alerts into dedicated component

* refactor: Reorganize ChatScreen component structure and initialization

* feat: Improve auto-scroll after sending message

* feat: UI improvements

* fix: Settings link

* feat: UI improvements

* fix: better UI spacing

* fix: Remove unneeded logic

* fix: Chat Processing Info UI rendering

* feat: Improve mobile UI

* feat: UI improvement

* fix: Conditional transition delay for Chat Messages based on route from

* fix: Delay mobile sidebar collapse for smoother transitions

* fix: Mobile scroll down button + sidebar pointer events

* fix: Mobile UI

* fix: Auto scrolling

* fix: Implement dynamic height calculations for chat auto-scroll positioning and UI elements

* fix: Retrieve `autofocus` for Chat Form textarea

* fix: Use proper class

Co-authored-by: Copilot Autofix powered by AI <redacted>
* refactor: extract scroll-to-bottom logic and fix message send flow

* fix: update viewport store usage and remove conflicting autofocus

* feat: add accessibility labels to scroll down button

* fix: correct HTML structure in sidebar empty states

* fix: dynamically toggle processing info visibility

* chore: remove commented exports and fix formatting

* fix

* fix: Mobile Chat Form Add Action Sheet interactions

---------

Co-authored-by: Copilot Autofix powered by AI <redacted>
2 months agomodel : Add LFM2.5-ColBERT-350M and LFM2.5-Embedding-350M (#24913)
Tarek Dakhran [Wed, 24 Jun 2026 06:49:46 +0000 (08:49 +0200)]
model : Add LFM2.5-ColBERT-350M and LFM2.5-Embedding-350M (#24913)

* model : Add LFM2.5-ColBERT-350M and LFM2.5-Embedding-350M

* Restore LFM2 models in README.md

2 months agovulkan: Apply bias before softmax in FA, to avoid overflow (#24909)
Jeff Bolz [Wed, 24 Jun 2026 03:34:00 +0000 (22:34 -0500)]
vulkan: Apply bias before softmax in FA, to avoid overflow (#24909)

2 months agoserver : check draft context creation error (#24922)
kononnable [Tue, 23 Jun 2026 14:56:50 +0000 (16:56 +0200)]
server : check draft context creation error (#24922)

2 months agovulkan: support all backend tests for SQR/SQRT/SIN/COS/CLAMP/LEAKY_RELU/NORM (#24582)
Jeff Bolz [Tue, 23 Jun 2026 14:48:24 +0000 (09:48 -0500)]
vulkan: support all backend tests for SQR/SQRT/SIN/COS/CLAMP/LEAKY_RELU/NORM (#24582)

* vulkan: make SQR/SQRT/SIN/COS/CLAMP/LEAKY_RELU use unary.comp

* vulkan: make NORM support noncontig

* add noncontiguous row test cases for norm/l2_norm, handle this in the CPU backend and l2_norm.comp

* fix supports_op for cuda and webgpu

2 months agovulkan: Support GET_ROWS_BACK (#24883)
Jeff Bolz [Tue, 23 Jun 2026 13:39:37 +0000 (08:39 -0500)]
vulkan: Support GET_ROWS_BACK (#24883)

2 months agovulkan: support CONV_3D (#24612)
Jeff Bolz [Tue, 23 Jun 2026 13:39:20 +0000 (08:39 -0500)]
vulkan: support CONV_3D (#24612)

* vulkan: support CONV_3D

This is a pretty direct port of conv2d_mm.comp to CONV_3D, done by codex
and cleaned up by me.

* disable slower perf tests

2 months agovulkan: make mul_mm ALIGNED a spec constant (#24689)
Jeff Bolz [Tue, 23 Jun 2026 12:26:17 +0000 (07:26 -0500)]
vulkan: make mul_mm ALIGNED a spec constant (#24689)

This trims down some of the shader variant explosion and reduces binary size.

2 months agoserver: fix remote preset handling, add test (#24938)
Xuan-Son Nguyen [Tue, 23 Jun 2026 11:28:34 +0000 (13:28 +0200)]
server: fix remote preset handling, add test (#24938)

* server: add test for remote preset

* fix remote preset handling

* fix

* fix test

2 months agovulkan: link ggml-cpu when GGML_VULKAN_CHECK_RESULTS / RUN_TESTS are enabled (#24444)
Wyatt Caldwell [Tue, 23 Jun 2026 10:55:46 +0000 (03:55 -0700)]
vulkan: link ggml-cpu when GGML_VULKAN_CHECK_RESULTS / RUN_TESTS are enabled (#24444)

The result-checking and test debug paths in ggml-vulkan.cpp call ggml_graph_compute_with_ctx() to compute a CPU reference graph, but that symbol is defined in ggml-cpu, which ggml-vulkan does not link. Enabling -DGGML_VULKAN_CHECK_RESULTS=ON (or -DGGML_VULKAN_RUN_TESTS=ON) therefore fails to link with an unresolved external (e.g. LNK2019 on MSVC, undefined reference on GCC/Clang). This regressed after ggml-cpu was split into its own library. Link ggml-cpu under those two options so the debug builds link again.

Signed-off-by: Wyatt Caldwell <redacted>
2 months agomodel: Granite Speech Plus (#24818)
Gabe Goodhart [Tue, 23 Jun 2026 10:03:31 +0000 (04:03 -0600)]
model: Granite Speech Plus (#24818)

* feat: Add conversion support for Granite Speech Plus

Branch: GraniteSpeechPlus
AI-usage: full (Bob, OpenCode + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <redacted>
* feat: Extend granite_speech to support plus multi-layer concatenation

Branch: GraniteSpeechPlus
AI-usage: draft (Bob, OpenCode + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <redacted>
* fix(conversion): Fix plural naming for feature_layers for audio

Branch: GraniteSpeechPlus
AI-usage: none
Signed-off-by: Gabe Goodhart <redacted>
* fix(mtmd): Align feature_layer usage and naming everywhere

Branch: GraniteSpeechPlus
AI-usage: none
Signed-off-by: Gabe Goodhart <redacted>
* style: Use fstring for log

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Xuan-Son Nguyen <redacted>
---------

Co-authored-by: Xuan-Son Nguyen <redacted>
2 months agoggml-webgpu: improve MTP inference by using mat-vec path for small batches (#24811)
Masashi Yoshimura [Tue, 23 Jun 2026 08:13:55 +0000 (17:13 +0900)]
ggml-webgpu: improve MTP inference by using mat-vec path for small batches (#24811)

* ggml-webgpu: improve small batches decoding

* Add barrier to the NUM_COLS loop in mul-mat-vec

2 months agocodeowners: add yomaytk to ggml-webgpu (#24930)
Masashi Yoshimura [Tue, 23 Jun 2026 06:19:34 +0000 (15:19 +0900)]
codeowners: add yomaytk to ggml-webgpu (#24930)

2 months agoserver: improve user message detection and create checkpoints at every user message...
Aldehir Rojas [Tue, 23 Jun 2026 05:27:28 +0000 (00:27 -0500)]
server: improve user message detection and create checkpoints at every user message (#24176)

* server : improve message span logic

* cont : cast size_t to int32_t in comparisons

* server : create checkpoints before every user msg

* chat : remove \n in gemma4 delimiters

* chat : merge msg delimiter structs into one

* cont : reword comment

* cont : initialize tokens in delimiter

* cont : add server_tokens::get_raw_tokens() for mtmd

* cont : move message finding to server_tokens and skip mtmd tokens

* cont : update cohere2moe parser

* cont : increase min-step to 8192 and always produce a chkpt for last user message

2 months agoopencl: q8_0 gemv precision improvement (#24923)
Shawn Gu [Tue, 23 Jun 2026 05:25:21 +0000 (22:25 -0700)]
opencl: q8_0 gemv precision improvement (#24923)

2 months agoserver : Add id to tool call responses api (#24882)
Matt Thompson [Mon, 22 Jun 2026 21:03:12 +0000 (14:03 -0700)]
server : Add id to tool call responses api (#24882)

2 months agoui: Prioritize favorite models in model selection (#24766)
Mahdiou Diallo [Mon, 22 Jun 2026 19:00:21 +0000 (21:00 +0200)]
ui: Prioritize favorite models in model selection (#24766)

Updated model selection prioritization to include favorite models.