]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/log
pkg/ggml/sources/whisper.cpp
3 weeks agoUpdate upstream debian/latest debian/1.8.2-1
Mathieu Baudier [Tue, 11 Nov 2025 09:31:33 +0000 (10:31 +0100)]
Update upstream

3 weeks agoMerge tag 'upstream/1.8.2' into debian/latest
Mathieu Baudier [Tue, 11 Nov 2025 09:29:11 +0000 (10:29 +0100)]
Merge tag 'upstream/1.8.2' into debian/latest

Upstream release

6 weeks agoAlign package names with Debian official
Mathieu Baudier [Sat, 18 Oct 2025 10:48:44 +0000 (12:48 +0200)]
Align package names with Debian official

6 weeks agorelease : v1.8.2 upstream/1.8.2
Georgi Gerganov [Wed, 15 Oct 2025 07:29:42 +0000 (10:29 +0300)]
release : v1.8.2

6 weeks agotalk-llama : sync llama.cpp
Georgi Gerganov [Tue, 14 Oct 2025 19:09:02 +0000 (22:09 +0300)]
talk-llama : sync llama.cpp

6 weeks agosync : ggml
Georgi Gerganov [Tue, 14 Oct 2025 19:08:53 +0000 (22:08 +0300)]
sync : ggml

6 weeks agovulkan: Add ACC_TYPE_VEC2 implementation (llama/16203)
SavicStefan [Tue, 14 Oct 2025 17:18:05 +0000 (19:18 +0200)]
vulkan: Add ACC_TYPE_VEC2 implementation (llama/16203)

Signed-off-by: Stefan Savic <redacted>
Co-authored-by: Stefan Savic <redacted>
6 weeks agoCUDA + openCL: fix bug in accessing rms_norm->src while doing fusion (llama/16577)
Aman Gupta [Tue, 14 Oct 2025 14:48:08 +0000 (22:48 +0800)]
CUDA + openCL: fix bug in accessing rms_norm->src while doing fusion (llama/16577)

6 weeks agovulkan: Support FA with K/V in F32 (llama/16543)
Jeff Bolz [Tue, 14 Oct 2025 13:53:37 +0000 (08:53 -0500)]
vulkan: Support FA with K/V in F32 (llama/16543)

6 weeks agovulkan: Improve build time for MSVC (llama/16545)
Jeff Bolz [Tue, 14 Oct 2025 12:51:36 +0000 (07:51 -0500)]
vulkan: Improve build time for MSVC (llama/16545)

Enable CMP0147 so custom build steps (invoking vulkan-shader-gen) are run in parallel.

Enable /MP so source files are compiled in parallel.

6 weeks agoCUDA: enable FA for FP32 KV cache (llama/16546)
Johannes Gäßler [Tue, 14 Oct 2025 12:22:47 +0000 (14:22 +0200)]
CUDA: enable FA for FP32 KV cache (llama/16546)

6 weeks agoCUDA: use fastdiv + ggml_cuda_mad for mmvf (llama/16557)
Aman Gupta [Tue, 14 Oct 2025 11:16:21 +0000 (19:16 +0800)]
CUDA: use fastdiv + ggml_cuda_mad for mmvf (llama/16557)

* CUDA: use fastdiv + ggml_cuda_mad for mmvf

* use bf16 directly + fix formatting

* Add exception for HIP code

6 weeks agoCUDA: add fp kernel for larger batch size MoE (llama/16512)
Aman Gupta [Tue, 14 Oct 2025 11:15:15 +0000 (19:15 +0800)]
CUDA: add fp kernel for larger batch size MoE (llama/16512)

* CUDA: kernel for larger batch sizes for MoE

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* fixup

* tests

* Move mmq_ids_helper to mmid

* cleanup

* Remove redundant checks

6 weeks agocuda : remove legacy copy-op pointer indirection code (llama/16485)
Anav Prasad [Tue, 14 Oct 2025 09:53:49 +0000 (09:53 +0000)]
cuda : remove legacy copy-op pointer indirection code (llama/16485)

* remove legacy copy-op pointer indirection code

* further removal of copy-op indirection code

* renamed check_node_graph_compatibility_and_refresh_copy_ops function

6 weeks agometal : FA support F32 K and V and head size = 32 (llama/16531)
Georgi Gerganov [Mon, 13 Oct 2025 20:07:57 +0000 (23:07 +0300)]
metal : FA support F32 K and V and head size = 32 (llama/16531)

* metal : FA support F32 K and V and head size = 32

* graph : remove obsolete comment [no ci]

6 weeks agoopencl: fix build targeting CL 2 (llama/16554)
lhez [Mon, 13 Oct 2025 18:50:37 +0000 (11:50 -0700)]
opencl: fix build targeting CL 2 (llama/16554)

6 weeks agoCUDA: fix numerical issues in tile FA kernel (llama/16540)
Johannes Gäßler [Mon, 13 Oct 2025 14:29:45 +0000 (16:29 +0200)]
CUDA: fix numerical issues in tile FA kernel (llama/16540)

