]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/log
pkg/ggml/sources/whisper.cpp
2 months agotalk-llama : sync llama.cpp
Georgi Gerganov [Fri, 19 Jun 2026 07:19:58 +0000 (10:19 +0300)]
talk-llama : sync llama.cpp

2 months agosync : ggml
Georgi Gerganov [Fri, 19 Jun 2026 07:19:47 +0000 (10:19 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.2 (ggml/1548)
Georgi Gerganov [Fri, 19 Jun 2026 07:14:26 +0000 (10:14 +0300)]
ggml : bump version to 0.15.2 (ggml/1548)

2 months agoggml-cpu: support K tails in power10 Q8/Q4 MMA matmul (llama/24753)
shalinib-ibm [Fri, 19 Jun 2026 05:55:38 +0000 (11:25 +0530)]
ggml-cpu: support K tails in power10 Q8/Q4 MMA matmul (llama/24753)

* ggml-cpu: support K tails in Power10 MMA Q8/Q4 matmul

This patch removes the requirement that K be divisible by kc in the tinyBlas_Q0_PPC tiled matmul path. Process the final K panel using its actual depth and pass the reduced panel size through packing and kernel execution.  This allows more workloads to use the MMA kernel and reduces fallback to mnpack.

* Apply suggestion from @taronaeo

Co-authored-by: Aaron Teo <redacted>
---------

Co-authored-by: Aaron Teo <redacted>
2 months agoGgml/cuda col2im 1d (llama/24417)
Pascal [Thu, 18 Jun 2026 20:23:01 +0000 (22:23 +0200)]
Ggml/cuda col2im 1d (llama/24417)

* cuda: add GGML_OP_COL2IM_1D, follow-up to the CPU op

* cuda: col2im_1d use fast_div_modulo for the index decomposition

* cuda: col2im_1d tighten supports_op, type match and contiguous dst

2 months agohexagon: support for op-trace (fine-grain tracing of HVX/HMX/DMA events) (llama/24592)
Max Krasnyansky [Thu, 18 Jun 2026 15:35:02 +0000 (08:35 -0700)]
hexagon: support for op-trace (fine-grain tracing of HVX/HMX/DMA events) (llama/24592)

* hex-optrace: add support for optrace and instrument matmul and flash-atten code

* hex-trace: improve trace event and prefetto generator

* hex-trace: add new script dedicated to handling traces, specifically perfetto traces

* hex-trace: add --head/--tail options to profile and trace tools

* hex-trace: fix whitespaces

* hex-trace: fix flake8 warnings

* hex-trace: fix flake8 warnings

* hmx-fa: restore q_tiles clearing

* hex-profile: remove circular dep in includes

* hex-trace: simplify trace sizing check

* hex-profile: sort events in the summary by name

2 months agorename GGML_SYCL_SUPPORT_LEVEL_ZERO (llama/24719)
Neo Zhang [Thu, 18 Jun 2026 08:18:26 +0000 (16:18 +0800)]
rename GGML_SYCL_SUPPORT_LEVEL_ZERO (llama/24719)

* rename GGML_SYCL_SUPPORT_LEVEL_ZERO to GGML_SYCL_SUPPORT_LEVEL_ZERO_API, and GGML_SYCL_ENABLE_LEVEL_ZERO to  GGML_SYCL_USE_LEVEL_ZERO_API

* fix code format

* fix error when rebase

2 months agosycl : support MUL_MAT and OUT_PROD with Q1_0 (llama/24721)
Neo Zhang [Thu, 18 Jun 2026 08:17:37 +0000 (16:17 +0800)]
sycl : support MUL_MAT and OUT_PROD with Q1_0 (llama/24721)

2 months agosupport OPs: conv_2d, conv_2d_dw, conv2d_transpose (llama/24600)
Neo Zhang [Thu, 18 Jun 2026 06:40:03 +0000 (14:40 +0800)]
support OPs: conv_2d, conv_2d_dw, conv2d_transpose (llama/24600)

* fix conflict

* fix format issue, rename

* rm debug code

* correct the file name

2 months agometal : check for BF16 support in concat kernel (llama/24747)
Georgi Gerganov [Thu, 18 Jun 2026 06:16:06 +0000 (09:16 +0300)]
metal : check for BF16 support in concat kernel (llama/24747)

2 months agoggml-cpu: Conditionally enable power11 backend based on compiler support (llama/24687)
shalinib-ibm [Wed, 17 Jun 2026 18:45:19 +0000 (00:15 +0530)]
ggml-cpu: Conditionally enable power11 backend based on compiler support (llama/24687)

* ggml: Conditionally enable power11 backend based on compiler support

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

* Update CMakeLists.txt

ggml-cpu: Use -mcpu=power10 for P10 and P11

2 months agometal : implement rope_back operator (llama/24725)
Georgi Gerganov [Wed, 17 Jun 2026 17:36:05 +0000 (20:36 +0300)]
metal : implement rope_back operator (llama/24725)

Reuse existing rope kernels with a function constant to toggle forward/backward
rotation, avoiding duplicate kernel code.

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agometal : add f16 and bf16 support for concat operator (llama/24724)
Georgi Gerganov [Wed, 17 Jun 2026 16:38:55 +0000 (19:38 +0300)]
metal : add f16 and bf16 support for concat operator (llama/24724)

* metal : add f16 and bf16 support for concat operator

Extend the Metal backend concat operator to support f16 and bf16 tensor
types in addition to the existing f32 and i32 support.

- Template kernel_concat on type T with specializations for float, half,
  bfloat, and int
- Add type-specific pipeline getter ggml_metal_library_get_pipeline_concat()
- Update device support check to allow f16 unconditionally and bf16 when
  device supports bfloat16
- Update dispatch to select the correct kernel specialization by type

Assisted-by: pi:llama.cpp/Qwen3.6-27B
* metal : extend concat operator to support f16, bf16, i8, i16 and i64

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agoadd dev2dev memcpy by SYCL API (llama/24476)
Neo Zhang [Wed, 17 Jun 2026 14:21:34 +0000 (22:21 +0800)]
add dev2dev memcpy by SYCL API (llama/24476)

* add dev2dev memcpy by SYCL API

* mv GGML_SYCL_DEV2DEV_MEMCPY to runntime table

* update the detect method for p2p comm

* fix the erro created during fix confilct

---------

Co-authored-by: Neo Zhang <NA>
2 months agoAdd conv_3d (llama/24691)
Neo Zhang [Wed, 17 Jun 2026 14:20:01 +0000 (22:20 +0800)]
Add conv_3d (llama/24691)

* add conv_3d

* optimize

* update ops.md

* restore test script

* rm unused code

* rm copyright notes

2 months agovulkan: record actual memory properties during buffer creation (llama/24326)
Winston Ma [Wed, 17 Jun 2026 09:14:48 +0000 (17:14 +0800)]
vulkan: record actual memory properties during buffer creation (llama/24326)

2 months agoRevert "cuda: reset cuda context after reading memory size (llama/23935)" (llama...
Ruben Ortlam [Wed, 17 Jun 2026 08:59:35 +0000 (10:59 +0200)]
Revert "cuda: reset cuda context after reading memory size (llama/23935)" (llama/24715)

This reverts commit 0f7fada56bea32c9e0db3874b801d887ff6c4529.

2 months agoci: fix vulkan docker images (llama/24595)
kononnable [Wed, 17 Jun 2026 07:43:45 +0000 (09:43 +0200)]
ci: fix vulkan docker images (llama/24595)

* Update vulkan-shaders-gen.cpp

* Update vulkan-shaders-gen.cpp

add comment describing code change intention

* Update vulkan-shaders-gen.cpp

fix potential UB

2 months agoopencl: optimize mul_mat_f16_f32_l4 for decode (llama/24504)
lhez [Wed, 17 Jun 2026 06:21:26 +0000 (23:21 -0700)]
opencl: optimize mul_mat_f16_f32_l4 for decode (llama/24504)

2 months agoopenvino: OV 2026.2, context-shift, Q5_1 support, gemma4 dense/embedding, and -fa...
Zijun Yu [Wed, 17 Jun 2026 06:11:21 +0000 (14:11 +0800)]
openvino: OV 2026.2, context-shift, Q5_1 support, gemma4 dense/embedding, and -fa off (llama/24503)

* Add interface is_model_splitted() to check the c-graph is splited or not

* Infer and propagate dynamic-dimension indices for all tensors in the GGML graph in api compute_model_outputs()

* Only do this for fallback sub graph

* Move dynamic dims compute in graph missmatch

* ggml-openvino: fix tensor data handling for PERMUTE/VIEW ops in split models

* ggml-openvino:add comments

* ggml-openvino: override VIEW op_case to 0 for split model inputs

* openvino backend: Handle unsupported VIEW shape-mismatch in OpenVINO backend

* Enable additional mul_mat tests and add tensor data saving function (llama/81)

* ggml-openvino: fix CONT/TRANSPOSE mapping and improve dynamic-dimension handling

* OpenVINO: add NORM/TANH support and rework SOFT_MAX translation

* ggml-openvino: extend VIEW handling

* Enable -fa off (llama/118)

* Enable --context-shift

* Fix llm param compute error for normal softmax not the softmax in attention

* OpenVINO backend: fix error for attention size compute in llm param

* use tensor->extra in infer_request i/o

* OpenVINO backend: refacter the compute_llm_params() func add get_attention_pattern_case to easy extand

* OpenVINO backend: clean unused code

* 1to1 match op update (llama/146)

* added translate_1to1_match_1_input function and updated gelu and tanh translations

* Remove unused translation function calls

---------

Co-authored-by: Mustafa Cavus <redacted>
* initial gemma4 support

* removed hardcoded names for kv cache slicing

* OpenVINO backend: Add new attention pattern for llm parameters compute

* flash attn Q shape static conversion

* Remove slice in permute translation when n_seq is 1

* return optional in extract_layer_from_name

* OpenVINO backend: refactor VIEW related operation (llama/148)

* OpenVINO backend: refactor VIEW related operation

* Enable VIEW handling in following ops

* OpenVINO backend does not support GGML_OP_NORM & GGML_OP_L2_NORM with VIEW input accuracy issue from OpenVINO

* OpenVINO backend: Add ops l2_norm & pad

* OpenVINO backend does not support CPY with non-contiguous data or mismatched types

* add op SSM_CONV GATED_DELTA_NET

* OpenVINO backend: fix error for bf16 in OV gpu plugin

* reverted static Q input shape for attention layer

* OpenVINO backend: remove hardcode name inp_tokens, which ignore some leaf case

* Disable remote tensor due to bug in ov gpu

* Disable n_token > 1 GATED_DELTA_NET on gpu

* OpenVINO backend: fix the view op dynamic handling issue in gemma4 & enable view + get_row

* OpenVINO backend: clean code

* OpenVINO backend: enable view + norm/rms_norm

* OpenVINO backend: concat op

* OpenVINO backend: argsort op

* OpenVINO backend: enable unary + view & GGML_UNARY_OP_SOFTPLUS

* Fix issue for test-backend-ops in TOPK_MOE, which compare VIEW ops result, VIEW node in OpenVINO no need compare, the whole graph result is correct

* OpenVINO backend: enable sum_rows

* OpenVINO backend: enable clamp

* OpenVINO backend: enable DIV

* OpenVINO backend: enable GGML_OP_MUL_MAT_ID

* OpenVINO backend: disable MUL_MAT_ID_FUSION case with large mem needed

* OpenVINO backend: Disable GGML_OP_ARGSORT, cause test_backend-ops failed

* OpenVINO backend: fix issue in mul_mat_id

* OpenVINO backend: Disable DIV with broadcast on GPU

* OpenVINO backend: update DIV

* use ov internal op GatedDeltaNet

* OpenVINO backend: enable llama erch test qwen3next

* OpenVINO backend: enable RMS_NORM + VIEW & remove op_case 2 for rope

* OpenVINO backend: fix error

* suggested changes, need review

* suggested changes, need review

* OpenVINO backend: clean unused code & fix build warning

* OpenVINO backend: enable minicpm3 for arch test

* Disable GDN op (llama/177)

* disable gated_delta_net

* update stateful_kv_size correctly in mismatch case

* OpenVINO backend: enable arch test for qwen3vl

* OpenVINO backend: enable cohere2 for arch test

* OpenVINO backend: enable t5 for arch test

* OpenVINO backend: enable jamba for arch test

* OpenVINO backend: remove warning for tmp

* OpenVINO backend: enable kimi-linear for arch test

* Remove unused

* Fix gpt-oss accuracy issue

* OpenVINO backend: enable arctic for arch test

* OpenVINO backend: enable grok for arch test

* Gemma4 initial npu support (llama/179)

* Initiall gemma4 npu support

* temp. fix for gemma4 accuracy bug on npu

* Remove hardcoded names for npu-fold handling

* revert static n tokens for cont translation as it is not needed

* removed unused variable

* ggml-openvino: add GGML_OPENVINO_ENABLE_CACHE env var to control decoder cache. Add environment variable GGML_OPENVINO_ENABLE_CACHE (default: YES). When set to NO, the decoder_cache is bypassed and models are rebuilt from the cgraph on every inference call in both dynamic and static compute paths. This is useful for debugging and verifying correctness without caching interference.

* Revert "Gemma4 initial npu support (#179)"

This reverts commit 0d29a9c4a52dc2c8aa52990f1a3854cfb01768ad.

* OpenVINO backend: disable debug log print

* Update TBB discovery. Delegated to OpenVINOs own config.

* OpenVINO backend: GGML_OPENVINO_ENABLE_CACHE YES -> 1

* OpenVINO backend: fallback FLASH_ATTN_EXT in gemma3n to CPU backend

* Add raw ov infer profiling metric

* Add OV raw infer time metric to static compute path

Co-authored-by: virajwad <redacted>
* Modify precision of static profiling

* update to OV 2026.2, add OV windows CI

* fix editorconfig-checks

* Initiall gemma4 npu support

* temp. fix for gemma4 accuracy bug on npu

* Remove hardcoded names for npu-fold handling

* revert static n tokens for cont translation as it is not needed

* removed unused variable

* test-llama-archs fix

* Fix gemma4 flash_attn fallback

* support im2col

* fix code style

* disable add_rope_sin_cos optimization

* stateless boradcast and rope optimizations

* Enable manual gqa attn by default for stateless gpu

* manual gqa: fixed static batch

* gemma4 llama-bench ctx update fix

* Update OV win CI

* stateful rope fusion temp. fix

* OpenVINO backend: Conslolidate supported ops

* Exclude unsupported GGML_OP_SUB cases

* Exclude unsupported TOPK_MOE cases

* OpenVINO Backend: MUL_MAT enhancements

* Update OV CI

* support f16 mask input for npu

* Make GGML_OPENVINO_* env vars usage uniform

Standardize all GGML_OPENVINO_* env flags:
positive integers >0 to enable. Unset, empty, =0, or non-numeric values to disable.
This fixes cases where text values or empty strings enabled features.

* OpenVINO backend: Enhance envvar handling

* more cleanup

* move ggml_openvino_env_flag to appropriate place

* OpenVINO backend: add REPEAT translator, Q5_1 weights, and GLU view-input fix

* ggml-openvino: fix -Werror=cast-qual in extract_q5_1_data

* Update openvino.Dockerfile

Use BuildKit cache mounts for faster Docker rebuilds.
Use apt instead of dpkg, remove unused .ddeb downloads, add DLLAMA_BUILD_TESTS=OFF.

* ggml-openvino: centralize env var access via *getenv_str/getenv_int helpers

Replace getenv and legacy flags with _str and _int helpers.Minor cleanup, doc updates.

* OpenVINO backend: Enable GGML_OP_ADD_ID

* Uptade openvino backend clamg-format

* clang-format

* Update OPENVINO.md (llama/211)

* OpenVINO backend: fix accuracy issue for op CONCAT with i64 precision

* Remove strict concurrency for gpu-openvino-low-perf

* Update openvino CI keynames; add ccache-clear

* Apply suggestions from code review

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

---------

Co-authored-by: Xuejun Zhai <redacted>
Co-authored-by: Mustafa Cavus <redacted>
Co-authored-by: Mustafa Cavus <redacted>
Co-authored-by: Xuejun <redacted>
Co-authored-by: Wang Yang <redacted>
Co-authored-by: Ravi Panchumarthy <redacted>
Co-authored-by: virajwad <redacted>
Co-authored-by: copilot-swe-agent[bot] <redacted>
Co-authored-by: Mostafa Faheem <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agosycl : Enable to support fp16 by OPs: SQR, SQRT, LOG, SIN, COS, CLAMP (llama/24692)
Neo Zhang [Wed, 17 Jun 2026 05:58:03 +0000 (13:58 +0800)]
sycl : Enable to support fp16 by OPs: SQR, SQRT, LOG, SIN, COS, CLAMP (llama/24692)

2 months agoSYCL: fix use-after-free bug with async memcpy in MoE prefill (llama/24676)
Alexey Kopytko [Wed, 17 Jun 2026 05:57:29 +0000 (14:57 +0900)]
SYCL: fix use-after-free bug with async memcpy in MoE prefill (llama/24676)

* SYCL: fix a bug with async memcpy

* make mmid_row_mapping_host persistent

* comment on stream->wait

* Apply suggestion from @sanmai

* Apply suggestion from @sanmai

* Apply suggestion from @sanmai

2 months agosycl: Add optional USM system allocations (llama/22526)
Francois Dugast [Wed, 17 Jun 2026 05:54:21 +0000 (07:54 +0200)]
sycl: Add optional USM system allocations (llama/22526)

This introduces an optional feature to allocate large GPU buffers (≥ 1GB)
using USM system allocations if supported by the device. It allows using
buffers from the system allocator then letting the system manage memory
migrations between host and device as necessary.

This feature is disabled by default and requires the GGML_SYCL_USM_SYSTEM
environment variable to enable. If USM system allocations are not supported
by the device or the system, we fallback to regular allocations.

This feature can allow VRAM overcommit. For example, the test below fails
on B580 due to lack of memory for allocation, but it passes when enabling
USM system allocations:

  ./examples/sycl/test.sh -m Qwen3.5-27B-Q3_K_M.gguf -lv 4

Signed-off-by: Francois Dugast <redacted>
2 months agovulkan: prefer host-visible memory buffers on UMA devices (llama/22930)
Winston Ma [Tue, 16 Jun 2026 07:36:52 +0000 (15:36 +0800)]
vulkan: prefer host-visible memory buffers on UMA devices (llama/22930)

* implement UMA host-visible memory

* update based on 0cc4m's suggestion

2 months agovulkan: Support gated_delta_net with S_v=16 (llama/24581)
Jeff Bolz [Tue, 16 Jun 2026 07:26:57 +0000 (02:26 -0500)]
vulkan: Support gated_delta_net with S_v=16 (llama/24581)

2 months agosycl: support reordered Q4_K/Q5_K/Q6_K MoE MUL_MAT_ID (llama/24452)
Frosty40 [Tue, 16 Jun 2026 05:35:00 +0000 (00:35 -0500)]
sycl: support reordered Q4_K/Q5_K/Q6_K MoE MUL_MAT_ID (llama/24452)

* sycl: support reordered Q4_K and Q5_K MoE MUL_MAT_ID

Extend reordered-weight handling to fused MoE MUL_MAT_ID for Q4_K and Q5_K expert tensors and add Q5_K reordered DMMV coverage. Unsupported 3D reorder cases now fall back instead of aborting.

* sycl: extend MoE reorder to Q6_K mul_mat_id

2 months agoSupport OP EXPM1, support all UT cases of FLOOR, TRUNC, ROUND (llama/24363)
Neo Zhang [Tue, 16 Jun 2026 05:34:29 +0000 (13:34 +0800)]
Support OP EXPM1, support all UT cases of FLOOR, TRUNC, ROUND (llama/24363)

* support OP EXPM1, support all UT cases of FLOOR, TRUNC, ROUND

* fix conflict

* rebase, support new UT case of repeat, concat

2 months agovulkan: add col2im_1d op (llama/24425)
Pascal [Tue, 16 Jun 2026 04:34:43 +0000 (06:34 +0200)]
vulkan: add col2im_1d op (llama/24425)

* vulkan: add GGML_OP_COL2IM_1D, follow-up to the CPU op

* vulkan: col2im_1d bounded gather loop instead of full-K scan with modulo

* vulkan: col2im_1d address review from @jeffbolznv

* vulkan: col2im_1d return nullptr for unsupported types, address review from @0cc4m

2 months agovulkan: support more CONCAT types (llama/24579)
Jeff Bolz [Mon, 15 Jun 2026 11:19:21 +0000 (06:19 -0500)]
vulkan: support more CONCAT types (llama/24579)

2 months agowasm : fix fallback symbol collision (llama/24639)
Andrei [Mon, 15 Jun 2026 07:11:59 +0000 (00:11 -0700)]
wasm : fix fallback symbol collision (llama/24639)

2 months agoSYCL: use native subgroup size for K-quant DMMV (llama/21700)
Katostrofik [Mon, 15 Jun 2026 07:10:53 +0000 (03:10 -0400)]
SYCL: use native subgroup size for K-quant DMMV (llama/21700)

2 months agosycl: fix soft_max_f32 max reduction (llama/24451)
someoneinjd [Mon, 15 Jun 2026 07:10:12 +0000 (15:10 +0800)]
sycl: fix soft_max_f32 max reduction (llama/24451)

2 months agosycl : fix reorder function; add fp32/fp16 in build script (llama/24578)
Neo Zhang [Mon, 15 Jun 2026 07:08:34 +0000 (15:08 +0800)]
sycl : fix reorder function; add fp32/fp16 in build script (llama/24578)

2 months agosycl : enhance set_rows to support q1_0, mxfp4, nvfp4 (llama/24564)
Neo Zhang [Mon, 15 Jun 2026 07:01:40 +0000 (15:01 +0800)]
sycl : enhance set_rows to support q1_0, mxfp4, nvfp4 (llama/24564)

2 months agoadd to support pool_1d, move pool_1d/2d code to pool.cpp/hpp (llama/24584)
Neo Zhang [Mon, 15 Jun 2026 07:01:07 +0000 (15:01 +0800)]
add to support pool_1d, move pool_1d/2d code to pool.cpp/hpp (llama/24584)

* add to support pool_1d, move pool_1d/2d code to pool.cpp/hpp

* update ops.md

2 months agoRemove per-allocation Level Zero runtime checks (llama/23399)
Alexey Kopytko [Mon, 15 Jun 2026 06:58:42 +0000 (15:58 +0900)]
Remove per-allocation Level Zero runtime checks (llama/23399)

* [SYCL] Centralize Level Zero detection in ggml_sycl_init

* use the same wording

* get back the warning

* [SYCL] Remove per-allocation getenv() for GGML_SYCL_ENABLE_LEVEL_ZERO

* bring back the comment

* move it up to make sure devices call the shots

* move the env detection early

* replace g_ggml_sycl_enable_level_zero with a direct call to .ext_oneapi_level_zero

* update the comment

* switch back to g_ggml_sycl_enable_level_zero with a sentinel

* remove the check

* Reduce the diff

* reword, move lower

* move things aroudn

* remove forward declaration if favor of a full replace

* pre-cache results of zeDeviceGetProperties

* put ggml_sycl_get_env back

* replace get_sycl_env with ggml_sycl_get_env

* add whitespace back

* Apply suggestion from @sanmai

2 months agometal : add repeat bf16 (llama/24638)
Georgi Gerganov [Mon, 15 Jun 2026 06:57:16 +0000 (09:57 +0300)]
metal : add repeat bf16 (llama/24638)

2 months agoCUDA: only support F32/F16 for GGML_OP_REPEAT (llama/24533)
leonardHONG [Mon, 15 Jun 2026 06:11:00 +0000 (14:11 +0800)]
CUDA: only support F32/F16 for GGML_OP_REPEAT (llama/24533)

2 months agoggml-webgpu: improve i-quants mul_mat performance and speed up prefill (llama/24530)
Masashi Yoshimura [Mon, 15 Jun 2026 01:15:30 +0000 (10:15 +0900)]
ggml-webgpu: improve i-quants mul_mat performance and speed up prefill (llama/24530)

* Improve prefill speeds for i-quants

* Fix #if defined() usage in preprocessor guards.

2 months agovulkan: support non-contig unary/glu ops (llama/24215)
Jeff Bolz [Sat, 13 Jun 2026 13:44:15 +0000 (08:44 -0500)]
vulkan: support non-contig unary/glu ops (llama/24215)

* vulkan: support non-contig unary/glu ops

Change unary/glu ops to pass in all strides and use fastdiv for the index
calculation. Put all unary ops in one file, similar to glu, to share the
code. codex went ahead and added expm1 without me asking, but I had to
make it do a real precision analysis rather than just making stuff up.

unary.comp initially couldn't use generic_unary_head because there wasn't
space for xielu's additional constants. Fixing this required packing the
fastdiv 'L' values.

* attempt to workaround compiler bug

* resolve conflict from #23991

* use expm1

2 months agovulkan: add pipeline barriers for memcpy read operations (llama/23770)
Ruben Ortlam [Fri, 12 Jun 2026 14:43:50 +0000 (16:43 +0200)]
vulkan: add pipeline barriers for memcpy read operations (llama/23770)

* vulkan: add pipeline barriers for memcpy read/write operations

* remove unnecessary host write pipeline barriers

2 months agorelease : v1.9.1 (#3892)
Daniel Bevenius [Fri, 19 Jun 2026 04:12:37 +0000 (06:12 +0200)]
release : v1.9.1 (#3892)

2 months agoci : add GGML_NATIVE=OFF and GGML_BMI2=OFF to windows-blas (#3891)
Daniel Bevenius [Thu, 18 Jun 2026 12:49:08 +0000 (14:49 +0200)]
ci : add GGML_NATIVE=OFF and GGML_BMI2=OFF to windows-blas (#3891)

* ci : add GGML_NATIVE=OFF and build all cpu-variants

This commit adds -DGGML_BACKEND_DL=ON, -DGGML_NATIVE=OFF, and
-DGGML_CPU_ALL_VARIANTS=ON to the releases.

The motivation for this is that currently the Windows BLAS build
uses the native CPU instructions and if target systems do not support
these instructions, the build will fail like the linked issue reports.

Resolves: https://github.com/ggml-org/whisper.cpp/issues/3889

* ci : update ubuntu-cpu release job for all variants [no ci]

This commit enables the ubuntu-cpu job to include all cpu variants and
ensures that the ggml backend libraries are built into the bin directory
similar to how llama.cpp does it.

The following is a build on my fork with this change:
https://github.com/danbev/whisper.cpp/releases/tag/untagged-fc3c71f0bf0f7bf19d19

2 months agorelease : v1.9.0 (#3886)
Daniel Bevenius [Wed, 17 Jun 2026 09:36:57 +0000 (11:36 +0200)]
release : v1.9.0 (#3886)

2 months agoruby : add support for Parakeet (#3885)
KITAITI Makoto [Wed, 17 Jun 2026 04:42:09 +0000 (13:42 +0900)]
ruby : add support for Parakeet (#3885)

* Add Whisper::Parakeet::Params

* Add tests for Parakeet::Params

* Remove unused variabel

* Add callbacks to Parakeet::Params

* Group callback and user_data params

* Undefine local macros

* Define GetParakeetParams

* Remove unused variable

* Use ITERATE_CALLBACK_PARAMS

* Use ITERATE_CALLBACK_PARAMS instead of ITERATE_USER_DATA_PARAMS

* Fix memsize

* Remove unnecessary macros

* Simplify params registration

* Define Parakeet

* Add hook methods to Parakeet::Params

* Fix typo

* Check callback container in GetParakeetParams

* Reduce if

* Free parakeet_full_params

* Implement Parakeet::Context#initialize

* Add TestParakeetContext

* Add Parakeet::Segment

* Prevent double-free

* Add Parakeet::Context#transcribe

* Add Parakeet::Context#each_segment

* Define Parakeet::Segment attributes

* Define Parakeet::Segment#deconstruct_keys

* Add tests for Parakeet::Segment#deconstruct_keys

* Run Parakeet::Context#transcribe without GVL

* Make it to abort for Parakeet

* Add Parakeet.log_set

* Define Parakeet::Token

* Define Parakeet::Segment#each_token

* Implement some hooks of Parakeet::Params

* Convert int to VALUE

* Implement hooks for Parakeet

* Implement Parakeet::Context#full

* Add tests for Parakeet::Context#full

* Add Parakeet to RBS

* Fix ruby_whisper_parakeet_params_free

* Free ruby_whisper_parakeet_context

* Add tests for hooks

* Add Parakeet section to README

* Add more attributes of Parakeet::Context

* Add tests for Parakeet::Context's attributes

* Update RBS

* Register parakeet-tdt-0.6b-v3

* Narrow scope of log constants

* Extract activate and deactivate of log_queue

* Make start_log_callback_thread private

* Don't call start_log_callback_thread unncecessarilly

* Early return from log_queue_enqueue when not active

* Gropu log_queue members

* is_active -> is_open

* Fix English

* Share parakeet full body function

* ruby_whisper_parakeet_abort_callback_user_data -> ruby_whisper_abort_callback_user_data

* NULL check for callback containers

* Fix Parakeet.log_set

* Omit Parakeet tests on CI

* Extract Whisper::LogSettable

* Join log callback thread in a log queue function

* Revert Join log callback thread in a log queue function

* Extract output methods to modules

* Move Parakeet init functions into init_parakeet()

* Add output methods to Parakeet classes

* Add Parakeet's output methods to RBS

* Use Whisper::Output in RBS

* Add LogSettable to RBS

* Fix module Token -> class Token

* Add Parakeet::Model

* Add test for Parakeet::Model

* Add Parakeet::Model to RBS

* Move position of Parakeet::Model in RBS

* Parakeet -> TestBase::Parakeet

* Add Parakeet::Context#model in RBS

* Add Whisper::Output

* Fix nil check

* Define ruby_whisper_parakeet_model_memsize

* Fix order of declaration in ruby_whisper_parakeet_model_get_xxx

* Define Parakeet.system_info_str

* Add test for Parakeet.system_info_str

* Add signature of Parakeet.system_info_str

* Define Parakeet::VERSION

* Add test for Parakeet::VERSION

* Add signature of Parakeet::VERSION

* Add Parakeet::Context::Params

* Make Parakeet::Context.new accept Context::Params

* Add test for Parakeet::Context.new with Context::Params

* Update RBS

* Remove params from Parakeet::Params which are moved from whisper_parakeet_full_params

* Remove tests for removed params

* Make Parakeet tests follow original behavior changes

* Add Parakeet model shortcuts

* Alloc token data in factory instead of alloc func

* Fix variable name

* Update RBS

* Refactor log settable module

* Use log settable for Whisper

* Address deadlock

* Make test follow change of log queue implementation

* Refactor to make abort callback use the same way to parakeet's way

* Remove redundant structs

* Fix test name

* Fix README

* Add missing parallel transcription

* Fix test for parakeet info

* Remove removed params

* Wait for logs dequeued

* Fix instance variable name

* Load etc feature

* Remove unnecessary comment

* Remove unnecessary thread safety check

* Remove outdated comment

* Skip downloading model if cache exists

* Change Hugging Face URI for Parakeet models

* Bump required Ruby version to 3.3

* Fix English

2 months agoparakeet : add support for NVIDIA Parakeet (#3735)
Daniel Bevenius [Tue, 16 Jun 2026 18:44:10 +0000 (20:44 +0200)]
parakeet : add support for NVIDIA Parakeet (#3735)

* parakeet : add support for NVIDIA Parakeet

Co-authored-by: Georgi Gerganov <redacted>
2 months agoci : only trigger release jobs for tags (#3883)
Daniel Bevenius [Tue, 16 Jun 2026 12:33:42 +0000 (14:33 +0200)]
ci : only trigger release jobs for tags (#3883)

* ci : only trigger release jobs for tags

This commit removes the building of the release jobs on pushed to
master.

The motivation for this is that it can be confusing at the momement when
releasing that the push to master also triggers the release jobs but
the actual release will be skipped. With this change the release job is
only run when a tag is pushed which should result in a single Release
github actions job and make it easier to follow.

* ci : add GGML_NATIVE=OFF for ubuntu-22-gcc

2 months agorelease : v1.8.7 (#3881)
Daniel Bevenius [Tue, 16 Jun 2026 10:28:23 +0000 (12:28 +0200)]
release : v1.8.7 (#3881)

2 months agocli : add --version flag (#3878)
Rum Nguyen [Tue, 16 Jun 2026 06:58:09 +0000 (13:58 +0700)]
cli : add --version flag (#3878)

Adds a `--version` option to whisper-cli that prints the library version
via `whisper_version()` and exits, plus a corresponding entry in the help
output. Mirrors the existing `-h`/`--help` handling.

Closes #608

2 months agotalk-llama : sync llama.cpp
Georgi Gerganov [Mon, 15 Jun 2026 06:15:48 +0000 (09:15 +0300)]
talk-llama : sync llama.cpp

2 months agosync : ggml
Georgi Gerganov [Mon, 15 Jun 2026 06:13:43 +0000 (09:13 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.1 (ggml/1541)
Georgi Gerganov [Fri, 12 Jun 2026 12:32:00 +0000 (15:32 +0300)]
ggml : bump version to 0.15.1 (ggml/1541)

2 months agoggml: support concat for scalar types at cuda backend (llama/24011)
ZihaoMu [Fri, 12 Jun 2026 06:32:44 +0000 (14:32 +0800)]
ggml: support concat for scalar types at cuda backend (llama/24011)

* cuda: support concat for scalar types

* Update concat.cu

* fix metal ci issue

2 months agoopencl: add q5_0/q5_1 gemm and gemv kernels for Adreno (llama/24319)
shaofeiqi [Fri, 12 Jun 2026 04:43:09 +0000 (21:43 -0700)]
opencl: add q5_0/q5_1 gemm and gemv kernels for Adreno (llama/24319)

* opencl: add q5_0 adreno support

* opencl: add q5_1 adreno support

* opencl: cosmetic fix

---------

Co-authored-by: Li He <redacted>
2 months agovulkan: ifdef eMesaHoneykrisp (build fix) (llama/24479)
Jeff Bolz [Thu, 11 Jun 2026 18:22:17 +0000 (13:22 -0500)]
vulkan: ifdef eMesaHoneykrisp (build fix) (llama/24479)

Fixes build/CI after #24306.

2 months agoggml : bump version to 0.15.0 (ggml/1539)
Georgi Gerganov [Thu, 11 Jun 2026 16:32:38 +0000 (19:32 +0300)]
ggml : bump version to 0.15.0 (ggml/1539)

2 months agovulkan: add fast path for contiguous buffer transfers (llama/23973)
Winston Ma [Thu, 11 Jun 2026 13:46:25 +0000 (21:46 +0800)]
vulkan: add fast path for contiguous buffer transfers (llama/23973)

2 months agovulkan: use medium matmul tile on Asahi Linux (llama/24306)
Kevin Liu [Thu, 11 Jun 2026 13:43:04 +0000 (09:43 -0400)]
vulkan: use medium matmul tile on Asahi Linux (llama/24306)

* vulkan: use medium matmul tile on Asahi Linux

* vulkan: switch Apple detection to Honeykrisp driver id

2 months agoRemove padding and multiple D2D copies for MTP (llama/24086)
Gaurav Garg [Wed, 10 Jun 2026 17:51:16 +0000 (23:21 +0530)]
Remove padding and multiple D2D copies for MTP (llama/24086)

* Make ggml_gated_delta_net take only the initial recurrent state (D, 1, n_seqs) and passes the snapshot count K as an op parameter instead of inferring it from state->ne[1].

Remove the padding hack and copy all emitted snapshots into the recurrent cache with a single strided ggml_cpy

* Make GDN changes in all backends. Address review comments.

* Fix CI build errors

2 months agoCUDA: Fix ssm_scan_f32 data-races (llama/24360)
Oliver Simons [Wed, 10 Jun 2026 12:27:08 +0000 (14:27 +0200)]
CUDA: Fix ssm_scan_f32 data-races (llama/24360)

* Add missing syncthreads before resuing cub_temp_storage

__syncthreads() is required before being allowed to resue TempStorage
smem:
https://nvidia.github.io/cccl/unstable/cub/api/classcub_1_1BlockLoad.html#_CPPv4I0EN3cub9BlockLoad4LoadEv20RandomAccessIteratorRA14ItemsPerThread_1Ti

* Add one more missing __syncthreads

Could also double-buffer, but alternative is to simply ensure all
threads have read smem* before writing to it again in the next loop
iteration

* Remove unused smem from ssm_scan_f32

2 months agovulkan: reduce iq1 shared memory usage for mul_mm (llama/24287)
Jeff Bolz [Tue, 9 Jun 2026 11:27:38 +0000 (06:27 -0500)]
vulkan: reduce iq1 shared memory usage for mul_mm (llama/24287)

2 months agovulkan: add `v_dot2_f32_f16` support in matrix-matrix multiplication and Flash Attent...
Ruben Ortlam [Tue, 9 Jun 2026 11:27:04 +0000 (13:27 +0200)]
vulkan: add `v_dot2_f32_f16` support in matrix-matrix multiplication and Flash Attention (llama/24123)

* vulkan: add support for valve fp16 dot2 extension

* use macro for dot2 path choice

* properly check for the feature

* add dot_product abstraction to reduce preprocessor branching

2 months agoggml : add GGML_OP_COL2IM_1D (llama/24206)
Pascal [Tue, 9 Jun 2026 09:01:37 +0000 (11:01 +0200)]
ggml : add GGML_OP_COL2IM_1D (llama/24206)

* cpu: add GGML_OP_COL2IM_1D

Add the overlap-add (scatter-add) step of a 1D transposed convolution.
A ConvTranspose1d factorizes as a GEMM followed by col2im: a weight
pre-permuted to [IC, K*OC] is contracted against the [IC, T_in] input
with mul_mat to produce a column matrix [K*OC, T_in], and col2im_1d
scatters those columns back into the [T_out, OC] signal, with
T_out = (T_in - 1)*s0 + K - 2*p0.

Keeping the contraction as a plain mul_mat leaves the heavy work on the
optimized (and quantizable) matmul kernels, so col2im_1d only does the
cheap overlap-add.

CPU uses a gather formulation parallelized over output channels,
supporting F32, F16 and BF16 with an F32 accumulator.

* tests: add backend coverage for GGML_OP_COL2IM_1D

Add test_col2im_1d next to the conv_transpose_1d cases, covering F32,
F16 and BF16 across eight geometries: the canonical kernel = 2*stride
DAC upsampling shape, overlap, no overlap, cropping (p0 = 1 and
p0 = stride/2), kernel < stride with zeroed gaps, kernel not a
multiple of stride, and a single column unfold.

Perf mode gets three real vocoder stage shapes reporting memory
bandwidth. max_nmse_err relaxes to 5e-4 for F16 and BF16.

* cpu: harden GGML_OP_COL2IM_1D

ggml_col2im_1d validates s0, oc, p0 and input contiguity at graph
build time, before the oc division, protecting every backend at once.
The kernel asserts the contiguity its flat indexing assumes and its
doc states the full output length including the crop term.

The kernel parallelizes over the time axis: the split stays balanced
down to OC = 1, where the previous channel split was single threaded.
Values are bit identical on the three real vocoder chains, two out of
three improve.

* tests: extend the GGML_OP_COL2IM_1D grid

The eval grid grows to eleven geometries: OC = 1 (mono output stage),
K = 1 with stride > 1 (sparse scatter, every gap position zeroed) and
a crop down to T_out = 2 where all the gather bounds act at once.

* tests: add col2im_1d equivalence test

tests/test-col2im-1d.cpp proves mul_mat + col2im_1d matches the
native ggml_conv_transpose_1d on the CPU backend, F32 bit exact, F16
and BF16 through casts of the column matrix. test-backend-ops cannot
cover this for a CPU only op since the CPU backend is its own
reference there.

* rpc: bump protocol patch version for GGML_OP_COL2IM_1D

GGML_OP_COUNT goes from 96 to 97 with the new op, which trips the
static_assert in ggml-rpc.h. Bump RPC_PROTO_PATCH_VERSION since the
op is appended and no existing op code shifts.

2 months agoggml-cpu : fix rms_norm_back wrong output under in-place aliasing (llama/24305)
Yash Raj Pandey [Tue, 9 Jun 2026 07:24:27 +0000 (03:24 -0400)]
ggml-cpu : fix rms_norm_back wrong output under in-place aliasing (llama/24305)

* ggml-cpu : fix rms_norm_back wrong output under in-place aliasing

* cont : clean-up comment

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoRemove case for GGML_TYPE_Q4_K in mvvq.cu (llama/23528)
ravel7524 [Tue, 9 Jun 2026 05:46:23 +0000 (07:46 +0200)]
Remove case for GGML_TYPE_Q4_K in mvvq.cu (llama/23528)

2 months agoggml-webgpu: Add clang-format job (llama/24308)
Reese Levine [Tue, 9 Jun 2026 03:54:24 +0000 (20:54 -0700)]
ggml-webgpu: Add clang-format job (llama/24308)

* Add clang-format job

* try local formatting

2 months agoggml-webgpu: Improve prefill speeds for k-quants + refactor matmul for Q4/Q5/Q8 and...
Masashi Yoshimura [Mon, 8 Jun 2026 22:19:56 +0000 (07:19 +0900)]
ggml-webgpu: Improve prefill speeds for k-quants + refactor matmul for Q4/Q5/Q8 and k-quants (llama/24225)

* ggml-webgpu: Improve prefill speeds + refactor matmul for quants

* Fixes for editroconfig checker

2 months agoHandle buffer overlap / buffer aliasing for concat operator (llama/24000)
Nikhil Jain [Mon, 8 Jun 2026 15:07:31 +0000 (08:07 -0700)]
Handle buffer overlap / buffer aliasing for concat operator (llama/24000)

* Only run webgpu CI on my fork

* Add webgpu only workflow

* handle buffer overlap case for concat operator

* restore build-webgpu.yml

Co-Authored-By: Claude Sonnet 4.6 <redacted>
* Run clang-format

* Update ggml/src/ggml-webgpu/wgsl-shaders/concat.wgsl

---------

Co-authored-by: Claude Sonnet 4.6 <redacted>
Co-authored-by: Reese Levine <redacted>
2 months agoImplement 2D workgroups for scale, binary, and unary ops (llama/24044)
Nikhil Jain [Mon, 8 Jun 2026 15:07:15 +0000 (08:07 -0700)]
Implement 2D workgroups for scale, binary, and unary ops (llama/24044)

* Only run webgpu CI on my fork

* Add webgpu only workflow

* Implement 2d workgroups for more operations

* fix

* Fix type

* Move back to global_invocation_id

2 months agovulkan: Use cm2 decode_vector for mul_mat_id B matrix loads (llama/23991)
Jeff Bolz [Mon, 8 Jun 2026 08:40:37 +0000 (03:40 -0500)]
vulkan: Use cm2 decode_vector for mul_mat_id B matrix loads (llama/23991)

This allows vec4 loads of the B elements. Also increase BK to 64 when this is
enabled. Neither of these alone is consistently faster, but together these give
a nice speedup.

In ggml-vulkan.cpp, we need to make sure the B matrix alignment and stride are
multiples of 4.

2 months agocuda: reset cuda context after reading memory size (llama/23935)
Ruben Ortlam [Mon, 8 Jun 2026 08:22:44 +0000 (10:22 +0200)]
cuda: reset cuda context after reading memory size (llama/23935)

* cuda: reset device in get_memory function if no backend is active

* also count device and host buffers

* exclude hip and musa from counting and device reset

* use device mutex instead of atomic

* undo backend_free function move

3 months agoci : pin github actions to commit sha's (#3865)
Daniel Bevenius [Tue, 9 Jun 2026 10:51:00 +0000 (12:51 +0200)]
ci : pin github actions to commit sha's (#3865)

3 months agocoreml : fix --quantize crash for mlprogram format; fix --optimize-ane label (#3868)
Christopher Albert [Tue, 9 Jun 2026 06:34:31 +0000 (08:34 +0200)]
coreml : fix --quantize crash for mlprogram format; fix --optimize-ane label (#3868)

commit 8b92060 switched ct.convert() to mlprogram, but did not update
the --quantize path.  quantize_weights() from
neural_network.quantization_utils only works with the legacy
neuralnetwork format.  Running with --quantize crashed with:

  Exception: MLModel of type mlProgram cannot be loaded just from the
  model spec object. It also needs the path to the weights file.

Fix: pass compute_precision=ct.precision.FLOAT16 into ct.convert() when
--quantize is set.  This matches the original intent of nbits=16 (F16
storage) without changing the quantization scheme or model accuracy.

Also fix the three boolean CLI flags (--encoder-only, --quantize,
--optimize-ane) to use a _str_to_bool helper so that both
  --flag True
and
  --flag False
parse correctly.  The type=bool form accepted "False" as True because
bool("False") == True.

Remove the "currently broken" label from --optimize-ane: the ANE path
(WhisperANE with Conv2d attention and LayerNormANE) converts and loads
correctly with both PyTorch 2.x and coremltools 9.x.

3 months agotalk-llama : sync llama.cpp
Georgi Gerganov [Mon, 8 Jun 2026 09:55:06 +0000 (12:55 +0300)]
talk-llama : sync llama.cpp

3 months agosync : ggml
Georgi Gerganov [Mon, 8 Jun 2026 09:52:27 +0000 (12:52 +0300)]
sync : ggml

3 months agoggml : bump version to 0.14.0 (ggml/1533)
Georgi Gerganov [Mon, 8 Jun 2026 09:51:59 +0000 (12:51 +0300)]
ggml : bump version to 0.14.0 (ggml/1533)

3 months agosync : ggml
Georgi Gerganov [Mon, 8 Jun 2026 09:52:17 +0000 (12:52 +0300)]
sync : ggml

3 months agoHIP: add gfx1152 and gfx1153 to RDNA3.5 (llama/24129)
Harkirat Gill [Mon, 8 Jun 2026 06:33:23 +0000 (02:33 -0400)]
HIP: add gfx1152 and gfx1153 to RDNA3.5 (llama/24129)

3 months agometal : fix im2col 1D case (audio models) (llama/24220)
Xuan-Son Nguyen [Mon, 8 Jun 2026 06:03:18 +0000 (08:03 +0200)]
metal : fix im2col 1D case (audio models) (llama/24220)

3 months agovulkan: check coopmat2 features before reporting support (llama/24186)
Ruben Ortlam [Sat, 6 Jun 2026 07:11:35 +0000 (09:11 +0200)]
vulkan: check coopmat2 features before reporting support (llama/24186)

3 months agoopencl: improve get_rows, cpy, concat and q6_k flat gemv (llama/24160)
lhez [Fri, 5 Jun 2026 20:45:25 +0000 (13:45 -0700)]
opencl: improve get_rows, cpy, concat and q6_k flat gemv (llama/24160)

* opencl: allow multiple workgroups for large rows

* opencl: improve small cpy

* opencl: packed concat for small input

* opencl: tweak flat q6_K gemv, increase N_DST and remap threads

3 months agovulkan: add fwht support for Intel with shmem reduction (llama/23964)
Ruben Ortlam [Fri, 5 Jun 2026 17:44:40 +0000 (19:44 +0200)]
vulkan: add fwht support for Intel with shmem reduction (llama/23964)

* vulkan: add fwht support for Intel with shmem reduction

* don't use N as workgroup size

* disable subgroup shuffle on MoltenVK AMD

* disable fwht shader on Intel Windows due to driver bug

3 months agokleidiai : dynamic chunck-based scheduling for hybrid execution (llama/23819)
Charles Xu [Fri, 5 Jun 2026 07:11:47 +0000 (09:11 +0200)]
kleidiai : dynamic chunck-based scheduling for hybrid execution (llama/23819)

3 months agoCUDA: enroll mul_mat_vec_q_moe into pdl (llama/24087)
Oliver Simons [Fri, 5 Jun 2026 06:37:34 +0000 (08:37 +0200)]
CUDA: enroll mul_mat_vec_q_moe into pdl (llama/24087)

* Enroll mul_mat_vec_q_moe into PDL, boosting MTP performance on BW

Data collected on a B4500:

Before
```
(llama.cpp) ➜  llama.cpp git:(master) ✗ python mtp-bench.py
  code_python        pred= 192 draft= 150 acc= 116 rate=0.773 tok/s=202.8
  code_cpp           pred= 192 draft= 147 acc= 117 rate=0.796 tok/s=212.8
  explain_concept    pred= 192 draft= 161 acc= 110 rate=0.683 tok/s=196.4
  summarize          pred= 192 draft= 138 acc= 122 rate=0.884 tok/s=226.6
  qa_factual         pred= 192 draft= 138 acc= 121 rate=0.877 tok/s=225.1
  translation        pred= 192 draft= 158 acc= 112 rate=0.709 tok/s=201.5
  creative_short     pred= 192 draft= 160 acc= 110 rate=0.688 tok/s=197.2
  stepwise_math      pred= 192 draft= 150 acc= 115 rate=0.767 tok/s=209.2
  long_code_review   pred= 192 draft= 148 acc= 116 rate=0.784 tok/s=208.9
```
After
```
(llama.cpp) ➜  llama.cpp git:(master) ✗ python mtp-bench.py
  code_python        pred= 192 draft= 150 acc= 116 rate=0.773 tok/s=211.9
  code_cpp           pred= 192 draft= 147 acc= 117 rate=0.796 tok/s=224.6
  explain_concept    pred= 192 draft= 161 acc= 110 rate=0.683 tok/s=207.8
  summarize          pred= 192 draft= 138 acc= 122 rate=0.884 tok/s=240.2
  qa_factual         pred= 192 draft= 138 acc= 121 rate=0.877 tok/s=238.5
  translation        pred= 192 draft= 158 acc= 112 rate=0.709 tok/s=213.4
  creative_short     pred= 192 draft= 160 acc= 110 rate=0.688 tok/s=208.8
  stepwise_math      pred= 192 draft= 150 acc= 115 rate=0.767 tok/s=221.7
  long_code_review   pred= 192 draft= 148 acc= 116 rate=0.784 tok/s=220.7
```

Server launched with:
```
➜  llama.cpp git:(osimons/enroll_mul_mat_vec_q_moe_into_PDL) ✗ ./build-x64-linux-gcc-reldbg/bin/llama-server \
    -m /mnt/share/gguf/unsloth/Qwen3.6-35B-A3B-MTP-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf -dio \
    --spec-type draft-mtp \
    --spec-draft-n-max 2 \
    -ngl all \
    -fa on \
    --host 0.0.0.0 \
    --port 8080 -np 1 --chat-template-kwargs "{\"preserve_thinking\": true}"
```

* LC to overlap with following kernels

3 months agosycl : port multi-column MMVQ from CUDA backend (llama/21845)
Mason Milburn [Fri, 5 Jun 2026 05:10:31 +0000 (01:10 -0400)]
sycl : port multi-column MMVQ from CUDA backend (llama/21845)

mmvq:

Port the ncols_dst optimization from ggml-cuda/mmvq.cu to SYCL.
Read weights once per dispatch instead of once per column.
Covers all standard quant types + reorder paths for Q4_0, Q8_0,
Q3_K, Q4_K, Q5_K, Q6_K. IQ types (except IQ4_XS) excluded due to
incompatible vec_dot signatures.

ggml-sycl:

The weight reorder was only bootstrapped on single-token mat-vec
(ne[1] == 1). Speculative / MTP verify issues only multi-column mat-vec,
so it never triggered the reorder and ran on the slower non-reorder
kernel. Bootstrap it on small multi-column batches (ne[1] <= 8) too.

3 months agoggml: vectorize ggml_vec_dot_q4_1_q8_1 with WASM SIMD128 (llama/22209)
Kartik Sirohi [Thu, 4 Jun 2026 13:12:38 +0000 (18:42 +0530)]
ggml: vectorize ggml_vec_dot_q4_1_q8_1 with WASM SIMD128 (llama/22209)

* ggml: vectorize ggml_vec_dot_q4_1_q8_1 with WASM SIMD128

Optimize the inner loop of ggml_vec_dot_q4_1_q8_1_generic using
WASM SIMD128 intrinsics, gated behind #ifdef __wasm_simd128__ so
non-wasm builds are completely unaffected.

Approach:
- single wasm_v128_load covers all 32 packed 4-bit weights
- nibbles unpacked via AND/SHR into two u8x16 registers
- widened to i16 before multiply (WASM SIMD has no i8*i8 instruction)
- 4x wasm_i32x4_dot_i16x8 calls accumulate all 32 element pairs
- horizontal reduce via 4x wasm_i32x4_extract_lane

Benchmark (node v25, emcc -O3 -msimd128, 64 blocks x QK8_1=32,
200k iterations):

| impl   | ns/call | speedup |
|--------|---------|---------|
| scalar |   880.7 |   1.00x |
| simd   |   257.8 |   3.42x |

Correctness verified against scalar reference across 10 random seeds
with exact output match.

* ggml: move q4_1_q8_1 WASM SIMD implementation to wasm backend

Relocate the SIMD128 implementation of ggml_vec_dot_q4_1_q8_1 to ggml/src/ggml-cpu/arch/wasm/quants.c to follow architecture-specific layout. Restore the generic implementation in ggml/src/ggml-cpu/quants.c.
Move for loop in the else block.

* ggml: use generic q4_1_q8_1 fallback in wasm backend

3 months agometal : reduce rset heartbeat from 500ms -> 5ms (llama/24074)
Georgi Gerganov [Thu, 4 Jun 2026 05:05:32 +0000 (08:05 +0300)]
metal : reduce rset heartbeat from 500ms -> 5ms (llama/24074)

3 months agoggml-webgpu: FlashAttention refactor + standardize quantization support (llama/23834)
Reese Levine [Thu, 4 Jun 2026 05:05:04 +0000 (22:05 -0700)]
ggml-webgpu: FlashAttention refactor + standardize quantization support (llama/23834)

* Start work on flash_attn refactor

* Refactor

* Split k/v quantization

* Refactor and abstract quantization logic for flash_attn and mul_mat

* Add quantization support to tile path

* formatting

* Move to functions, add a check

3 months agoggml-cpu: extend RVV quantization vec dot to higher VLENs (llama/22754)
rehan-10xengineer [Thu, 4 Jun 2026 05:03:40 +0000 (10:03 +0500)]
ggml-cpu: extend RVV quantization vec dot to higher VLENs (llama/22754)

* ggml-cpu: add rvv 512b,1024b impls for iq4_xs

* ggml-cpu: refactor; add rvv 512b, 1024b impls for q6_K, i-quants

* ggml-cpu: refactor; add 512 and 1024 implementations of tq3_s, iq3_xxs, iq2_s, iq2_xs, iq2_xxs

improve iq2_xs impl for rvv 256

Co-authored-by: Rehan Qasim <redacted>
---------

Co-authored-by: taimur-10x <redacted>
Co-authored-by: Rehan Qasim <redacted>
3 months agoAvoid PDL race conditions by disabling __restrict__ when PDL is used (llama/24030)
Andreas Kieslinger [Wed, 3 Jun 2026 11:56:42 +0000 (13:56 +0200)]
Avoid PDL race conditions by disabling __restrict__ when PDL is used (llama/24030)

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

* Simplifies new __restrict__ usage via macro

* Add hopper to PDL __restrict__ fix.

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

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

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

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

* address review comments

* remove forward decl

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

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

Co-authored-by: Johannes Gäßler <redacted>
3 months agoopencl: use flat variants of q4_K and q6_K gemv for very large M (llama/24006)
lhez [Tue, 2 Jun 2026 21:16:17 +0000 (14:16 -0700)]
opencl: use flat variants of q4_K and q6_K gemv for very large M (llama/24006)

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

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

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

3 months agohexagon: MUL_MAT, MUL_MAT_ID, FLASH_ATTN and GDN cleanup and optimizations for latest...
Max Krasnyansky [Tue, 2 Jun 2026 06:40:08 +0000 (23:40 -0700)]
hexagon: MUL_MAT, MUL_MAT_ID, FLASH_ATTN and GDN cleanup and optimizations for latest models (llama/23989)

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

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

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

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

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

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

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

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

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

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

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

* hmx-mm: fixed mxfp4 handling for MUL_MAT_ID

* hex-gdn: optimize GATED_DELTA_NET

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

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

* hexagon: update DCVS settings for a slight perf bump

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

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

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

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

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

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

3 months agoclean up unused variables warnings (llama/23975)
Anav Prasad [Tue, 2 Jun 2026 02:38:37 +0000 (19:38 -0700)]
clean up unused variables warnings (llama/23975)

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

* opencl: fix compiler warnings for non-adreno path

* opencl: fix const cast warning

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

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

* opencl: add general q5_0 support

* opencl: add general q5_1 support

* opencl: support non-uniform workgrp size

---------

Co-authored-by: Li He <redacted>