]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 months agohexagon: various Op fixes (#17135)
Max Krasnyansky [Tue, 11 Nov 2025 23:25:04 +0000 (15:25 -0800)]
hexagon:  various Op fixes (#17135)

* hexagon: explicitly check for ops with zero nrows

llm_graph_context::build_inp_out_ids() can generate tensors with zero nrows.
Somehow other backends seems to handle this without obvious explicit checks.
In the hexagon case we need to check explicitly and skip them.

* hexagon: introduce fastdiv, fix test-backend-ops for ADD/SUB/MUL

Co-authored-by: chraac <redacted>
* hexagon: use fastdiv in ADD_ID

* hexagon: use ggml_op_is_empty and ggml_is_empty to check for NOPs

---------

Co-authored-by: chraac <redacted>
2 months agodisable rms norm mul rope for chips with no fp16 rte (#17134)
Eve [Tue, 11 Nov 2025 18:53:30 +0000 (18:53 +0000)]
disable rms norm mul rope for chips with no fp16 rte (#17134)

2 months agoci: add Arm-hosted Graviton4 runner (#17021)
sudhiarm [Tue, 11 Nov 2025 15:58:05 +0000 (15:58 +0000)]
ci: add Arm-hosted Graviton4 runner (#17021)

* ci: add Arm-hosted Graviton4 runner

* ci: add missing dependencies for graviton4 build

* ci: enable LFS checkout on graviton4

* ci: move git-lfs install to dependencies in Graviton4 workflow

2 months agovendor: split httplib to cpp/h files (#17150)
Xuan-Son Nguyen [Tue, 11 Nov 2025 12:32:58 +0000 (13:32 +0100)]
vendor: split httplib to cpp/h files (#17150)

* vendor: split httplib to cpp/h files

* move defines

* include httplib if curl is not used

* add TODO

* fix build ios

* fix build visionos instead

2 months agoggml-cpu : add RISC-V RVV (Zvfh) optimization for FP16 to FP32 conversion (#17161)
ixgbe [Tue, 11 Nov 2025 11:41:51 +0000 (19:41 +0800)]
ggml-cpu : add RISC-V RVV (Zvfh) optimization for FP16 to FP32 conversion (#17161)

Signed-off-by: Wang Yang <redacted>
2 months agoggml-cpu: templateify ggml_compute_forward_rope_f32 and _f16 (#16805)
duduta [Tue, 11 Nov 2025 11:33:24 +0000 (13:33 +0200)]
ggml-cpu: templateify ggml_compute_forward_rope_f32 and _f16 (#16805)

* extract rotate_pairs logic from ggml_compute_forward_rope_f32

* templateify ggml_compute_forward_rope_f32 and _f16

* abort when rope type not supported, remove GLM from test-rope

* add imrope branch to switch

* add rope tests for perf

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

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml-cpu/ops.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
2 months agokleidiai: add optimized per-channel kernels for Q8_0 (#16993)
Charles Xu [Tue, 11 Nov 2025 11:20:31 +0000 (12:20 +0100)]
kleidiai: add optimized per-channel kernels for Q8_0 (#16993)

2 months agocmake : add version to all shared object files (#17091)
Mike Abbott [Tue, 11 Nov 2025 11:19:50 +0000 (04:19 -0700)]
cmake : add version to all shared object files (#17091)

When compiling llama.cpp in Yocto, it fails QA checks because the generated so files aren't versioned.  This applies a version to all generated so files, allowing the package to build without errors.

2 months agoInstall rpc-server when GGML_RPC is ON. (#17149)
Nicolas B. Pierron [Tue, 11 Nov 2025 10:53:59 +0000 (11:53 +0100)]
Install rpc-server when GGML_RPC is ON. (#17149)

2 months agoconvert : register UMT5Model architecture for T5 conversion (#17160)
levkropp [Tue, 11 Nov 2025 08:38:30 +0000 (03:38 -0500)]
convert : register UMT5Model architecture for T5 conversion (#17160)

Register UMT5Model as a supported architecture variant for T5 model conversion.
This allows the conversion to work for models downloaded with AutoModel.

2 months agoopencl: add fastdiv and use it in set_rows, ported from cuda (#17090)
lhez [Mon, 10 Nov 2025 23:00:13 +0000 (15:00 -0800)]
opencl: add fastdiv and use it in set_rows, ported from cuda (#17090)

* opencl: add fastdiv for mm q8_0

* opencl: use uint4 for fastdiv vals

* opencl: use fastdiv for set_rows

* opencl: do not use fastdiv for q8_0 mm

2 months agomodels : move build_inp_out_ids outside loop (#17151)
Sigbjørn Skjæret [Mon, 10 Nov 2025 21:55:30 +0000 (22:55 +0100)]
models : move build_inp_out_ids outside loop (#17151)

* move build_inp_out_ids outside loop

* realign

2 months agocpu: skip NOPs to avoid barriers (#17133)
Max Krasnyansky [Mon, 10 Nov 2025 20:44:49 +0000 (12:44 -0800)]
cpu: skip NOPs to avoid barriers (#17133)

* cpu: skip NOPs to avoid barriers

* cpu: use ggml_op_is_empty

2 months agometal : cap threadgroups size of set_rows (#17146)
Georgi Gerganov [Mon, 10 Nov 2025 19:33:35 +0000 (21:33 +0200)]
metal : cap threadgroups size of set_rows (#17146)

2 months agoggml-cpu : inspect -march and -mcpu to found the CPU (#16333)
Adrien Gallouët [Mon, 10 Nov 2025 19:03:36 +0000 (20:03 +0100)]
ggml-cpu : inspect -march and -mcpu to found the CPU (#16333)

Signed-off-by: Adrien Gallouët <redacted>
2 months agovulkan: check glslc executable string (#17144)
Ruben Ortlam [Mon, 10 Nov 2025 15:59:26 +0000 (16:59 +0100)]
vulkan: check glslc executable string (#17144)

2 months agovulkan: fix validation issue introduced by #16868 (#17145)
Ruben Ortlam [Mon, 10 Nov 2025 15:59:10 +0000 (16:59 +0100)]
vulkan: fix validation issue introduced by #16868 (#17145)

2 months agomemory: Hybrid context shift (#17009) upstream/0.0.7011
Gabe Goodhart [Mon, 10 Nov 2025 15:14:23 +0000 (08:14 -0700)]
memory: Hybrid context shift (#17009)

* feat(memory): Only fail partial erasure of recurrent tail

The recurrent state is always assumed to be the state as of the last update
from the final token in the sequence. When doing a partial erasure, if the
range does not include the final token, the erasure can be considered a
success since any memory used for the sequence prior to the final token
(which is no memory) has been successfully removed.

There is one potential case that this doesn't address which is the pruning
of cache to remove sensitive data from the context. This wouldn't work for
attention cache partial removal (in the middle) either since the KV state
is linearly-dependent and states in later sequence positions would still be
based on the state from the sensitive data, even if that data is no longer
cached, so I don't think this is relevant, but it is worth noting that the
semantics of this change for a partial erasure in the middle of the cache
are essentially "my context is already compressed" and not "all trace of
the removed tokens has been removed."

https://github.com/ggml-org/llama.cpp/issues/16768
Branch: HybridContextShift-16768

Signed-off-by: Gabe Goodhart <redacted>
* fix(main): Check the output of seq_rm for prefix matching

This prefix matching is explicitly attempting to remove the tokens at the
end of the sequence that don't match. This is the operation that can't be
performed on a recurrent cache due to the state being updated in place, so
if this removal fails, we need to clear the whole cache.

https://github.com/ggml-org/llama.cpp/issues/16768
Branch: HybridContextShift-16768

Signed-off-by: Gabe Goodhart <redacted>
* fix(memory): Fix condition for partial erasure failure if p0 > pos

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: compilade <redacted>
* style: Fix extra parens

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
* fix(main.cpp): Set n_matching_session_tokens to 0 on cache clear

https://github.com/ggml-org/llama.cpp/issues/16768
Branch: HybridContextShift-16768

Signed-off-by: Gabe Goodhart <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: compilade <redacted>
Co-authored-by: Georgi Gerganov <redacted>
2 months agometal : enable tensor API for A19 (#17087)
Georgi Gerganov [Mon, 10 Nov 2025 13:38:42 +0000 (15:38 +0200)]
metal : enable tensor API for A19 (#17087)

2 months agoarm64: add i8mm route with SVE ggml_vec_dot_q4_K_q8_K and ggml_vec_dot_q6_K_… (#15277)
fj-y-saito [Mon, 10 Nov 2025 13:12:59 +0000 (22:12 +0900)]
arm64: add i8mm route with SVE ggml_vec_dot_q4_K_q8_K and ggml_vec_dot_q6_K_… (#15277)

* add i8mm route with SVE ggml_vec_dot_q4_K_q8_K and ggml_vec_dot_q6_K_q8_K

* Surround SVE function with compiler directive

* fix compile switch

* fix coding style

* ggml : fix indent

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agobatched-bench : add "separate text gen" mode (#17103)
Georgi Gerganov [Mon, 10 Nov 2025 10:59:29 +0000 (12:59 +0200)]
batched-bench : add "separate text gen" mode (#17103)

2 months agomtmd: fix patch_size initialized to random value in audio models (#17128)
Xuan-Son Nguyen [Mon, 10 Nov 2025 10:41:05 +0000 (11:41 +0100)]
mtmd: fix patch_size initialized to random value in audio models (#17128)

* mtmd: fix patch_size initialized to random value in audio models

* add default hparams

2 months agoeditorconfig : ignore benches/ (#17140)
Georgi Gerganov [Mon, 10 Nov 2025 10:17:19 +0000 (12:17 +0200)]
editorconfig : ignore benches/ (#17140)

[no ci]

2 months agocuda/vulkan : bicubic interpolation (#17022)
Acly [Mon, 10 Nov 2025 09:19:39 +0000 (10:19 +0100)]
cuda/vulkan : bicubic interpolation (#17022)

* vulkan : implement upscale with bicubic interpolation

* cuda : implement upscale with bicubic interpolation

* tests : add ggml_interpolate with GGML_SCALE_MODE_BICUBIC to backend tests

* adapt OpenCL backend to not support the OP in that case so tests don't fail

* print scale mode & flags in test-backend-ops

2 months agobenches : add eval results (#17139)
Georgi Gerganov [Mon, 10 Nov 2025 08:44:10 +0000 (10:44 +0200)]
benches : add eval results (#17139)

[no ci]

2 months agomtmd : fix embedding size for image input (#17123)
Georgi Gerganov [Sun, 9 Nov 2025 16:31:02 +0000 (18:31 +0200)]
mtmd : fix embedding size for image input (#17123)

2 months agovulkan: fix memory allocations (#17122)
Ruben Ortlam [Sun, 9 Nov 2025 15:14:41 +0000 (16:14 +0100)]
vulkan: fix memory allocations (#17122)

2 months agoconvert : parse safetensors directly (#15667)
compilade [Sun, 9 Nov 2025 14:49:40 +0000 (09:49 -0500)]
convert : parse safetensors directly (#15667)

* convert : parse safetensors directly

* gguf-py : order safetensors tensors by name

Applies to both local and remote safetensors custom parsing.
This matches the behavior of the official safetensors implementation.

* convert : rename from_safetensors_meta to from_local_tensor

For consistency with from_remote_tensor

* convert : fix no-lazy dtypes from direct safetensors

2 months agoconvert : handle compressed-tensors quant method (#17069)
compilade [Sun, 9 Nov 2025 14:45:50 +0000 (09:45 -0500)]
convert : handle compressed-tensors quant method (#17069)

* convert : handle compressed-tensors quant method

* convert : handle int-quantized models

* convert : handle naive-quantized models

* gguf-py : __pos__ is also unary

* convert : fix flake8 lint

* convert : use F32 for dequant of pack-quantized tensors

2 months agoserver : handle failures to restore host cache (#17078)
Georgi Gerganov [Sun, 9 Nov 2025 12:27:05 +0000 (14:27 +0200)]
server : handle failures to restore host cache (#17078)

* server : handle failures to restore host cache

* server : add tests for the prompt cache

2 months agobenches : add folder with benchmarks (#16931)
Georgi Gerganov [Sun, 9 Nov 2025 10:53:29 +0000 (12:53 +0200)]
benches : add folder with benchmarks (#16931)

* benches : add folder with benchmarks

* benches : update dgx-spark bench

2 months agoSwitch to using Ubuntu 25.10 vulkan/mesa (#16497)
Eric Curtin [Sun, 9 Nov 2025 09:25:38 +0000 (09:25 +0000)]
Switch to using Ubuntu 25.10 vulkan/mesa (#16497)

Because "Ubuntu packages to be discontinued in Vulkan SDK"

Signed-off-by: Eric Curtin <redacted>
2 months agovulkan: iGPU memory reporting fix (#17110)
Ruben Ortlam [Sun, 9 Nov 2025 08:54:47 +0000 (09:54 +0100)]
vulkan: iGPU memory reporting fix (#17110)

* vulkan: use all device-local heaps for memory availability reporting

Co-authored-by: Giuseppe Scrivano <redacted>
* use all available heaps for iGPU memory reporting

* Allow multiple memory types per buffer request for devices with split heaps

---------

Co-authored-by: Giuseppe Scrivano <redacted>
2 months agovulkan: fix mmq out of bounds reads (#17108)
Ruben Ortlam [Sun, 9 Nov 2025 08:52:57 +0000 (09:52 +0100)]
vulkan: fix mmq out of bounds reads (#17108)

* vulkan: fix mmq out of bounds reads, streamline outdated matmul host code

* fix mul_mat_id quantization call

* Fix compiler warnings

2 months agovulkan: fuse mul_mat_id + mul (#17095)
Jeff Bolz [Sun, 9 Nov 2025 08:48:42 +0000 (02:48 -0600)]
vulkan: fuse mul_mat_id + mul (#17095)

* vulkan: fuse mul_mat_id + mul

This comes up in qwen3 moe.

* split mul_mat_id fusion tests into a separate class

2 months agometal : retain src and dst buffers during async ops (#17101)
Georgi Gerganov [Sun, 9 Nov 2025 06:28:51 +0000 (08:28 +0200)]
metal : retain src and dst buffers during async ops (#17101)

2 months agoarg: add --cache-list argument to list cached models (#17073)
Xuan-Son Nguyen [Sat, 8 Nov 2025 20:54:14 +0000 (21:54 +0100)]
arg: add --cache-list argument to list cached models (#17073)

* arg: add --cache-list argument to list cached models

* new manifest naming format

* improve naming

* Update common/arg.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
2 months agowebui: fix keyboard shortcuts for new chat & edit chat title (#17007)
chansikpark [Sat, 8 Nov 2025 19:52:35 +0000 (14:52 -0500)]
webui: fix keyboard shortcuts for new chat & edit chat title (#17007)

2 months agovulkan: Use spec constants for conv2d s/d/p and kernel W/H (#16978)
Jeff Bolz [Sat, 8 Nov 2025 19:24:29 +0000 (13:24 -0600)]
vulkan: Use spec constants for conv2d s/d/p and kernel W/H (#16978)

* vulkan: Use spec constants for conv2d s/d/p and kernel W/H

Also add some additional unroll hints, which seems to help.

* lock around map lookup

2 months agoserver: fix correct time_ms calculation in prompt_progress (#17093)
Aidan [Sat, 8 Nov 2025 13:12:11 +0000 (13:12 +0000)]
server: fix correct time_ms calculation in prompt_progress (#17093)

* fix: correct time_ms calculation in send_partial_response

The time_ms field was incorrectly calculated. The division was happening
before the subtraction leading to incorrect values.

Before: (ggml_time_us() - slot.t_start_process_prompt / 1000) After:
(ggml_time_us() - slot.t_start_process_prompt) / 1000

* docs : document time_ms field in prompt_progress

2 months agoRevert "CUDA: add expert reduce kernel (#16857)" (#17100)
Aman Gupta [Sat, 8 Nov 2025 13:05:19 +0000 (21:05 +0800)]
Revert "CUDA: add expert reduce kernel (#16857)" (#17100)

2 months agoCUDA: skip fusion for repeating adds in bias (#17080)
Aman Gupta [Sat, 8 Nov 2025 08:58:05 +0000 (16:58 +0800)]
CUDA: skip fusion for repeating adds in bias (#17080)

2 months agovulkan: Increase BK to 32; use BK/4 for non-CM mul_mm.comp (#16636)
SavicStefan [Sat, 8 Nov 2025 08:28:22 +0000 (09:28 +0100)]
vulkan: Increase BK to 32; use BK/4 for non-CM mul_mm.comp (#16636)

Signed-off-by: Stefan Savic <redacted>
Co-authored-by: Stefan Savic <redacted>
2 months agoggml: disable vxe for cross-compilation by default (#16966)
Aleksei Nikiforov [Sat, 8 Nov 2025 08:00:20 +0000 (09:00 +0100)]
ggml: disable vxe for cross-compilation by default (#16966)

Otherwise compilation will fail due to enabling -mvx -mzvector
and not setting corresponding -march options.

2 months agovulkan: fuse rms_norm + mul + rope (+ view + set_rows) (#16977)
Jeff Bolz [Sat, 8 Nov 2025 07:52:15 +0000 (01:52 -0600)]
vulkan: fuse rms_norm + mul + rope (+ view + set_rows) (#16977)

This change combines the rms_norm+mul and rope+view+set_rows fusions to
allow fusing the whole sequence together. This comes up in Qwen3, Bailing,
and some other models.

2 months agovulkan: Fix test-thread-safety crashes (#17024)
Jeff Bolz [Sat, 8 Nov 2025 07:39:45 +0000 (01:39 -0600)]
vulkan: Fix test-thread-safety crashes (#17024)

The std::map pipeline_flash_attn_f32_f16 could be searched and inserted at the
same time, which needs to hold the lock. To be safe, hold the lock for all of
ggml_vk_load_shaders.

2 months agoCUDA: fix MMQ stream-k fixup ne1 indices (#17089)
Johannes Gäßler [Sat, 8 Nov 2025 07:26:18 +0000 (08:26 +0100)]
CUDA: fix MMQ stream-k fixup ne1 indices (#17089)

2 months agoggml webgpu: faster matrix multiplication/matrix-vector multiplication (#17031)
Reese Levine [Sat, 8 Nov 2025 03:27:20 +0000 (19:27 -0800)]
ggml webgpu: faster matrix multiplication/matrix-vector multiplication (#17031)

* Faster tensors (#8)

Add fast matrix and matrix/vector multiplication.

* Use map for shader replacements instead of pair of strings

2 months agoCUDA: properly handle nb00=nb02 case for cpy (#17081)
bssrdf [Fri, 7 Nov 2025 22:41:58 +0000 (17:41 -0500)]
CUDA: properly handle nb00=nb02 case for cpy (#17081)

2 months agovulkan : refactor buffer handling in vk_op_f32 (#16840)
Acly [Fri, 7 Nov 2025 20:08:50 +0000 (21:08 +0100)]
vulkan : refactor buffer handling in vk_op_f32 (#16840)

* vulkan : refactor/simplify buffer handling in vk_op_* functions

* Combine UMA handling into ggml_vk_tensor_subbuffer

2 months agoCUDA: fix should_use_mmvf for ne11 == 1 (#17085)
Johannes Gäßler [Fri, 7 Nov 2025 19:53:14 +0000 (20:53 +0100)]
CUDA: fix should_use_mmvf for ne11 == 1 (#17085)

* CUDA: fix should_use_mmvf for ne11 == 1

* Apply suggestion from @am17an

Co-authored-by: Aman Gupta <redacted>
---------

Co-authored-by: Aman Gupta <redacted>
2 months agobench : cache the llama_context state at computed depth (#16944)
Georgi Gerganov [Fri, 7 Nov 2025 19:23:11 +0000 (21:23 +0200)]
bench : cache the llama_context state at computed depth (#16944)

* bench : cache llama_context state at depth

* cont : handle failures to restore the old state

* cont : print information when the state is being reused

2 months agohparams : add n_embd_inp() to support extended embed (#16928)
Sigbjørn Skjæret [Fri, 7 Nov 2025 18:27:58 +0000 (19:27 +0100)]
hparams : add n_embd_inp() to support extended embed (#16928)

* add n_embd_full to support extended embed

* don't change output

* rename to n_embd_inp

* restore n_embd where applicable

2 months agokv-cache : pad the cache size to 256 for performance (#17046)
Georgi Gerganov [Fri, 7 Nov 2025 18:03:25 +0000 (20:03 +0200)]
kv-cache : pad the cache size to 256 for performance (#17046)

* kv-cache : pad the size of the small SWA cache for performance

* context : pad the total context to 256

* cont : future-proof the swa pad

* server : adjust test params to new logic

2 months agoRevert "ggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)" (#17084)
Adrien Gallouët [Fri, 7 Nov 2025 16:34:05 +0000 (17:34 +0100)]
Revert "ggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)" (#17084)

This reverts commit 7c23f3f0d4b9f5d6ea140756eb694b562d5acebb.

2 months agoggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)
iron [Fri, 7 Nov 2025 16:18:14 +0000 (00:18 +0800)]
ggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)

When using GCC 9 and GCC 12 on the arm64 platform of ubuntu 2004,
the command "gcc -mcpu=native -E -v -" fails to detect the correct CPU flags,
which results in compilation failures for certain extended instructions,
but the correct CPU flags can be obtained by using gcc -march.

Signed-off-by: lizhenneng <redacted>
Co-authored-by: lizhenneng <redacted>
2 months agoserver : print the samplers chain for each request (#17070)
Georgi Gerganov [Fri, 7 Nov 2025 10:24:47 +0000 (12:24 +0200)]
server : print the samplers chain for each request (#17070)

2 months agocommon: move download functions to download.(cpp|h) (#17059)
Xuan-Son Nguyen [Fri, 7 Nov 2025 10:23:34 +0000 (11:23 +0100)]
common: move download functions to download.(cpp|h) (#17059)

* common: move download functions to download.(cpp|h)

* rm unused includes

* minor cleanup

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoggml-cpu : optimize RVV q2_k and q3_k kernels (#16887)
xctan [Thu, 6 Nov 2025 16:12:45 +0000 (00:12 +0800)]
ggml-cpu : optimize RVV q2_k and q3_k kernels (#16887)

2 months agoCUDA: fix crash on uneven context without FA (#16988)
Johannes Gäßler [Thu, 6 Nov 2025 13:05:47 +0000 (14:05 +0100)]
CUDA: fix crash on uneven context without FA (#16988)

2 months agometal : initial Metal4 tensor API support (#16634)
Georgi Gerganov [Thu, 6 Nov 2025 12:45:10 +0000 (14:45 +0200)]
metal : initial Metal4 tensor API support (#16634)

* metal : rework mat-mat multiplication

* metal : initial Metal4 support

* cont

* metal : detect tensor support

* cont : better ifdefs

* metal : support tensors in mul_mm_id

* metal : add env for disabling tensor API

* tests : restore

* metal : remove unused constants

* metal : fix check for bfloat tensor support

* cont : handle API incompatibilities

* cont : handle even more incompatibilities

* metal : use tensor API only on M5 and later

2 months agoserver : disable checkpoints with mtmd (#17045)
Georgi Gerganov [Thu, 6 Nov 2025 10:09:29 +0000 (12:09 +0200)]
server : disable checkpoints with mtmd (#17045)

2 months agoclip: implement minicpm-v sinusoidal embd using GGML (#17036)
Xuan-Son Nguyen [Thu, 6 Nov 2025 10:02:54 +0000 (11:02 +0100)]
clip: implement minicpm-v sinusoidal embd using GGML (#17036)

* clip: implement minicpm-v sinusoidal embd using GGML

* fix repeat op

2 months agosycl: add CONCAT operator support (#16047)
YehuditE [Thu, 6 Nov 2025 10:02:33 +0000 (12:02 +0200)]
sycl: add CONCAT operator support (#16047)

* sycl: add CONCAT operator support

* cleanup: remove stray lines added by mistake

* fix: code format issues in concat.cpp and tests/test-backend-ops.cpp

* chore: fix editorconfig violations

* cleanup: drop unnecessary i16 type support

* docs: update sycl-csv and regenerate ops.md

* update docs/ops.md

* fix: adapt to upstream master changes after rebase

* fix: remove empty files

* fix: drop whitespace

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agodocs: explain CUDA 11 compilation [no ci] (#16824)
Johannes Gäßler [Thu, 6 Nov 2025 07:14:35 +0000 (08:14 +0100)]
docs: explain CUDA 11 compilation [no ci] (#16824)

2 months agoggml-hexagon: graceful fallback for older socs where rpcmem_alloc2 and FASTRPC_GET_UR...
l3utterfly [Thu, 6 Nov 2025 05:46:38 +0000 (13:46 +0800)]
ggml-hexagon: graceful fallback for older socs where rpcmem_alloc2 and FASTRPC_GET_URI is unsupported (#16987)

* support older socs where FASTRPC_GET_URI is unsupported

* added graceful fallback when FASTRPC_GET_URI call fails

* use weak symbols instead of loading libcdsprpc.so dynamically

* Add weak pragma for rpcmem_alloc2

* Remove weak declaration for rpcmem_alloc2 in ggml-hexagon.cpp

Removed weak declaration for rpcmem_alloc2.

* Enforce ndev to 1 for archs below v75

Force ndev to 1 for SoCs architectures lower than v75.

2 months agoimprove CUDA cpy memory bandwidth when copying transposed tensor (#16841)
bssrdf [Wed, 5 Nov 2025 20:55:04 +0000 (15:55 -0500)]
improve CUDA cpy memory bandwidth when copying transposed tensor  (#16841)

* WIP

* added a cpy kernel specific to transposed tensor which uses smem to avoid uncoalesced access; test cases also added shwoing improved memory bandwidth

* added BF16 support

* more strict check to make sure src0 is a transpose

* reformulated to handle more complicated transpose cases

* bring back 2D transpose for higher performance

* allow build on windows

* tranpose copy more shapes

* minor tweak

* final clean up

* restore some test cases

* keep only the kernel for true tranposed case; updated with review suggestions

* make CI happy

* remove headers not needed

* reduced bank conflicts for fp16 and bf16

* add missing const*

* now bank conflicts free

* use padding instead of swizzling

---------

Co-authored-by: bssrdf <redacted>
2 months agovulkan: Fix GGML_VULKAN_CHECK_RESULTS to better handle fusion (#16919)
Jeff Bolz [Wed, 5 Nov 2025 18:51:03 +0000 (12:51 -0600)]
vulkan: Fix GGML_VULKAN_CHECK_RESULTS to better handle fusion (#16919)

2 months agoexamples(gguf): GGUF example outputs (#17025)
Gabe Goodhart [Wed, 5 Nov 2025 17:58:16 +0000 (10:58 -0700)]
examples(gguf): GGUF example outputs (#17025)

* feat(llama-gguf): Print out the tensor type in llama-gguf r

Branch: Mamba2Perf

Signed-off-by: Gabe Goodhart <redacted>
* feat(off-topic): print the number of elements in tensors with llama-gguf

Branch: Mamba2SSD

Signed-off-by: Gabe Goodhart <redacted>
* style: valign

Branch: GGUFToolOutputs

Signed-off-by: Gabe Goodhart <redacted>
* Update examples/gguf/gguf.cpp

---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
2 months agomtmd: allow QwenVL to process larger image by default (#17020)
Xuan-Son Nguyen [Wed, 5 Nov 2025 13:26:49 +0000 (14:26 +0100)]
mtmd: allow QwenVL to process larger image by default (#17020)

2 months agoserver : do not default to multiple slots with speculative decoding (#17017)
Georgi Gerganov [Wed, 5 Nov 2025 12:32:55 +0000 (14:32 +0200)]
server : do not default to multiple slots with speculative decoding (#17017)

* server : do not default to multiple slots with speculative decoding

* cont : fix

2 months agomtmd: improve struct initialization (#16981)
Xuan-Son Nguyen [Wed, 5 Nov 2025 10:26:37 +0000 (11:26 +0100)]
mtmd: improve struct initialization (#16981)

2 months agodocs: Clarify the endpoint that webui uses (#17001)
손희준 [Wed, 5 Nov 2025 10:20:28 +0000 (19:20 +0900)]
docs: Clarify the endpoint that webui uses (#17001)

2 months agomodel : add openPangu-Embedded (#16941)
Li Pengzhan [Wed, 5 Nov 2025 09:28:58 +0000 (17:28 +0800)]
model : add openPangu-Embedded (#16941)

* Model: add openPangu-Embedded

* fixed according to reviewer's comments

* fixed the chat template check condition

* Apply suggestions from code review

change the chat-template check condition and some formatting issue

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

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoggml webgpu: minor set rows optimization (#16810)
Reese Levine [Wed, 5 Nov 2025 09:27:42 +0000 (01:27 -0800)]
ggml webgpu: minor set rows optimization (#16810)

* Add buffer label and enable dawn-specific toggles to turn off some checks

* Minor set_rows optimization (#4)

* updated optimization, fixed errors

* non vectorized version now dispatches one thread per element

* Simplify

* Change logic for set_rows pipelines

---------

Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Reese Levine <redacted>
* Comment on dawn toggles

* Remove some comments

* Implement overlap binary operators

* Revert "Implement overlap binary operators"

This reverts commit ed710b36f51ab3f53fa13db15c1685dc8678a32a.

* Disable support for non-contiguous binary_op tensors and leave note for future support

---------

Co-authored-by: neha-ha <redacted>
Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Neha Abbas <redacted>
2 months agosync : ggml
Georgi Gerganov [Tue, 4 Nov 2025 18:44:18 +0000 (20:44 +0200)]
sync : ggml

2 months agoggml : fix conv2d_dw SVE path (ggml/1380)
Georgi Gerganov [Tue, 4 Nov 2025 18:40:52 +0000 (20:40 +0200)]
ggml : fix conv2d_dw SVE path (ggml/1380)

* Fix test-conv2d-dw failure on ARM SVE by using runtime vector length

The ggml_compute_forward_conv_2d_dw_cwhn function was using a hardcoded GGML_F32_EPR (8) for SIMD vectorization, but on ARM SVE the actual vector length varies by hardware. This caused incorrect computation when processing CWHN layout tensors on ARM machines.

Fix by using svcntw() to get the runtime SVE vector length instead of the compile-time constant.

Co-authored-by: ggerganov <redacted>
* ci : reduce sam score threshold

* ci : update bbox checks for sam test

---------

Co-authored-by: copilot-swe-agent[bot] <redacted>
Co-authored-by: ggerganov <redacted>
2 months agoCUDA: update ops.md (#17005)
mnehete32 [Wed, 5 Nov 2025 03:01:15 +0000 (08:31 +0530)]
CUDA: update ops.md (#17005)

2 months agoopencl: update doc (#17011)
lhez [Wed, 5 Nov 2025 00:02:36 +0000 (16:02 -0800)]
opencl: update doc (#17011)

* opencl: update docs

* opencl: update docs

* opencl: fix link

* opencl: update doc

2 months agorefactor: replace sprintf with snprintf for safer string handling in dump functions...
nullname [Tue, 4 Nov 2025 20:25:39 +0000 (04:25 +0800)]
refactor: replace sprintf with snprintf for safer string handling in dump functions (#16913)

2 months agovulkan: remove the need for the dryrun (#16826)
Jeff Bolz [Tue, 4 Nov 2025 19:28:17 +0000 (13:28 -0600)]
vulkan: remove the need for the dryrun (#16826)

* vulkan: remove the need for the dryrun

Allocate pipelines and descriptor sets when requested.

Reallocate the prealloc buffers when needed, and flush any pending work
before reallocating.

For rms_partials and total_mul_mat_bytes, use the sizes computed the last time
the graph was executed.

* remove dryrun parameters

2 months agoserver : do context shift only while generating (#17000)
Georgi Gerganov [Tue, 4 Nov 2025 17:21:36 +0000 (19:21 +0200)]
server : do context shift only while generating (#17000)

2 months agoreadme : update hot topics (#17002)
Georgi Gerganov [Tue, 4 Nov 2025 15:21:31 +0000 (17:21 +0200)]
readme : update hot topics (#17002)

2 months agoggml-cpu : bicubic interpolation (#16891)
Acly [Tue, 4 Nov 2025 12:12:20 +0000 (13:12 +0100)]
ggml-cpu : bicubic interpolation (#16891)

2 months agoci : apply model label to models (#16994)
Sigbjørn Skjæret [Tue, 4 Nov 2025 11:29:39 +0000 (12:29 +0100)]
ci : apply model label to models (#16994)

2 months agochore : fix models indent after refactor (#16992)
Sigbjørn Skjæret [Tue, 4 Nov 2025 11:29:15 +0000 (12:29 +0100)]
chore : fix models indent after refactor (#16992)

2 months agoFix garbled output with REPACK at high thread counts (#16956)
Noah [Tue, 4 Nov 2025 05:04:59 +0000 (05:04 +0000)]
Fix garbled output with REPACK at high thread counts (#16956)

* Fix garbled output with REPACK at high thread counts

Fixed a race condition in the REPACK matrix multiplication code that caused garbled output when using 26+ threads (model-dependent threshold). The issue occurred because with high thread counts, the code forced chunk count to equal thread count, creating many small chunks. After aligning these chunks to NB_COLS boundaries, adjacent chunks could overlap, causing data corruption and race conditions. The fix enforces minimum chunk sizes based on NB_COLS and caps maximum chunk count to prevent creating too many tiny chunks, ensuring proper alignment without overlaps.

* Update ggml/src/ggml-cpu/repack.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml-cpu/repack.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
2 months agoCUDA: avoid mul + bias fusion when doing fusion (#16935)
Aman Gupta [Tue, 4 Nov 2025 02:53:48 +0000 (10:53 +0800)]
CUDA: avoid mul + bias fusion when doing fusion (#16935)

2 months agoopencl: support imrope (#16914)
lhez [Mon, 3 Nov 2025 19:47:57 +0000 (11:47 -0800)]
opencl: support imrope (#16914)

* opencl: support imrope

* opencl: fix whitespace

2 months agofix: Viewing multiple PDF attachments (#16974)
Aleksander Grygier [Mon, 3 Nov 2025 17:53:26 +0000 (18:53 +0100)]
fix: Viewing multiple PDF attachments (#16974)

2 months agomodel-conversion : pass config to from_pretrained (#16963)
Daniel Bevenius [Mon, 3 Nov 2025 17:01:59 +0000 (18:01 +0100)]
model-conversion : pass config to from_pretrained (#16963)

This commit modifies the script `run-org-model.py` to ensure that the
model configuration is explicitly passed to the `from_pretrained` method
when loading the model. It also removes a duplicate configuration
loading which was a mistake.

The motivation for this change is that enables the config object to be
modified and then passed to the model loading function, which can be
useful when testing new models.

2 months agoserver : add props.model_alias (#16943)
Georgi Gerganov [Mon, 3 Nov 2025 13:38:23 +0000 (15:38 +0200)]
server : add props.model_alias (#16943)

* server : add props.model_alias

* webui : npm run format

2 months agoggml: CUDA: add head size 72 for flash-attn (#16962)
theo77186 [Mon, 3 Nov 2025 13:29:11 +0000 (14:29 +0100)]
ggml: CUDA: add head size 72 for flash-attn (#16962)

2 months agomtmd: add --image-min/max-tokens (#16921)
Xuan-Son Nguyen [Mon, 3 Nov 2025 10:11:18 +0000 (11:11 +0100)]
mtmd: add --image-min/max-tokens (#16921)

2 months agomtmd: pad mask for qwen2.5vl (#16954)
Xuan-Son Nguyen [Mon, 3 Nov 2025 09:25:55 +0000 (10:25 +0100)]
mtmd: pad mask for qwen2.5vl (#16954)

* mtmd: pad mask for qwen2.5vl

* improve

2 months agoggml : LoongArch fixes (#16958)
Jinyang He [Mon, 3 Nov 2025 06:40:02 +0000 (14:40 +0800)]
ggml : LoongArch fixes (#16958)

* Fix test-quantize-fns f16 and q4_0 failed when use LSX

* Fix LoongArch set float intrinsic when use LSX/LASX

2 months agosync: minja (glm 4.6 & minmax m2 templates) (#16949)
Olivier Chafik [Mon, 3 Nov 2025 05:33:56 +0000 (05:33 +0000)]
sync: minja (glm 4.6 & minmax m2 templates) (#16949)

* sync: minja

* Sync https://github.com/ochafik/minja/pull/7 (MinMax M2)

2 months agoSYCL: optimized repeat_back kernel (3× fewer asm instructions, 2× faster)Feature...
shani-f [Mon, 3 Nov 2025 01:35:33 +0000 (03:35 +0200)]
SYCL: optimized repeat_back kernel (3× fewer asm instructions, 2× faster)Feature/sycl repeat back opt (#16869)

* SYCL repeat_back v1 — add core op + switch case

* Implement repeat_back SYCL operation and minor fixes

* SYCL: optimize repeat_back kernel

* Remove Hebrew comment from repeat_back.cpp

* Remove comments for code clarity

Removed comments to clean up the code.

* Fix formatting in ggml-sycl.cpp

* Formatted lambda according to legacy style. No logic changes

* Remove blank line in repeat_back.cpp

Remove unnecessary blank line before assigning acc to dst_dd.

2 months agofeat(webui): improve LaTeX rendering with currency detection (#16508)
Sascha Rogmann [Sun, 2 Nov 2025 23:41:08 +0000 (00:41 +0100)]
feat(webui): improve LaTeX rendering with currency detection (#16508)

* webui : Revised LaTeX formula recognition

* webui : Further examples containg amounts

* webui : vitest for maskInlineLaTeX

* webui: Moved preprocessLaTeX to lib/utils

* webui: LaTeX in table-cells

* chore: update webui build output (use theirs)

* webui: backslash in LaTeX-preprocessing

* chore: update webui build output

* webui: look-behind backslash-check

* chore: update webui build output

* Apply suggestions from code review

Code maintenance (variable names, code formatting, string handling)

Co-authored-by: Aleksander Grygier <redacted>
* webui: Moved constants to lib/constants.

* webui: package woff2 inside base64 data

* webui: LaTeX-line-break in display formula

* chore: update webui build output

* webui: Bugfix (font embedding)

* webui: Bugfix (font embedding)

* webui: vite embeds assets

* webui: don't suppress 404 (fonts)

* refactor: KaTeX integration with SCSS

Moves KaTeX styling to SCSS for better customization and font embedding.

This change includes:
- Adding `sass` as a dev dependency.
- Introducing a custom SCSS file to override KaTeX variables and disable TTF/WOFF fonts, relying solely on WOFF2 for embedding.
- Adjusting the Vite configuration to resolve `katex-fonts` alias and inject SCSS variables.

* fix: LaTeX processing within blockquotes

* webui: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
2 months agotest-backend-ops : fix segfault in moe-expert-reduce test in support mode and coverag...
Shagun Bera [Sun, 2 Nov 2025 23:10:30 +0000 (04:40 +0530)]
test-backend-ops : fix segfault in moe-expert-reduce test in support mode and coverage (#16936)

* tests: fix segfault in moe-expert-reduce test in support mode and --show-coverage

* tests: init gf and filter out fusion tests for support mode

* tests: filter out fusion cases before calling eval_support

* tests: filter out fusion cases from show_test_coverage as well, fix lint