6 weeks agoggml : fix build broken with -march=armv9-a on MacOS (llama/16520)
Jie Fu (傅杰) [Mon, 13 Oct 2025 12:48:47 +0000 (20:48 +0800)]
ggml : fix build broken with -march=armv9-a on MacOS (llama/16520)

* ggml : fix build broken with -march=armv9-a on MacOS

Signed-off-by: Jie Fu <redacted>
* Add #pragma message

Signed-off-by: Jie Fu <redacted>
* Address review comment.

Signed-off-by: Jie Fu <redacted>
* Update ggml/src/ggml-cpu/ggml-cpu.c

---------

Signed-off-by: Jie Fu <redacted>
Co-authored-by: Diego Devesa <redacted>
6 weeks agoCANN: fix CPU memory leak in CANN backend (llama/16549)
Chenguang Li [Mon, 13 Oct 2025 09:01:24 +0000 (17:01 +0800)]
CANN: fix CPU memory leak in CANN backend (llama/16549)

This commit fixes a CPU-side memory leak issue in the CANN backend,
which occurred when intermediate aclTensorList objects were not properly
released after operator execution. The leak happened during repeated
invocations of CANN ops (e.g., FlashAttention), leading to increasing
host memory usage over time.

Proper resource cleanup (aclDestroyTensorList and related release logic)
has been added to ensure that all temporary tensors are correctly freed.

6 weeks agometal: add support for opt_step_sgd (llama/16539)
Sam/Samuel [Mon, 13 Oct 2025 08:25:02 +0000 (16:25 +0800)]
metal: add support for opt_step_sgd (llama/16539)

* metal: add support for opt_step_sgd

* add newline to pass EditorConfig check

6 weeks agoggml : fix scalar path for computing norm (llama/16558)
Georgi Gerganov [Mon, 13 Oct 2025 08:22:27 +0000 (11:22 +0300)]
ggml : fix scalar path for computing norm (llama/16558)

6 weeks agoCANN: Update several operators to support FP16 data format (llama/16251)
hipudding [Mon, 13 Oct 2025 00:52:22 +0000 (08:52 +0800)]
CANN: Update several operators to support FP16 data format (llama/16251)

Many Ascend operators internally use FP16 precision for computation.
If input data is in FP32, it must first be cast to FP16 before
computation, and then cast back to FP32 after computation, which
introduces unnecessary cast operations. Moreover, FP16 computation
requires significantly less workload compared to FP32, leading to
noticeable efficiency improvements.

In this change, `get_rows`, `rms_norm`, and `flash_attn_ext` are extended
to support multiple data types. Validation on the Qwen2 0.5b model shows
correct accuracy and about 10% performance gain in concurrent scenarios.

Co-authored-by: noemotiovon <redacted>
6 weeks agometal : add opt_step_adamw and op_sum (llama/16529)
Sam/Samuel [Sun, 12 Oct 2025 18:43:14 +0000 (02:43 +0800)]
metal : add opt_step_adamw and op_sum (llama/16529)

* scaffold to support opt step adamw on metal (not written so far)

* add opt-step-adamw kernel for metal

* pass op->src[4] as a separate buffer to the pipeline

* add bounds check to opt-step-adamw kernel

* complete scaffold for GGML_OP_SUM

* naive GGML_OP_SUM kernel

* remove unwanted comment

* change OP_SUM capability gate

* Add has_simdgroup_reduction to both ops to pass CI

6 weeks agofix UT fault cases: count-equal, argsort, pad OPs (llama/16521)
Neo Zhang Jianyu [Sun, 12 Oct 2025 13:53:35 +0000 (21:53 +0800)]
fix UT fault cases: count-equal, argsort, pad OPs (llama/16521)

* fix/refactor OP argsort, pad

* fix count-equal op

* update SYCL OP list

* fix format issue

---------

Co-authored-by: Zhang Jianyu <redacted>
6 weeks agoggml : Fix FP16 ELU positive branch (llama/16519)
sirus20x6 [Sun, 12 Oct 2025 05:25:37 +0000 (00:25 -0500)]
ggml : Fix FP16 ELU positive branch (llama/16519)

Co-authored-by: Aaron <redacted>
6 weeks agoggml: Correct SVE implementation in ggml_vec_dot_f16_unroll (llama/16518)
sirus20x6 [Sun, 12 Oct 2025 05:15:00 +0000 (00:15 -0500)]
ggml: Correct SVE implementation in ggml_vec_dot_f16_unroll (llama/16518)

The previous SVE implementation for `ggml_vec_dot_f16_unroll` contained a bug due to a copy-paste error. The wrong variable was used in an FMA instruction, leading to incorrect results. This commit corrects the variable usage and improves the clarity of the code by renaming variables to avoid confusion.

Co-authored-by: Aaron <redacted>
6 weeks agoCUDA: faster tile FA, add oob checks, more HSs (llama/16492)
Johannes Gäßler [Sat, 11 Oct 2025 18:54:32 +0000 (20:54 +0200)]
CUDA: faster tile FA, add oob checks, more HSs (llama/16492)

7 weeks agorelease : v1.8.1
Georgi Gerganov [Sun, 12 Oct 2025 08:17:59 +0000 (11:17 +0300)]
release : v1.8.1

