]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
3 months agoconvert : add FP8 to Q8 conversion (#23250)
ynankani [Thu, 28 May 2026 07:16:17 +0000 (07:16 +0000)]
convert : add FP8 to Q8 conversion (#23250)

Signed-off-by: ynankani <redacted>
3 months agoggml: fixed Arm SVE usage bug in vec.h, vec.cpp (#22841)
Martin Klacer [Thu, 28 May 2026 07:04:21 +0000 (08:04 +0100)]
ggml: fixed Arm SVE usage bug in vec.h, vec.cpp (#22841)

* Updated vec.h/vec.cpp code to accumulate to F32 rather than F16

Change-Id: I0cb789347f2bf60ffaf9047319f727e788c825f8

Signed-off-by: Martin Klacer <redacted>
Co-authored-by: Milos Puzovic <redacted>
3 months agoci : refactor (#23789)
Georgi Gerganov [Thu, 28 May 2026 06:44:25 +0000 (09:44 +0300)]
ci : refactor (#23789)

* ci : separate CUDA windows workflow + fix names

* ci : rename workflow

* ci : prefix cache names with workflow name

* ci : rename build.yml -> build-cpu.yml

* ci : cache keys

* ci : fix windows cuda/hip concurrency of release workflow

* ci : fix apple cache names

* ci : add TODOs

* cont : keep just the last cache

* ci : update release concurrency to queue

* ci : move the release trigger to ubuntu-slim

* ci : hip add TODO

* cont : improve words

Co-authored-by: Georgi Gerganov <redacted>
3 months agoHexagon: OP_GATED_DELTA_NET K>1 support (#23531)
ymcki [Thu, 28 May 2026 06:05:25 +0000 (14:05 +0800)]
Hexagon: OP_GATED_DELTA_NET K>1 support (#23531)

* K>1 state snapshot support

* removed picky indent multiple of 4 fixes

3 months agoopencl: OP_GATED_DELTA_NET (#23312)
ymcki [Thu, 28 May 2026 04:23:21 +0000 (12:23 +0800)]
opencl: OP_GATED_DELTA_NET (#23312)

* OP_GATED_DELTA_NET impl

* add back lanes_per_column declaration

* removed has_subgroup_arithmetic and has_subgroup_clustered_reduce

* removed trailing spaces and fixes indentation. Hard coded subgroup size for Adreno and Intel. Return not supported when K>1 state snapshot

* support for K>1 state snapshot

* removed picky indent multiple of 4 fixes

* removed return that won\'t be executed

3 months agoggml-webgpu: remove legacy constants (#23672)
Reese Levine [Wed, 27 May 2026 21:22:33 +0000 (14:22 -0700)]
ggml-webgpu: remove legacy constants (#23672)

3 months agohexagon: add support for Q4_1 in MUL_MAT and MUL_MAT_ID (#23647)
Max Krasnyansky [Wed, 27 May 2026 17:46:11 +0000 (10:46 -0700)]
hexagon: add support for Q4_1 in MUL_MAT and MUL_MAT_ID (#23647)

* hex-mm: add support for Q4_1 matmul/matvec, hvx-only for now

* hmx-mm: add support for Q4_1

* hex-mm: use Q8_1 dynamic quantization to avoid having to compute sums in the vec_dot

* hexagon: fix repack scratch buffer overflow

* hex-mm: fix Q4_1 repack buffer sizing

* hexagon: flip the build order for mm and fa (seems to help LTO)

* hex-mm: add vec_dot 4x1s and minor HMX cleanup after adding Q4_1

* hex-mm: fix fp16 vec_dot fallback to 2x1 and another issue that could cause incorrect output

* hexagon: resurrect early-wake and add support for polling for op-batch completions

With Q4_1 ggml-hexagon now claims pretty much the entire graphs which gives the CPU more time to chilax.
This is a good thing! But it does add extra latency for the pure benchmark runs.
Early wakeup helps recover the latency a bit in the normals runs and op-batch polling is just for benchmarking.

---------

Co-authored-by: Todor Boinovski <redacted>
3 months agoggml-webgpu: Fix how to dispatch WG to some ops (#23750)
Masashi Yoshimura [Wed, 27 May 2026 16:48:12 +0000 (01:48 +0900)]
ggml-webgpu: Fix how to dispatch WG to some ops (#23750)

3 months agovulkan: Switch MUL_MAT_VEC to 4 K per iteration for F16/32 (#22887)
Matt Corallo [Wed, 27 May 2026 15:19:23 +0000 (15:19 +0000)]
vulkan: Switch MUL_MAT_VEC to 4 K per iteration for F16/32 (#22887)

* vulkan: Switch MUL_MAT_VEC to 4 K per iteration for F16/32

Against mesa git, this shows a 4.8% performance improvement for
tg128 on Qwen3.5-9B:BF16 on Intel BMG.

Note that this breaks some tests until the last commit which fixes
OOB A reads.

* vulkan: Use aligned loads in mul_mat_vec when available

Against mesa git, this shows a 3.3% performance improvement for
tg128 on Qwen3.5-9B:BF16 on Intel BMG.

* Make explicit that `num_rows` is <= `NUM_ROWS` in mul_mat_vec

Mesa's UUB logic can't see through conditionals, limiting its
ability to understand the bounds on the `num_rows` field in the
cleanup run. Making it explicit that `num_rows` is, indeed, always
<= `NUM_ROWS` helps mesa make slightly better codegen.

Against mesa git, this currently shows a 1% performance improvement
in tg128 on Qwen3.5-9B:BF16 on Intel BMG.

* vulkan: Fix OOB A reads in MUL_MAT_VEC for odd sizes

There was a TODO to fix the OOB reads from the A matrix which we do
here.

It is within performance noise (+<0.1%) in tg128 for
Qwen3.5-9B:BF16 on Intel BMG.

3 months agovulkan: use GL_NV_cooperative_matrix_decode_vector for faster matmul (#23541)
Jeff Bolz [Wed, 27 May 2026 15:18:28 +0000 (10:18 -0500)]
vulkan: use GL_NV_cooperative_matrix_decode_vector for faster matmul (#23541)

3 months agovulkan: add REPEAT op support for f16 to f16. (#23298)
l8bloom [Wed, 27 May 2026 14:59:08 +0000 (16:59 +0200)]
vulkan: add REPEAT op support for f16 to f16. (#23298)

* feat: extend repeat op for vulkan

* feat: add repeat_f16 vulkan pipeline

* fix: ensure same dst and src types

* fix: use type_size instead of data types

* fix: use int16 and int32 for repeat shader op

* chore: rename repeat_f* to repeat_i*

* chore: rename repeat vulkan pipelines

3 months agoci : move ARM jobs to self-hosted + disable kleidiai mac release (#23780)
Georgi Gerganov [Wed, 27 May 2026 14:22:20 +0000 (17:22 +0300)]
ci : move ARM jobs to self-hosted + disable kleidiai mac release (#23780)

* ci : move ARM jobs to 3rd-party runners + disable kleidiai release

* cont : fix deps + fix names

* ocd : fix names

* cont : fix PR links

3 months agovendor : update cpp-httplib to 0.46.0 (#23650)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Wed, 27 May 2026 13:36:24 +0000 (10:36 -0300)]
vendor : update cpp-httplib to 0.46.0 (#23650)

3 months agopyproject : add conversion folder and update dependencies (#23746)
Sigbjørn Skjæret [Wed, 27 May 2026 13:06:18 +0000 (15:06 +0200)]
pyproject : add conversion folder and update dependencies (#23746)

* add conversion folder and update dependencies

* limit python version for triton

* update dev-dependencies section

3 months agoCUDA: restrict PDL to CTK >= 12.3 due to MSVC issues (#23742)
Oliver Simons [Wed, 27 May 2026 12:21:04 +0000 (14:21 +0200)]
CUDA: restrict PDL to CTK >= 12.3 due to MSVC issues (#23742)

3 months agoci : bump cuda release to 13.3 (#23749)
Sigbjørn Skjæret [Wed, 27 May 2026 12:06:08 +0000 (14:06 +0200)]
ci : bump cuda release to 13.3 (#23749)

3 months agocommon : fix env names to all have LLAMA_ARG_ prefix (#23778)
Georgi Gerganov [Wed, 27 May 2026 11:52:47 +0000 (14:52 +0300)]
common : fix env names to all have LLAMA_ARG_ prefix (#23778)

3 months agoci : fix windows ccaches (#23777)
Georgi Gerganov [Wed, 27 May 2026 10:54:21 +0000 (13:54 +0300)]
ci : fix windows ccaches (#23777)

* ci : server windows set build type explicitly

* cont : try windows-2025

* ci : use llvm

* cont : use ninja

* cont : fix shell

* ci : set number of jobs correctly

* ci : fix windows with vulkan ccache by using llvm

* ci : server ccache only on master

* ocd : fix job names

[no release]

3 months agoci : remove wasm test (#23733)
Sigbjørn Skjæret [Wed, 27 May 2026 10:11:37 +0000 (12:11 +0200)]
ci : remove wasm test (#23733)

* run tests in correct build folder

* remove wasm test

3 months agovulkan: avoid preferring transfer queue on AMD UMA devices (#22455)
Winston Ma [Wed, 27 May 2026 09:48:40 +0000 (17:48 +0800)]
vulkan: avoid preferring transfer queue on AMD UMA devices (#22455)

3 months agoci : add ccache to server builds + fix undefined sanitizer build (#23763)
Georgi Gerganov [Wed, 27 May 2026 08:45:12 +0000 (11:45 +0300)]
ci : add ccache to server builds + fix undefined sanitizer build (#23763)

* ci : fix undefined sanitizer build to use Debug build type only

* ci : ccache the server builds

* cont : remove ui dependency + reuse ccache for both ubuntu jobs

* tmp : force ccache save

* Revert "tmp : force ccache save"

This reverts commit a857b03a10b1304d456129a017e0e46b185618ee.

* cont : no need for node.js

3 months agodocs : fix duplicated "the" in granitevision and model-conversion docs (#23767)
quyentonndbs [Wed, 27 May 2026 07:34:06 +0000 (15:34 +0800)]
docs : fix duplicated "the" in granitevision and model-conversion docs (#23767)

Co-authored-by: Kai Tanaka <redacted>
3 months agoconvert: add MiniCPM5 tokenizer support (#23384)
zhangtao2-1 [Wed, 27 May 2026 05:08:33 +0000 (13:08 +0800)]
convert: add MiniCPM5 tokenizer support (#23384)

Add minicpm5 pre-tokenizer hash via convert_hf_to_gguf_update.py and
implement hardcoded regex handling in llama-vocab.cpp, consistent with
other BPE pre-tokenizers.

Co-authored-by: zhangtao <redacted>
3 months agoserver : fix the log message when using SSL (#23393)
Radoslav Gerganov [Wed, 27 May 2026 05:06:30 +0000 (08:06 +0300)]
server : fix the log message when using SSL (#23393)

When llama-server is started with SSL key and cert, the log says that it
listens on http instead of https. This patch fixes this.

3 months agoggml-zendnn : fixed naming of matmul function (#20964)
Vladislav [Tue, 26 May 2026 22:59:35 +0000 (01:59 +0300)]
ggml-zendnn : fixed naming of matmul function (#20964)

* ggml-zendnn: fixed naming of matmul function

* ggml-zendnn: fixed naming of mul_mat_id function

* ggml-zendnn: fixed print in  mul_mat_id

---------

Co-authored-by: plotnikov.v10 <redacted>
3 months agoci : do not allocate ccache for 3rd-party hosted runners (#23730)
Georgi Gerganov [Tue, 26 May 2026 17:15:01 +0000 (20:15 +0300)]
ci : do not allocate ccache for 3rd-party hosted runners (#23730)

* ci : do not allocate ccache for 3rd-party hosted runners

[no release]

* cont : add prints

[no ci]
[no release]

3 months agoci : move [no release] check to dedicated check_release job (#23734)
Georgi Gerganov [Tue, 26 May 2026 16:49:41 +0000 (19:49 +0300)]
ci : move [no release] check to dedicated check_release job (#23734)

* ci : move [no release] check to dedicated check_release job

Move the workflow-level \`if\` condition that skips builds when the commit
message contains \`[no release]\` into a lightweight \`check_release\` job.
All build jobs now depend on it via \`needs\` and check its output.

This ensures the skip logic is evaluated at the job level rather than at
the workflow level, which is the recommended approach for conditional jobs.

Assisted-by: llama.cpp:local pi
* cont : use `fast` runner

3 months agoci : add `[no release]` keyword + fix sanitizer builds (#23728)
Georgi Gerganov [Tue, 26 May 2026 16:05:48 +0000 (19:05 +0300)]
ci : add `[no release]` keyword + fix sanitizer builds (#23728)

* ci : skip release workflow on master when commit message contains [no release]

Assisted-by: llama.cpp:local pi
* ci : restrict sanitizer builds to x86_64 + fix build type

the spark is apparently too slow for some reason

* tests : fix undefined warning

[no ci]

3 months agoci : move macos jobs to the apple workflow + fix names (#23721)
Georgi Gerganov [Tue, 26 May 2026 13:57:55 +0000 (16:57 +0300)]
ci : move macos jobs to the apple workflow + fix names (#23721)

3 months agovulkan: optimize conv2d and implement coopmat1 support (#22620)
Jeff Bolz [Tue, 26 May 2026 13:48:05 +0000 (08:48 -0500)]
vulkan: optimize conv2d and implement coopmat1 support (#22620)

* vulkan: add CONV_SHAPE_64x128 for medium-K conv2d

* vulkan: skip conv2d bounds checks when shapes align with tile sizes

* vulkan: use WG_SIZE=128 for CONV_SHAPE_64x32 conv2d

* vulkan: stage cm2 conv2d accumulator through shmem before global store

* vulkan: add coopmat1 conv2d path

* fallback when using too much shared memory. clean up comments

* Require 16x16x16 and subgroup size 32 or 64

* check whether shared memory is sufficient before overwriting conv2d params with coopmat1 values

3 months agoci : remove vulkan SDK dep from webgpu job (#23718)
Georgi Gerganov [Tue, 26 May 2026 13:40:30 +0000 (16:40 +0300)]
ci : remove vulkan SDK dep from webgpu job (#23718)

* ci : remove vulkan dep from webgpu build

* cont : add ccache to `ubuntu-24-webgpu-wasm`

* ci : fix name + add wasm test

3 months agohexagon: add support for CONCAT op (#23648)
Max Krasnyansky [Tue, 26 May 2026 13:20:05 +0000 (06:20 -0700)]
hexagon: add support for CONCAT op (#23648)

* hexagon: add support for CONCAT with optimized concat_2d_transposed

qwen3.5 models are quite heavy on the CONCAT with large and transposed src1.

* hex-concat: use fastdiv in generic version

* hex-concat: make checks for transposed a bit more readable

* hex-concat: reoder dma ops for better pipelining

* hex-cont/cpy: optimize CPY and CONT ops

The primary change is to avoid scalar divs in the inner loops.
We were calling hvx_copy_uu(... type_size) where type_size is non a constexpr.
This causes runtime divs by that value which is normally just 4 or 2 (f32/f16).

* hex-get-rows: optimize GET_ROWS for large rows

We now use DMA for larger rows and also split them into chunks to improve perf for Qwen3.5 and other models
that do lots of GET_ROWS with huge (2MB+ rows).

Also bump the DMA queue depth now that we can take advantage of it.

* hex-concat: unroll the inner loops of concat_2d

* hex-concat: more updates to concat_2d to improve perf a bit further

* hex-cpy: fixed n_rows per thread checks in the copy ops

* hmx-fa: fix alignment issues while computing dma sizes

* hex-set-rows: add early returns for idle threads

* hvx-rope: minor optimization to replace loops with fastdiv logic

* hex-rope: replace scalar tail processing with HVX

* hex-rope: optimize rope cache init with HVX

Add hvx-utils sin/cos helpers that use an aprox method (similar to rsqrt, inverse, etc)
Use the helpers to optimize ROPE.

3 months agoci : move more CPU jobs to self-hosted runners (#23715)
Georgi Gerganov [Tue, 26 May 2026 12:37:40 +0000 (15:37 +0300)]
ci : move more CPU jobs to self-hosted runners (#23715)

3 months agoci : move sanitizer jobs to self-hosted runners (#23713)
Georgi Gerganov [Tue, 26 May 2026 12:22:09 +0000 (15:22 +0300)]
ci : move sanitizer jobs to self-hosted runners (#23713)

3 months agoci : reduce (disable SYCL and CANN builds/releases) (#23705)
Georgi Gerganov [Tue, 26 May 2026 12:21:21 +0000 (15:21 +0300)]
ci : reduce (disable SYCL and CANN builds/releases) (#23705)

* ci : reduce

[no ci]

* cont : disable sycl, cann + rename caches

[no ci]

* cont : cann

[no ci]

3 months agoconvert : support Gemma4ForCausalLM architecture (#23682)
ghleg [Tue, 26 May 2026 05:00:31 +0000 (07:00 +0200)]
convert : support Gemma4ForCausalLM architecture (#23682)

* convert : support Gemma4ForCausalLM architecture (#23674)

* fix indent

---------

Co-authored-by: Oleg Afonin <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agomodels : Attach Mistral3 NVFP4 weight scales (#23629)
Michael Wand [Tue, 26 May 2026 04:59:59 +0000 (00:59 -0400)]
models : Attach Mistral3 NVFP4 weight scales (#23629)

3 months agoSYCL: implement ggml_sycl_pool_vmm (#22862)
Alexey Kopytko [Tue, 26 May 2026 04:59:00 +0000 (13:59 +0900)]
SYCL: implement ggml_sycl_pool_vmm (#22862)

* SYCL: implement ggml_sycl_pool_vmm

* Add an option to bypass VMM with GGML_SYCL_DISABLE_VMM

* Clean up debugging logging

* document GGML_SYCL_DISABLE_VMM

* Multi-stream MoE optimization

* Revert "Multi-stream MoE optimization"

This reverts commit 938929c3f13a562ec67c59e87cc5d38595444cce.

* Update common.hpp

Co-authored-by: Neo Zhang <redacted>
* Flip GGML_SYCL_DISABLE_VMM to GGML_SYCL_ENABLE_VMM

* add logging for GGML_SYCL_ENABLE_VMM when extension is not available (SYCL_EXT_ONEAPI_VIRTUAL_MEM macro)

* Apply suggestions from code review

Co-authored-by: Alexey Kopytko <redacted>
* Apply suggestion from @sanmai

* Apply suggestion from @sanmai

---------

Co-authored-by: Neo Zhang <redacted>
3 months agotests: test-backend-ops -j <N> to run tests in parallel (#23637)
Jeff Bolz [Tue, 26 May 2026 04:57:56 +0000 (23:57 -0500)]
tests: test-backend-ops -j <N> to run tests in parallel (#23637)

Create a pool of N threads that grab a chunk of up to 100 tests at a time to
iterate through. The number of tests at a time decreases as fewer remain.

Each thread uses its own dev and cpu backend, and set_n_threads_fn is not
called on the cpu backend.

Fix some TSAN issues that arose:
- In init_tensor_uniform, don't use static vector of generators.
- Replace gmtime with versions that don't use a global variable.
- Mutex calls to print_test_result.

3 months agomodel : add support for talkie-1930-13b (#22596)
Niklas Sheth [Tue, 26 May 2026 04:57:38 +0000 (00:57 -0400)]
model : add support for talkie-1930-13b (#22596)

* initial talkie support, coherent

* reorder to follow convention

* absorb inverse rope

* stop folding scalars to improve quantization

* use broadcasting instead of duplication

* style cleanup

* add scaling support to LoraTorchTensor; use that path in conversion

* use layer_out_scale instead of embd_skip_scale

3 months agoggml-webgpu: Add MMVQ path for Q4/Q8/Q2_K/Q4_K and clean up legacy MUL_MAT pipeline...
Masashi Yoshimura [Tue, 26 May 2026 03:42:49 +0000 (12:42 +0900)]
ggml-webgpu: Add MMVQ path for Q4/Q8/Q2_K/Q4_K and clean up legacy MUL_MAT pipeline (#23594)

* ggml-webgpu: Add MMVQ path for Q4/Q8/Q2_K/Q4_K

* Fix to editorconfig checking pass

* Remove mul-mat-legacy pipeline

* Fix to use vendor name as is and add dot_product/vendor to shader_lib_ctx

3 months ago[WebGPU] Check batch_compute_passes before sending passes when not doing GPU profilin...
Nikhil Jain [Tue, 26 May 2026 03:32:49 +0000 (20:32 -0700)]
[WebGPU] Check batch_compute_passes before sending passes when not doing GPU profiling (#23457)

* Only run webgpu CI on my fork

* Add webgpu only workflow

* refactor batch_compute_passes to a per-thread variable, and submit individual passes when it is set to false and no GPU profiling is enabled

* restore build.yml

3 months agoCUDA: missing PDL sync for FWHT, better fallback (#23690)
Johannes Gäßler [Tue, 26 May 2026 03:05:51 +0000 (05:05 +0200)]
CUDA: missing PDL sync for FWHT, better fallback (#23690)

3 months agometal : add apple device id (#23566)
forforever73 [Mon, 25 May 2026 18:05:16 +0000 (02:05 +0800)]
metal : add apple device id (#23566)

Co-authored-by: lvyichen <redacted>
3 months agosnapdragon: bump toolchain docker to v0.7 to fix ui build issues (#23680)
Max Krasnyansky [Mon, 25 May 2026 17:57:43 +0000 (10:57 -0700)]
snapdragon: bump toolchain docker to v0.7 to fix ui build issues (#23680)

3 months agoci : reduce PR jobs by matching backend paths (#23675)
Georgi Gerganov [Mon, 25 May 2026 17:54:54 +0000 (20:54 +0300)]
ci : reduce PR jobs by matching backend paths (#23675)

* ci : disable SYCL f16 builds

* ci : extract android and hip into separate workflows

* ci : move webgpu to separate workflow

* ci : move the rpc to a separate workflow

* ci : extract s309x and ppcl jobs

* ci : extract opencl job into a separate workflow

3 months agomodel: tag ffn_latent as MUL_MAT to fix buft probe (#23664)
Pascal [Mon, 25 May 2026 14:05:04 +0000 (16:05 +0200)]
model: tag ffn_latent as MUL_MAT to fix buft probe (#23664)

ffn_latent_down/up are declared GGML_OP_MUL in LLM_TENSOR_INFOS but
nemotron-h feeds them through ggml_mul_mat. The loader buft probe asks
the backend about the declared op, so it tested an elementwise MUL on a
q8_0 weight. That used to return true unconditionally and the weight
stayed on GPU by luck. Once supports_op told the truth, the probe got a
no and the loader pushed the weight and its matmul to CPU, splitting the
graph. Tagging it MUL_MAT asks the real question, the math is unchanged.

Verified on Nemotron 3 Super 120B Q5_K_M: from 64.9 back to 103.22 t/s.

3 months agoCUDA: add fast walsh-hadamard transform (#23615)
Aman Gupta [Mon, 25 May 2026 13:12:10 +0000 (21:12 +0800)]
CUDA: add fast walsh-hadamard transform (#23615)

* CUDA: add fast walsh-hadamard transform

* review: add unrolls + change size_t -> int

* warp size 64

---------

Co-authored-by: Johannes Gäßler <redacted>
3 months agoui: fix stop/continue during an agentic loop (#23356)
Pascal [Mon, 25 May 2026 12:18:59 +0000 (14:18 +0200)]
ui: fix stop/continue during an agentic loop (#23356)

3 months agoconvert : add compressed-tensors NVFP4 support (#21095)
Michael Wand [Mon, 25 May 2026 12:16:11 +0000 (08:16 -0400)]
convert : add compressed-tensors NVFP4 support  (#21095)

* Refactored Compressed Tensors NVFP4 support for new base.py

* Support compressed-tensors NVFP4 conversion

* Moved Qwen MTP remap into filter_tensors

* simplify

* pathlib no longer used

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agosync : ggml
Georgi Gerganov [Mon, 25 May 2026 09:42:28 +0000 (12:42 +0300)]
sync : ggml

3 months agoggml : bump version to 0.13.0 (ggml/1510)
Georgi Gerganov [Mon, 25 May 2026 09:40:17 +0000 (12:40 +0300)]
ggml : bump version to 0.13.0 (ggml/1510)

3 months agosync : ggml
Georgi Gerganov [Mon, 25 May 2026 09:33:22 +0000 (12:33 +0300)]
sync : ggml

3 months agoggml : bump version to 0.12.1 (ggml/1508)
Georgi Gerganov [Mon, 25 May 2026 09:13:21 +0000 (12:13 +0300)]
ggml : bump version to 0.12.1 (ggml/1508)

3 months agoggml.h: correct ggml_silu_back arg docstring (a=dy, b=x) (ggml/1500)
Ori Pekelman [Thu, 21 May 2026 12:00:16 +0000 (12:00 +0000)]
ggml.h: correct ggml_silu_back arg docstring (a=dy, b=x) (ggml/1500)

3 months agoggml-alloc: fix out-of-bounds read in ggml_dyn_tallocr_remove_block (ggml/1492)
Dev-X25874 [Thu, 21 May 2026 11:58:08 +0000 (17:28 +0530)]
ggml-alloc: fix out-of-bounds read in ggml_dyn_tallocr_remove_block (ggml/1492)

3 months agoTP: fix ggml context size calculation (#22616)
Johannes Gäßler [Mon, 25 May 2026 09:37:25 +0000 (11:37 +0200)]
TP: fix ggml context size calculation (#22616)

* TP: fix ggml context size calculation, memory leak

* move split state cache back into the context

* revert to constant ggml context size for cgraphs

* increase headroom for statically allocated tensors

* remove obsolete include

3 months agoggml: `gguf_init_from_callback` and `gguf_init_from_buffer` (#22341)
Gilad S. [Mon, 25 May 2026 09:33:29 +0000 (11:33 +0200)]
ggml: `gguf_init_from_callback` and `gguf_init_from_buffer` (#22341)

* ggml: implement `gguf_init_from_buffer`

* test: `gguf_init_from_buffer`

* fix: memory breakdown for a model loaded with `no_alloc` from a file is consistent with being loaded from a buffer

* fix: use `GGML_UNUSED`

Co-authored-by: Copilot <redacted>
* fix: remove `total_size` from `gguf_reader`

* fix: file offset calculation, rename `offset` to `data_offset`

Co-authored-by: Copilot <redacted>
* refactor: extract model loader bug fixes to another PR

* feat: add `gguf_init_from_callback`

* fix: always require a max expected size

* fix: change `gguf_reader_callback_t`'s `output` type to `void *`, change `max_expected_size` and offsets to `uint64_t`

* fix: harden against offset overflow in buffer read

* fix: remove seek behavior from the callback

* feat: `max_chunk_read == 0` means `SIZE_MAX`

* fix: seeking in a gguf file with no tensors

---------

Co-authored-by: Copilot <redacted>
3 months agoserver: MTP layer kv-cache should respect draft type ctk (#23646)
Aman Gupta [Mon, 25 May 2026 08:46:23 +0000 (16:46 +0800)]
server: MTP layer kv-cache should respect draft type ctk (#23646)

3 months agoci : update spacemit toolchain url and enhance curl command (#23642)
alex-spacemit [Mon, 25 May 2026 08:43:24 +0000 (16:43 +0800)]
ci : update spacemit toolchain url and enhance curl command (#23642)

* fix(action): update SpacemiT toolchain URL and version

Change-Id: If4cc1c738a855274103f8c3ad52daa33528acd0c

* fix(action): add -L flag to curl command for URL redirection

Change-Id: I9b6c37390f0c7a733a36308c8fb53d22d234ab06

3 months agoci : fix pre-tokenizer-hashes check (#23651)
Sigbjørn Skjæret [Mon, 25 May 2026 08:41:25 +0000 (10:41 +0200)]
ci : fix pre-tokenizer-hashes check (#23651)

3 months agollama : document that only one on-device state can be saved per sequence (#23520)
Tim Neumann [Mon, 25 May 2026 07:29:28 +0000 (09:29 +0200)]
llama : document that only one on-device state can be saved per sequence (#23520)

3 months agoci : install host compiler on android-ndk build (#23630)
Aldehir Rojas [Mon, 25 May 2026 07:18:08 +0000 (03:18 -0400)]
ci : install host compiler on android-ndk build (#23630)

3 months agoggml : Parallelize quant LUT init (#23595)
Jeff Bolz [Mon, 25 May 2026 07:15:46 +0000 (02:15 -0500)]
ggml : Parallelize quant LUT init (#23595)

- Use OpenMP to parallelize iq2xs_init_impl and iq3xs_init_impl.
- Move the OpenMP detection from ggml-cpu to ggml-base.
- Update OpenMP dependencies in ggml-config.cmake.in.

3 months agoui: media attachments before text (#23467)
Saba Fallah [Mon, 25 May 2026 06:50:41 +0000 (08:50 +0200)]
ui: media attachments before text (#23467)

* ui: media attachments before text

* fix prettier formatting

3 months agovendor : update cpp-httplib to 0.45.1 (#23639)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Mon, 25 May 2026 06:45:22 +0000 (03:45 -0300)]
vendor : update cpp-httplib to 0.45.1 (#23639)

3 months agoserver: fix checkpoints creation (#22929)
jacekpoplawski [Mon, 25 May 2026 05:56:18 +0000 (07:56 +0200)]
server: fix checkpoints creation (#22929)

* common : add common_chat_split_by_role

* cont : fix spans to reach end of message

* server: fix checkpoints creation

- extract message_spans from chat templates
- find the prompt token position before the latest user message
- split prompt batching at that position
- create a context checkpoint before the latest user input
- avoid periodic mid-prompt checkpoints when that position is known
- handle multimodal prompts when mapping text/template positions to server prompt tokens
- add --checkpoint-min-step to control minimum spacing between checkpoints

* cont : clean-up

* Support autoparser detection for message barriers

* server: fix message span delimiter and update docs

---------

Co-authored-by: Alde Rojas <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Piotr Wilkin <redacted>
3 months agoperplexity : fix even more integer overflows (#23623)
fairydreaming [Mon, 25 May 2026 05:12:39 +0000 (07:12 +0200)]
perplexity : fix even more integer overflows (#23623)

Co-authored-by: Stanisław Szymczyk <redacted>
3 months agoci : move most slim jobs to self-hosted runners (#23619)
Georgi Gerganov [Mon, 25 May 2026 05:11:19 +0000 (08:11 +0300)]
ci : move most slim jobs to self-hosted runners (#23619)

* ci : remove tag from build-self-hosted.yml

* ci : slim -> self-hosted

* ci : prevent heavy CPU jobs from running on fast runners

* ci : prevent cmake pkg to run on dedicated fast runners

* ci : try to bump 3.11 -> 3.13

* ci : move lint back to 3.11

* ci : back to 3.11

* ci : add comment about UI jobs

* ci : move python requirements check to CPU runners

this job is a bit slow for a dedicated "fast" runner

* ci : add self-hosted ui workflow

* ci : fix UI naming

* tmp to check if arm64 fast is compatible with all jobs

* revert last commit

3 months agoci : update build-self-hosted.yml (#23616)
Georgi Gerganov [Sun, 24 May 2026 15:20:10 +0000 (18:20 +0300)]
ci : update build-self-hosted.yml (#23616)

3 months agoconvert : minor fixes for numpy 2.x (#23571)
Sigbjørn Skjæret [Sun, 24 May 2026 07:51:31 +0000 (09:51 +0200)]
convert : minor fixes for numpy 2.x (#23571)

3 months agocmake : fix ui build (#23592)
Aldehir Rojas [Sun, 24 May 2026 07:37:28 +0000 (03:37 -0400)]
cmake : fix ui build (#23592)

* cmake/ui : add -fPIC to llama-ui static lib

* cmake : rename host compiled embed helper

3 months agoserver: add margin for draft model for `fit` (#23485)
Aman Gupta [Sun, 24 May 2026 06:43:08 +0000 (14:43 +0800)]
server: add margin for draft model for `fit` (#23485)

3 months agoTP: fix entirely zero-sized slices per device (#23525)
Johannes Gäßler [Sun, 24 May 2026 06:19:33 +0000 (08:19 +0200)]
TP: fix entirely zero-sized slices per device (#23525)

3 months agoopencl: batch profiling to improve speed and prevent memory leaks (#23495)
shaofeiqi [Sun, 24 May 2026 06:11:43 +0000 (23:11 -0700)]
opencl: batch profiling to improve speed and prevent memory leaks (#23495)

3 months agohexagon: apply repl optimization in flash attn softmax as #22993 (#23455)
Yiwei Shao [Sun, 24 May 2026 02:56:59 +0000 (19:56 -0700)]
hexagon: apply repl optimization in flash attn softmax as #22993 (#23455)

3 months agosnapdragon: update windows toolchain to use hsdk v6.6.0.0 (#23552)
Aparna M P [Sun, 24 May 2026 02:56:41 +0000 (08:26 +0530)]
snapdragon: update windows toolchain to use hsdk v6.6.0.0 (#23552)

3 months agocmake/ui : refactor the build (#23352)
Aldehir Rojas [Sat, 23 May 2026 21:08:22 +0000 (17:08 -0400)]
cmake/ui : refactor the build (#23352)

3 months agorequirements : bump torch to 2.11.0 (#23503)
Aditya Singh [Sat, 23 May 2026 16:24:39 +0000 (09:24 -0700)]
requirements : bump torch to 2.11.0 (#23503)

* requirements: relax torch~=2.6.0 to torch>=2.6.0 for convert_hf_to_gguf

The ~=2.6.0 operator resolves to >=2.6.0, <2.7.0, which fails on
PyPI for platform/CPython combinations where 2.6.x is not present.
The accompanying comment already says 'PyTorch 2.6.0 or later', so
the looser >=2.6.0 matches the documented intent and unblocks
pip install -r requirements/requirements-convert_hf_to_gguf.txt.

Fixes #23408

* requirements: bump torch floor to 2.11.0 per maintainer

* requirements: pin torch to ==2.11.0 per project policy

* requirements: pin mtmd torch and torchvision to 2.11.0/0.26.0 per project policy

* requirements: suppress check_requirements pin warning on mtmd

The check_requirements script flags '==' on lines in files matched by
*/**/requirements*.txt. Append the documented suppression comment to the
pinned torch and torchvision lines (and to the s390x platform marker lines)
so the check passes while keeping the pins required by project policy.

* ty: silence Tensor/Module union check on model[0].auto_model

With torch 2.11.0 stubs, nn.Sequential.__getitem__ now returns
Tensor | Module rather than Module, so model[0].auto_model fails ty
on the SentenceTransformer code path. The runtime behavior is
unchanged because SentenceTransformer always wraps a Module at
index 0. Adding a targeted unresolved-attribute ignore keeps the
type-check green without altering behavior. A follow-up issue
tracks typing the variable explicitly.

3 months agomodel : add NVFP4 MTP scale tensors (#23563)
Michael Wand [Sat, 23 May 2026 11:30:31 +0000 (07:30 -0400)]
model : add NVFP4 MTP scale tensors (#23563)

* Add NVFP4 MTP scale tensors

* Link Qwen3.5 MTP tensors

* Aligned nullptr

3 months agoggml : Check the right iface method before using the fallback 2d get (#23514)
dskwe [Sat, 23 May 2026 10:49:24 +0000 (18:49 +0800)]
ggml : Check the right iface method before using the fallback 2d get (#23514)

3 months agovulkan: fix windows find_package of SPIRV-Headers (#23215)
Jeff Bolz [Sat, 23 May 2026 07:44:46 +0000 (02:44 -0500)]
vulkan: fix windows find_package of SPIRV-Headers (#23215)

* vulkan: fix windows find_package of SPIRV-Headers

* not windows-only

3 months agoopencl: generalize Adreno MoE kernels on M (#23449)
Shawn Gu [Sat, 23 May 2026 00:08:41 +0000 (17:08 -0700)]
opencl: generalize Adreno MoE kernels on M (#23449)

3 months agoserver: only parse empty msg if continuing an assistant msg (#23506)
Aldehir Rojas [Fri, 22 May 2026 15:58:15 +0000 (11:58 -0400)]
server: only parse empty msg if continuing an assistant msg (#23506)

3 months agoperplexity : fix integer overflow (#23496)
fairydreaming [Fri, 22 May 2026 12:50:44 +0000 (14:50 +0200)]
perplexity : fix integer overflow (#23496)

Co-authored-by: Stanisław Szymczyk <redacted>
3 months agoSYCL: improve MoE prefill throughput (#23142)
Alexey Kopytko [Fri, 22 May 2026 12:50:17 +0000 (21:50 +0900)]
SYCL: improve MoE prefill throughput (#23142)

- change `k_copy_src1_to_contiguous` so that uses a precomputed contiguous mapping where all rows "owned" by an expert are in one slice with a know starts and ends
- switch the `O(n_as * n_routed_rows)` contraption to a counting sort-based procedure with `O(n_as + n_routed_rows)` complexity

3 months agosycl : Level Zero detection in ggml_sycl_init (#23097)
Alexey Kopytko [Fri, 22 May 2026 12:49:45 +0000 (21:49 +0900)]
sycl : Level Zero detection in ggml_sycl_init (#23097)

* [SYCL] Centralize Level Zero detection in ggml_sycl_init

* use the same wording

* get back the warning

3 months agoSYCL : gated_delta_net K>1 (#23174)
karavayev [Fri, 22 May 2026 12:48:56 +0000 (08:48 -0400)]
SYCL : gated_delta_net K>1 (#23174)

* sycl_gated_delta_net K>1

* editor_config

3 months agoSYCL: add BF16 to DMMV kernel path (~4x tg speedup on Intel Arc) (#21580)
Katostrofik [Fri, 22 May 2026 12:48:24 +0000 (08:48 -0400)]
SYCL: add BF16 to DMMV kernel path (~4x tg speedup on Intel Arc) (#21580)

* SYCL: add BF16 to DMMV kernel path for ~4x token generation speedup

BF16 models had no dedicated token generation kernel — they fell through
to the generic full-GEMM path, resulting in ~14% memory bandwidth
utilization on Intel Arc GPUs. This adds BF16 support to the DMMV
(dequantize mul-mat-vec) path, matching the existing F16 implementation.

Fixes #20478

* SYCL: fix BF16 DMMV out-of-bounds when ncols % 64 != 0

The qk=1 kernel (used for F16 and BF16) iterates with stride
2*GGML_SYCL_DMMV_X (= 64 on Intel targets where WARP_SIZE=16). When
ncols is a multiple of DMMV_X (32) but not of 2*DMMV_X (64), the last
warp iteration accesses elements at col >= ncols, producing NaN for the
final row and wrong values for interior rows.

Fix: tighten can_use_dequantize_mul_mat_vec to require ne[0] %
(2*DMMV_X) == 0 for F16/BF16 types, and update the ASSERT in the BF16
launcher to match. Quantized types use block-structured kernels with
different access patterns and keep the existing DMMV_X check.

Verified: test-backend-ops MUL_MAT passes 913/913 on Intel Arc Pro B70.
Previously failing: m=128/129 n=1 k=1056 cases (NaN and ERR > 0.0005).

Co-Authored-By: Claude Sonnet 4.6 <redacted>
---------

Co-authored-by: Claude Sonnet 4.6 <redacted>
3 months agodocs: Update documentation with Granite 4.0/4.1 (#23404)
Jesus Talavera [Fri, 22 May 2026 12:35:46 +0000 (14:35 +0200)]
docs: Update documentation with Granite 4.0/4.1 (#23404)

3 months agoggml-zendnn : add Q8_0 quantization support (#23414)
Sachin Sharma [Fri, 22 May 2026 11:16:55 +0000 (16:46 +0530)]
ggml-zendnn : add Q8_0 quantization support (#23414)

* ggml-zendnn : add Q8_0 quantization support

* ggml-zendnn : sync with latest ZenDNN

* ggml-zendnn : address review comments for Q8_0

3 months agocmake : build router app only during standalone builds (#23521)
fairydreaming [Fri, 22 May 2026 09:55:29 +0000 (11:55 +0200)]
cmake : build router app only during standalone builds (#23521)

Co-authored-by: Stanisław Szymczyk <redacted>
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