7 weeks agobench : update [no ci]
Georgi Gerganov [Sun, 12 Oct 2025 05:47:48 +0000 (08:47 +0300)]
bench : update [no ci]

7 weeks agotalk-llama : sync llama.cpp
Georgi Gerganov [Sun, 12 Oct 2025 05:37:14 +0000 (08:37 +0300)]
talk-llama : sync llama.cpp

7 weeks agosync : ggml
Georgi Gerganov [Sun, 12 Oct 2025 05:36:34 +0000 (08:36 +0300)]
sync : ggml

7 weeks agometal : fix mul-mm condition + fix mul-mv permuted kernels (llama/16494)
Georgi Gerganov [Sat, 11 Oct 2025 13:54:10 +0000 (16:54 +0300)]
metal : fix mul-mm condition + fix mul-mv permuted kernels (llama/16494)

7 weeks agocuda : avoid initializing unused devices (llama/16510)
Diego Devesa [Sat, 11 Oct 2025 11:02:26 +0000 (04:02 -0700)]
cuda : avoid initializing unused devices (llama/16510)

7 weeks agocmake : Dont define XOPENSOURCE on AIX (llama/16481)
Prajwal B Mehendarkar [Fri, 10 Oct 2025 08:15:46 +0000 (13:45 +0530)]
cmake : Dont define XOPENSOURCE on AIX (llama/16481)

7 weeks agocpu : optimize the ggml NORM operation (llama/15953)
duduta [Thu, 9 Oct 2025 19:11:15 +0000 (22:11 +0300)]
cpu : optimize the ggml NORM operation (llama/15953)

* ggml-cpu: optimize norm operation to use intrinsics or Accelerate

          rename function

          add endif macro comment

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Aaron Teo <redacted>
* implement s390x SIMD suggested by @taronaeo

* add TODO comment

* tidy up spaces

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Aaron Teo <redacted>
7 weeks agoCANN: Improve ACL graph matching (llama/16166)
Chenguang Li [Thu, 9 Oct 2025 07:50:25 +0000 (15:50 +0800)]
CANN: Improve ACL graph matching (llama/16166)

* CANN: improve ACL graph matching

Record `ne` and `nb` information for src tensors and include them in the
graph matching check. This enhances the robustness of ACL graph matching
by preventing incorrect matches when src tensors share the same data
address but differ in shape or stride.

* CANN: add op_params match

7 weeks agokleidiai: kernel interface refactoring (llama/16460)
Charles Xu [Thu, 9 Oct 2025 07:29:17 +0000 (09:29 +0200)]
kleidiai: kernel interface refactoring (llama/16460)

7 weeks agorefactor soft_max, add soft_max_back (llama/16472)
Neo Zhang Jianyu [Thu, 9 Oct 2025 07:25:11 +0000 (15:25 +0800)]
refactor soft_max, add soft_max_back (llama/16472)

* refactor to support soft_max_ext

* fix error and support soft_max_back

* rm unused functions

* fix format issue

---------

Co-authored-by: Zhang Jianyu <redacted>
7 weeks agoDisable CUDA host buffers on integrated GPUs (llama/16308)
ai-fonsi [Wed, 8 Oct 2025 18:21:46 +0000 (20:21 +0200)]
Disable CUDA host buffers on integrated GPUs (llama/16308)

7 weeks agometal : mark FA blocks (llama/16372)
Georgi Gerganov [Wed, 8 Oct 2025 07:57:53 +0000 (10:57 +0300)]
metal : mark FA blocks (llama/16372)

* metal : better unroll in the FA kernels

* metal : index FA blocks

* tests : restore [no ci]

* metal : prevent division by zero in FA kernels

* metal : fix -INF detection logic

7 weeks agoggml webgpu: profiling, CI updates, reworking of command submission (llama/16452)
Reese Levine [Tue, 7 Oct 2025 20:48:56 +0000 (13:48 -0700)]
ggml webgpu: profiling, CI updates, reworking of command submission (llama/16452)

* Add profiling

* More detailed profiling

* Rework command submission to avoid global locks

* Update wait handling

* try new method of waiting on futures

* Add serializing of command submission in some cases

* Add new pool for timestamp queries and clean up logging

* Serialize command submission in CI and leave a TODO note

* Update webgpu CI

* Add myself as WebGPU codeowner

* Deadlock avoidance

* Leave WebGPU/Vulkan CI serialized

* Fix divide by 0

* Fix logic in division by inflight_threads

* Update CODEOWNERS and remove serialize submit option

7 weeks agometal : add support for non-padded FA KV (llama/16148)
Georgi Gerganov [Tue, 7 Oct 2025 05:23:30 +0000 (08:23 +0300)]
metal : add support for non-padded FA KV (llama/16148)

* metal : pad K, V and Mask when needed

* cont : simplify

* cuda : add TODO about KV padding requirement

* metal : add comments

* metal : remove mask padding requirement

7 weeks agotests : add -INF blocks to the KQ mask in the FA tests (llama/16380)
Georgi Gerganov [Tue, 7 Oct 2025 05:22:35 +0000 (08:22 +0300)]
tests : add -INF blocks to the KQ mask in the FA tests (llama/16380)

* tests : add -INF blocks to the KQ mask in the FA tests

* cont : bump -INF block size to 64

Co-authored-by: Jeff Bolz <redacted>
* ggml : prevent division by zero in FA CPU op

---------

Co-authored-by: Jeff Bolz <redacted>
7 weeks agometal : various optimizations + refactoring (llama/16446)
Georgi Gerganov [Tue, 7 Oct 2025 05:21:40 +0000 (08:21 +0300)]
metal : various optimizations + refactoring (llama/16446)

* metal : ssm_scan minor opts

* metal : get_rows optimize

* metal : cpy optimize

* metal : ssm_conv opt

* metal : ssm_scan simplify

* metal : ssm_Scan opt

7 weeks agoggml : fix unaligned access in AMX code (llama/16315)
Georgi Gerganov [Mon, 6 Oct 2025 13:05:27 +0000 (16:05 +0300)]
ggml : fix unaligned access in AMX code (llama/16315)

7 weeks agoggml-cpu : fix leftover handling in ggml_vec_scale_f32 for SVE (llama/16443)
Daniel Bevenius [Mon, 6 Oct 2025 12:17:12 +0000 (14:17 +0200)]
ggml-cpu : fix leftover handling in ggml_vec_scale_f32 for SVE (llama/16443)

This commit updates the leftover handling in ggml_vec_scale_f32.

The motivation for this is that the code currently incorrectly assumes
there would be fewer than ggml_f32_epr leftover elements. However,
since the main loop processes 2*ggml_f32_epr elements per iteration
, there can be up to (2*ggml_f32_epr - 1) leftover elements.

The original single-pass leftover code could only process ggml_f32_epr
elements, leaving some elements unscaled.

Example scenario with 256-bit SVE:
```
ggml_f32_epr  = 8 (elements per register)
ggml_f32_step = 16 (two registers per iteration)
n             = 25
np            = 16
leftovers     = 9 elements (16-24)

Original    : processes only elements 16-23, misses element 24
This commit : loop processes elements 16-23, then element 24
```

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/18070620247/job/51419855630

7 weeks agoggml webgpu: actually add softmax, fix rms_norm offset (llama/16400)
Reese Levine [Sun, 5 Oct 2025 03:59:31 +0000 (20:59 -0700)]
ggml webgpu: actually add softmax, fix rms_norm offset (llama/16400)

* implement soft_max

* Fix soft_max data race

* Temporary fix, wait on each submit

7 weeks agovulkan: use a more appropriate amount of threads when generating shaders (llama/16418)
Eve [Sat, 4 Oct 2025 20:04:27 +0000 (20:04 +0000)]
vulkan: use a more appropriate amount of threads when generating shaders (llama/16418)

* use a more flexible amount of threads

* fix windows compile and 0 thread case

* nominmax

7 weeks agorpc : check src buffer when copying tensor (llama/16421)
Radoslav Gerganov [Sat, 4 Oct 2025 13:22:45 +0000 (16:22 +0300)]
rpc : check src buffer when copying tensor (llama/16421)

Only dst buffer is guaranteed to be an RPC buffer. Add check for the src
one.

7 weeks agorpc : add support for multiple devices (llama/16276)
Radoslav Gerganov [Sat, 4 Oct 2025 09:49:16 +0000 (12:49 +0300)]
rpc : add support for multiple devices (llama/16276)

* rpc : add support for multiple devices

Allow rpc-server to expose multiple devices from a single endpoint.
Change RPC protocol to include device identifier where needed.

closes: #15210

* fixes

* use ggml_backend_reg_t

* address review comments

* fix llama-bench backend report

* address review comments, change device naming

* fix cmd order

7 weeks agovulkan : incremental shader builds (llama/16341)
Acly [Sat, 11 Oct 2025 14:59:36 +0000 (17:59 +0300)]
vulkan : incremental shader builds (llama/16341)

* vulkan (DRAFT): split shader generation by GLSL source file, to improve incremental build times

* support dep-files so shaders are recompiled if their included files change

* rename shader files which are used as "headers" to use .glsl extension
* move glslc extension detection shaders to separate folders
* the above is to prevent them from getting glob'd with the actual compute shaders that need to be compiled

* vulkan : only write embedded shader .hpp/.cpp when they change

* avoid recompiling ggml-vulkan.cpp when editing shaders
* pass single --source argument instead of --input-dir & --filter to shader gen
* check for source file match earlier

* fix hang in vulkan-shaders-gen when there are compilation errors

* early out did not decrement compile_count

* clean up

* fix glslc integer dot product test

* unconditionally write the embedded shader cpp output

* replace output filepath in generated dep-files to match output in CMakeLists

---------

Co-authored-by: Jeff Bolz <redacted>
7 weeks agometal : fix loop bound in ggml_mem_ranges (llama/16412)
Georgi Gerganov [Fri, 3 Oct 2025 16:18:56 +0000 (19:18 +0300)]
metal : fix loop bound in ggml_mem_ranges (llama/16412)

7 weeks agoggml : fix graph reallocation with multiple chunks (llama/16396)
Acly [Fri, 3 Oct 2025 11:49:08 +0000 (13:49 +0200)]
ggml : fix graph reallocation with multiple chunks (llama/16396)

reallocation is needed if a single chunk grows in size,
even if total allocation size stays the same or is lower

7 weeks agovulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE (llama/16354)
Jeff Bolz [Fri, 3 Oct 2025 10:50:46 +0000 (05:50 -0500)]
vulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE (llama/16354)

* vulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE

Replace maxMemoryAllocationSize check with maxBufferSize when creating buffers.
The maxMemoryAllocationSize limit is a "soft" limit and allocations can succeed
beyond that limit. This allows > 4GB buffers to be allocated on some
implementations (e.g. NVIDIA) and tensors this large can be used for im2col
and mul_mat.

For temporary buffers (prealloc_x/y/etc) check against maxStorageBufferRange.
I'm not sure this check is ideal, but we always use these buffers as a single
full size binding and the limit may be smaller than maxMemoryAllocationSize
or maxBufferSize, so I think this is reasonable.

Replace descriptor range uses of VK_WHOLE_SIZE with a manually computed range.
The maxStorageBufferRange may be smaller than the maxBufferSize or
maxMemoryAllocationSize (and the Vulkan spec warns about this in a note) and
it's invalid usage if VK_WHOLE_SIZE computes a range larger than
maxStorageBufferRange.

With this change, it should be possible to generate videos using wan networks
in stable-diffusion.cpp.

* vulkan: Add env var GGML_VK_FORCE_MAX_BUFFER_SIZE and use stoull

7 weeks agovulkan: Fix FA coopmat1 invalid array indexing (llama/16365)
Jeff Bolz [Fri, 3 Oct 2025 09:52:46 +0000 (04:52 -0500)]
vulkan: Fix FA coopmat1 invalid array indexing (llama/16365)

When computing sinks, the cm1 shader was looping r from 0 to Br rather than
to rows_per_thread. I must have copied this from the scalar path (where it is
correct), and somehow it wasn't causing failures on current drivers.

7 weeks agovulkan: in flash attention, bounds check against nem1 (don't rely on GGML_KQ_MASK_PAD...
Jeff Bolz [Fri, 3 Oct 2025 08:33:08 +0000 (03:33 -0500)]
vulkan: in flash attention, bounds check against nem1 (don't rely on GGML_KQ_MASK_PAD) (llama/16316)

7 weeks agoggml webgpu: add support for soft_max, optimize rms_norm (llama/16357)
Reese Levine [Thu, 2 Oct 2025 18:00:31 +0000 (11:00 -0700)]
ggml webgpu: add support for soft_max, optimize rms_norm (llama/16357)

* Add inplace softmax

* Move rms_norm to split row approach

* Update debug for supports_op

* clean up debug statements

* Update tests/test-backend-ops.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agomodel : Apertus model implementation (llama/15852)
Piotr Wilkin (ilintar) [Thu, 2 Oct 2025 17:43:22 +0000 (19:43 +0200)]
model : Apertus model implementation (llama/15852)

* First attempt

* No permute during convert (fixes qk tensors), proper norm application.

* RoPE = NeoX

* Coherence!

* Migrate xielu params from tensors to hyperparameters

* Simple CUDA kernel

* Revert stupid LLM refactorings

* Chat template support

* configchecker / flake8 errors

* Reorder unary.cu

* I do conclude that LLMs are, in fact, stupid.

* Fix after merge

* Final newline

* Make xIELU an UNARY_OP

* Final newline

* Correctly account for parameter shift

* Argh.

* Update ggml/src/ggml-cpu/unary-ops.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Refactor: remove unused methods, inline and factorize softplus, add const modifiers

* Revert CUDA changes, implement xIELU as a separate OP

* Pesky newline

* Add float2half / half2float for F16 inputs/outputs

* CUDA variants, attempt 2

* Actually, attempt 3

* Update ggml/src/ggml-cuda/unary.cu

Co-authored-by: Johannes Gäßler <redacted>
* Missing convert header

* Proper formula and reference for xIELU in the comments.

* Modify unary-ops.cpp to add the functor-based logic besides the template system to retain optimizations

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* Add tensor mappings for Apertus to global list instead

* Fix lazy on scalars

* Update ggml/src/ggml-cuda/unary.cu

Co-authored-by: Johannes Gäßler <redacted>
* Add comment about the constraints on positive/negative alpha

* Change `softplus` to `ggml_softplus`

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Johannes Gäßler <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agomusa: update compile flags (llama/16265)
R0CKSTAR [Thu, 2 Oct 2025 13:29:56 +0000 (21:29 +0800)]
musa: update compile flags (llama/16265)

Signed-off-by: Xiaodong Ye <redacted>
7 weeks agoHIP: Disable ROCWMMA fattn on CDNA when compiled against ROCWMMA 2.0.0 (llama/16221)
uvos [Wed, 1 Oct 2025 21:09:25 +0000 (23:09 +0200)]
HIP: Disable ROCWMMA fattn on CDNA when compiled against ROCWMMA 2.0.0 (llama/16221)

* HIP: Disable ROCWMMA fatt on CDNA when compiled against ROCWMMA 2.0.0

rocwmma 2.0.0 includes a bug in the code fakeing fp16 accumulation on CDNA

* CUDA: Fix volta condition in ggml_cuda_should_use_wmma_fattn

7 weeks agovulkan: make ggml_vk_default_dispatcher support older vulkan headers (llama/16345)
Eve [Wed, 1 Oct 2025 07:56:36 +0000 (07:56 +0000)]
vulkan: make ggml_vk_default_dispatcher support older vulkan headers (llama/16345)

* make ggml_vk_default_dispatcher support older vulkan headers

* simpilfy with using

7 weeks agoopencl: support pad_ext (llama/15888)
lhez [Tue, 30 Sep 2025 17:45:45 +0000 (10:45 -0700)]
opencl: support pad_ext (llama/15888)

7 weeks agoggml webgpu: support for rope,div,sub,glu,scale,cont operators (llama/16187)
Reese Levine [Tue, 30 Sep 2025 16:57:51 +0000 (09:57 -0700)]
ggml webgpu: support for rope,div,sub,glu,scale,cont operators (llama/16187)

* Work on rope

* Simplify inplace operation generation and combine mul/add generation

* Work on rope variants

* implement neox rope

* rope complete

* Add sub,div,glu operators

* implement scale op

* Update cpy shader to handle cont/more types

* formatting

* Update test vars printing for rope,rms_norm

* Avoid ROPE hardcoded constants

* Add TODO to change ROPE constants to enum

Co-authored-by: Georgi Gerganov <redacted>
* fix TODO comment

---------

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoopencl: support ne3 in get_rows (llama/15866)
lhez [Tue, 30 Sep 2025 16:55:13 +0000 (09:55 -0700)]
opencl: support ne3 in get_rows (llama/15866)

7 weeks agowhisper : Support using devices of type iGPU (#3469)
Ruben Ortlam [Sat, 11 Oct 2025 14:55:16 +0000 (16:55 +0200)]
whisper : Support using devices of type iGPU (#3469)

7 weeks agowhisper : add support for --carry-initial-prompt (#3395)
Andreas Lubbe [Fri, 10 Oct 2025 16:51:15 +0000 (18:51 +0200)]
whisper : add support for --carry-initial-prompt (#3395)

* Add support for --carry-initial-prompt

* PR fixes for ruby and go

* Refactoring for readability

* WIP 1

* WIP 2

* PR fixes

* More PR fixes

* PR fix

* Further simplification

* d'oh

* One more logic fix

* Update src/whisper.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Truncate prompt_past0 upon initialization

* Slight simplification

---------

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoMerge tag 'upstream/1.8.0' into debian/latest
Mathieu Baudier [Fri, 10 Oct 2025 14:12:25 +0000 (16:12 +0200)]
Merge tag 'upstream/1.8.0' into debian/latest

Upstream release

7 weeks agocli: Fix assignment for vad_min_silence_duration_ms (#3467)
Andreas Lubbe [Fri, 10 Oct 2025 13:21:03 +0000 (15:21 +0200)]
cli: Fix assignment for vad_min_silence_duration_ms (#3467)

* cli: Fix assignment for vad_min_silence_duration_ms

Found and fixed this simple copy/paste error

* server : fix vad_min_silence_duration_ms assignment

---------

Co-authored-by: Daniel Bevenius <redacted>
7 weeks agominor : fix code style (#3463)
Georgi Gerganov [Fri, 10 Oct 2025 08:33:01 +0000 (11:33 +0300)]
minor : fix code style (#3463)

7 weeks agovad : free vad_segments in whisper_vad (#3463)
Silviu Caragea [Fri, 10 Oct 2025 04:20:21 +0000 (04:20 +0000)]
vad : free vad_segments in whisper_vad (#3463)

This commit fixes multiple issues:

* memory leak because vad_segments is never released
* avoid segmentation fault when whisper_vad_segments_from_samples returns nullptr.
* avoid potential segmentation fault when the app fails to allocate memory for filtered samples and the vad context is released but also get released withing state itself when whisper_free_state is called

7 weeks agowhisper : clean-up headers
Georgi Gerganov [Thu, 9 Oct 2025 07:48:40 +0000 (10:48 +0300)]
whisper : clean-up headers

7 weeks ago[skip ci]Bump Ruby bindings' version to 1.3.4 (#3461)
KITAITI Makoto [Wed, 8 Oct 2025 11:45:20 +0000 (20:45 +0900)]
[skip ci]Bump Ruby bindings' version to 1.3.4 (#3461)

8 weeks agovad : fix memory leaks in VAD implementation (#3453)
Daniel Bevenius [Mon, 6 Oct 2025 12:57:44 +0000 (14:57 +0200)]
vad : fix memory leaks in VAD implementation (#3453)

* vad : fix memory leak by storing ggml_context in vad context struct

This commit addresses a memory leak issue in the voice activity
detection (VAD) where the ggml_context is not stored within the vad
context structure.

The motivation for this change that this is causing the context memory
to stay allocated and the tensor still point to that memory but this
memory is never freed.

* vad : free memory allocated for VAD hparams

This commit frees the model hyperparameters allocated for the VAD
context in the `whisper_vad_free` function. Specifically, it deletes the
`encoder_in_channels`, `encoder_out_channels`, and `kernel_sizes` arrays
allocated with `new[]` in the `whisper_vad_init` function.

The motivation for this is to prevent memory leaks when the VAD.

* vad: free ggml buffer in whisper_vad_free

This commit frees the ggml buffer in the whisper_vad_free function to
prevent memory leaks.

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

* Revert "vad : fix memory leak by storing ggml_context in vad context struct"

This reverts commit aeafca437efa7fb28166703f845e321176aa62ab.

* whisper : free ggml context in whisper_vad_init_context

This commit frees the ggml_context after initializing the VAD context in
the whisper_vad_init_context function.

The motivation for this is to prevent memory leaks.

2 months agoruby : Loose RegExp for test (#3448)
KITAITI Makoto [Wed, 1 Oct 2025 12:33:11 +0000 (21:33 +0900)]
ruby : Loose RegExp for test (#3448)

2 months agobindings-java : disable flash attention by default (#3445)
Daniel Bevenius [Wed, 1 Oct 2025 07:13:34 +0000 (09:13 +0200)]
bindings-java : disable flash attention by default (#3445)

This commit disables flash-attention for the Java binding test so that
the testFullTranscribe test passes.

Without this change the test was failing because the expected output
mismatches after the flash-attention change:
```console
<And so my fellow Americans ask not what your country can do for you ask what you can do for your country.>
but was:
<and so my fellow Americans ask not what your country can do for you ask what you can do for your country>
```

An alternative would also be to update the expected output but it felt
better to keep the same expected output and disable flash-attention and
not just change the expected output to match the new behavior.

2 months agobench : update [no ci]
Georgi Gerganov [Tue, 30 Sep 2025 18:40:32 +0000 (21:40 +0300)]
bench : update [no ci]

2 months agoscripts : add -nfa option [no ci]
Georgi Gerganov [Tue, 30 Sep 2025 18:37:00 +0000 (21:37 +0300)]
scripts : add -nfa option [no ci]

2 months agowchess : fix link [no ci]
Georgi Gerganov [Tue, 30 Sep 2025 18:28:03 +0000 (21:28 +0300)]
wchess : fix link [no ci]

2 months agorelease : v1.8.0 upstream/1.8.0
Georgi Gerganov [Tue, 30 Sep 2025 18:25:16 +0000 (21:25 +0300)]
release : v1.8.0

2 months agoexamples : add wchess.wasm to wasm examples build (#3443)
Daniel Bevenius [Tue, 30 Sep 2025 14:23:01 +0000 (16:23 +0200)]
examples : add wchess.wasm to wasm examples build (#3443)

* examples : add wchess.wasm to wasm examples build

This commit add the wchess.wasm example to the wasm examples that are
deployed to https://ggml.ai/whisper.cpp.

Refs: https://github.com/ggml-org/whisper.cpp/issues/3434#issuecomment-3346980420

2 months agowhisper : enable flash attention by default (#3441)
Georgi Gerganov [Tue, 30 Sep 2025 12:47:20 +0000 (15:47 +0300)]
whisper : enable flash attention by default (#3441)

2 months agobench : add rtx 5090 [no ci]
Georgi Gerganov [Tue, 30 Sep 2025 10:28:50 +0000 (13:28 +0300)]
bench : add rtx 5090 [no ci]

2 months agoggml : bump version to 0.9.4 (ggml/1363)
Georgi Gerganov [Tue, 30 Sep 2025 10:42:39 +0000 (13:42 +0300)]
ggml : bump version to 0.9.4 (ggml/1363)

2 months agobench : update [no ci]
Georgi Gerganov [Tue, 30 Sep 2025 09:51:25 +0000 (12:51 +0300)]
bench : update [no ci]

2 months agosync : ggml
Georgi Gerganov [Tue, 30 Sep 2025 09:31:08 +0000 (12:31 +0300)]
sync : ggml

2 months agocuda : Enable CUDA Graph usage for Nemotron Nano v2 (NemotronH) (llama/16328)
anavp-nvidia [Tue, 30 Sep 2025 08:13:22 +0000 (08:13 +0000)]
cuda : Enable CUDA Graph usage for Nemotron Nano v2 (NemotronH) (llama/16328)

* Fix Nemotron Nano v2 9B not executing as CUDA Graph on NVIDIA GPUs

* fix to ensure test-backend-ops check passes

2 months agometal : dynamic simdgroups for MV kernels (llama/16340)
Georgi Gerganov [Tue, 30 Sep 2025 08:03:23 +0000 (11:03 +0300)]
metal : dynamic simdgroups for MV kernels (llama/16340)

* metal : dynamic simdgroups for MV kernels

* cont : minor

2 months agokleidiai : fix work size and threads sync for fp16 (llama/16246)
Charles Xu [Tue, 30 Sep 2025 07:07:20 +0000 (09:07 +0200)]
kleidiai : fix work size and threads sync for fp16 (llama/16246)

2 months agoggml: riscv: add riscv spacemit backend (llama/15288)
alex-spacemit [Mon, 29 Sep 2025 14:50:44 +0000 (22:50 +0800)]
ggml: riscv: add riscv spacemit backend (llama/15288)

* ggml: add spacemit backend

Change-Id: I249bdc043485d815a9c351867137bc1e27cc2e23

* add new line at end of file

Change-Id: I889ed1c85fb45e62350ecde0c06f70450cadfbe2

* add riscv zba extension limit

Change-Id: I321eb200f859751727afe5cae13074dfce2bb0ce

* fixed for review comments, file renamed and format

Change-Id: Ia20b6ec24a36638e62e0fe07cf100916a7cce3ce

* fixed for code format, after clang-format

Change-Id: I5dc33a0412da3d3f2d77075d8939185d3009eca2

* use _Float16 instead of __fp16

Change-Id: I039fb02bb95270e641bc4442204e658735859d43

* add ci for riscv64-spacemit-ime-native

Change-Id: I711c1033061df1a289ea77891b2997599dfe8279

* update debian-13-riscv64-spacemit-ime-native ci label

Change-Id: Ifb2b891e2fca57b5da604fce2ac255f27731179a

* remove license comment for spacemit ime

Change-Id: If0dc3ca30a958631ccca0a28b62e0b825f9fb0c3

* upgrade binutils for gcc ime

Change-Id: Ibf2fa74c1064408974cb5b45f044d40987e5fb45

* add spacemit ime cross jobs

Change-Id: I80d74909941d41cb9cd09e51d8baf01c985cbfc6

* remove native compile for riscv64-spacemit-ime

Change-Id: I01920afafdc73fa7424014fd648d243f8ec9e25e

* ci : add caching for spacemit ime cross toolchain

Change-Id: Ic54a192019a2fd982bbd58225ce3bbc38f4053de

* ci: bug fixed for cache path and env

Change-Id: I28c42e10b6fff053bb6580926ca2353448cb042a

* Update .github/workflows/build-linux-cross.yml for cache path

Co-authored-by: Sigbjørn Skjæret <redacted>
* bugfixed for  build-linux-cross.yml,  syntax error

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

Co-authored-by: cailinxi <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoggml-backend : add root cause in error message if loading backend library fails ...
Rafal Lewczuk [Mon, 29 Sep 2025 11:17:09 +0000 (13:17 +0200)]
ggml-backend : add root cause in error message if loading backend library fails (llama/16172)

This PR adds additional information to an error message when loading backend library via ld_load_library() fails. This helps spotting why backend library did not load (missing library, missing dependency or unresolved symbol etc.).

2 months agobench : update [no ci] (#3439)
Georgi Gerganov [Mon, 29 Sep 2025 14:42:38 +0000 (17:42 +0300)]
bench : update [no ci] (#3439)

2 months agobench : warm-up all kernels (#3438)
Georgi Gerganov [Mon, 29 Sep 2025 14:27:53 +0000 (17:27 +0300)]
bench : warm-up all kernels (#3438)

2 months agoggml : remove oboslete files (#0)
Georgi Gerganov [Mon, 29 Sep 2025 13:47:30 +0000 (16:47 +0300)]
ggml : remove oboslete files (#0)

2 months agoci : add self-hosted workflows (#3437)
Georgi Gerganov [Mon, 29 Sep 2025 13:42:39 +0000 (16:42 +0300)]
ci : add self-hosted workflows (#3437)

* ci : add self-hosted workflows

* cont : fail workflow if there is an error

2 months agowhisper : remove ggml_mul_mat padding (#3436)
Georgi Gerganov [Mon, 29 Sep 2025 13:42:08 +0000 (16:42 +0300)]
whisper : remove ggml_mul_mat padding (#3436)

2 months agotalk-llama : sync llama.cpp
Georgi Gerganov [Mon, 29 Sep 2025 12:18:41 +0000 (15:18 +0300)]
talk-llama : sync llama.cpp

2 months agosync : ggml
Georgi Gerganov [Mon, 29 Sep 2025 12:18:18 +0000 (15:18 +0300)]
sync : ggml

2 months agocmake : remove metal flag (llama/0)
Georgi Gerganov [Mon, 29 Sep 2025 09:33:38 +0000 (12:33 +0300)]
cmake : remove metal flag (llama/0)

2 months agoggml : check cuda and metal argsort limits and add test (llama/16323)
Sigbjørn Skjæret [Mon, 29 Sep 2025 09:09:00 +0000 (11:09 +0200)]
ggml : check cuda and metal argsort limits and add test (llama/16323)

* check cuda argsort limits and add test

* add metal check

2 months agoggml : fix dependencies for ggml_set_rows (llama/16318)
Georgi Gerganov [Mon, 29 Sep 2025 05:41:28 +0000 (08:41 +0300)]
ggml : fix dependencies for ggml_set_rows (llama/16318)