]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
3 months agoopencl: move backend info printing into its own function (#23702)
lhez [Thu, 28 May 2026 18:05:42 +0000 (11:05 -0700)]
opencl: move backend info printing into its own function (#23702)

* opencl: move backend info print into its own function

* opencl: move new log line

* opencl: fix for non adreno path

3 months agoci : run ui publish on ubuntu-slim (#23818)
Sigbjørn Skjæret [Thu, 28 May 2026 17:58:32 +0000 (19:58 +0200)]
ci : run ui publish on ubuntu-slim (#23818)

* run ui publish on self-hosted fast

* run on ubuntu-slim

3 months agoui: fix audio and video modality detection (#23756)
ValdikSS [Thu, 28 May 2026 15:36:10 +0000 (18:36 +0300)]
ui: fix audio and video modality detection (#23756)

When model props are fetched asynchronously from the server,
modelPropsVersion is incremented to trigger reactivity, but
only the vision effect was listening to it.

3 months agoci : releases use Github-hosted builds for the UI (#23823)
Georgi Gerganov [Thu, 28 May 2026 14:50:32 +0000 (17:50 +0300)]
ci : releases use Github-hosted builds for the UI (#23823)

* ci : releases use Github-hosted builds for the UI

* cont : fix name

3 months agoapp : improve help output (#23805)
Adrien Gallouët [Thu, 28 May 2026 14:45:06 +0000 (16:45 +0200)]
app : improve help output (#23805)

Signed-off-by: Adrien Gallouët <redacted>
3 months agomtmd: n_head_kv defaults to n_head (#23782)
Saba Fallah [Thu, 28 May 2026 14:44:36 +0000 (16:44 +0200)]
mtmd: n_head_kv defaults to n_head (#23782)

removed AI-generated comment

3 months agomtmd: fix gemma 4 audio rms norm eps (#23815)
Xuan-Son Nguyen [Thu, 28 May 2026 14:31:37 +0000 (16:31 +0200)]
mtmd: fix gemma 4 audio rms norm eps (#23815)

* mtmd: fix gemma 4 audio rms norm eps

* Update tools/mtmd/clip.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
3 months agoci : change Vulkan builds to Release to reduce ccache (#23820)
Georgi Gerganov [Thu, 28 May 2026 14:29:11 +0000 (17:29 +0300)]
ci : change Vulkan builds to Release to reduce ccache (#23820)

* ci : disable all CPU variant builds for Vulkan workflow

* cont : change cache key

* cont : change build type

3 months agoarg: Add LLAMA_ARG_API_KEY_FILE environment variable for --api-key-file (#23167)
Mikolaj Kucharski [Thu, 28 May 2026 14:25:40 +0000 (14:25 +0000)]
arg: Add LLAMA_ARG_API_KEY_FILE environment variable for --api-key-file (#23167)

3 months agotest-llama-archs: fix table format [no release] (#23810)
Johannes Gäßler [Thu, 28 May 2026 13:53:54 +0000 (15:53 +0200)]
test-llama-archs: fix table format [no release] (#23810)

3 months agoggml: auto apply iGPU flag CUDA/HIP if integrated device (#23007)
fl0rianr [Thu, 28 May 2026 13:01:14 +0000 (15:01 +0200)]
ggml: auto apply iGPU flag CUDA/HIP if integrated device (#23007)

3 months agommvq Optim: add MMVQ_PARAMETERS_TURING(mmvq_parameter_table_id) for … (#23729)
redfox [Thu, 28 May 2026 12:51:14 +0000 (20:51 +0800)]
mmvq Optim:  add MMVQ_PARAMETERS_TURING(mmvq_parameter_table_id) for … (#23729)

* mmvq Optim:  add MMVQ_PARAMETERS_TURING(mmvq_parameter_table_id) for SM75 TURING

* avoid a mismatch for JIT compilation of Turing device code for Ampere or newer

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

Co-authored-by: Copilot <redacted>
Co-authored-by: Johannes Gäßler <redacted>
3 months agoCUDA: route batch>=4 quantized matmul to MMQ on AMD MFMA hardware (#23227)
Jaden_Mach [Thu, 28 May 2026 12:50:25 +0000 (08:50 -0400)]
CUDA: route batch>=4 quantized matmul to MMQ on AMD MFMA hardware (#23227)

* CUDA: per-quant MMVQ/MMQ batch threshold on AMD MFMA hardware

The dispatcher uses a single global threshold (MMVQ_MAX_BATCH_SIZE = 8)
to choose between mul_mat_vec_q (per-row GEMV) and mul_mat_q (MFMA-tiled
GEMM) for quantized matmul. On AMD CDNA, the optimal crossover differs
substantially by quant family because the per-row GEMV cost is dominated
by dequantisation, not the dot-product itself: K-quants pay a heavier
super-block decode and so MMQ wins sooner; legacy and IQ quants have
lean decode and stay ahead until the batch fully populates an MFMA tile.

This patch introduces ggml_cuda_should_use_mmvq(type, cc, ne11) -> bool,
mirroring the existing ggml_cuda_should_use_mmq, and gates per-quant
thresholds on amd_mfma_available(cc):

  Q3_K, Q4_K, Q5_K  : MMVQ <= 3   (MMQ wins from batch=4: +5% .. +76%)
  Q2_K, Q6_K        : MMVQ <= 5   (MMQ wins from batch=6: +8% .. +35%)
  others            : MMVQ <= 8   (legacy & IQ regress under MMQ; unchanged)

Non-AMD-MFMA paths (NVIDIA, RDNA, CDNA1 without MFMA) are byte-identical
to master. GGML_CUDA_FORCE_MMVQ=1 restores the original global threshold
for A/B testing.

Measured on MI250X (gfx90a, ROCm 7.2.1) with Llama-3.2-3B-Instruct,
llama-bench pp512 across all 20 supported quants, ubatch 1..8, 10 reps.
Full table in PR description.

  Selected pp512 throughput (tok/s, ub=8):
    Q4_K_S:  559 -> 940  (+68%)
    Q5_K_S:  503 -> 884  (+76%)
    Q3_K_S:  629 -> 879  (+40%)
    Q2_K  :  615 -> 809  (+32%)
    Q6_K  :  582 -> 776  (+33%)

  Selected pp512 throughput (tok/s, ub=4):
    Q4_K_S:  444 -> 480  (+ 8%)
    Q4_0  :  682 -> 685  (+ 0%)   (no regression - retains MMVQ)
    IQ4_XS:  706 -> 698  (- 1%)   (no regression - retains MMVQ)

* CUDA: address review — inline MMVQ batch table, drop env hatch & doc block

* tune kernel selection logic for CDNA1

---------

Co-authored-by: Johannes Gäßler <redacted>
3 months agoserver: minor tweaks to use more cpp features (#23785)
Funtowicz Morgan [Thu, 28 May 2026 12:00:25 +0000 (14:00 +0200)]
server: minor tweaks to use more cpp features (#23785)

* misc(server): add default port to impl RAII

* misc(server): register_gcp_compat() can be const

* misc(server): use proper cpp const/auto methods

* misc(server): do not reset a unique_ptr, use make_unique instead to be exception safe

3 months agohexagon: minor refresh for HMX FA and MM (#23796)
Max Krasnyansky [Thu, 28 May 2026 11:49:11 +0000 (04:49 -0700)]
hexagon:  minor refresh for HMX FA and MM (#23796)

* hex-fa: clean up qf32/fp32 handling and stride handling

* hex-fa: fix corner case fp NAN issues that were cause bad output from gemma4 on v79

* hex-fa: vectorize leftover handling

* hex-fa: avoid HVX fallback during token gen HMX has more FP16 compute capacity

* hmx-mm: remove dead code

* hmx-mm: use fastdiv in x4x2 dequant

* hmx-mm: sandwich dequant and scatter to improve perf

* hmx-mm: fixed rebase conflicts

* hmx-mm: further improve weight dequant by doing early type dispatch and precomputing fastdiv

* hmx-mm: an even earlier dispatch for per-type dequant

* hmx-mm: dequant linear types like q4_0 and q4_1 without the LUTs

This is a bit faster than LUT.

* hex-cmake: one more tweak for lto

---------

Co-authored-by: Trivikram Reddy <redacted>
3 months agovulkan: fast path for walsh-hadamard transform (#23687)
Jeff Bolz [Thu, 28 May 2026 11:18:43 +0000 (06:18 -0500)]
vulkan: fast path for walsh-hadamard transform (#23687)

* vulkan: fast path for walsh-hadamard transform

* disable for intel due to segfault

3 months agochat : add Granite 4.1 chat template (#23518)
Jesus Talavera [Thu, 28 May 2026 11:13:33 +0000 (13:13 +0200)]
chat : add Granite 4.1 chat template (#23518)

3 months agovulkan: fix wrong index variable in inner loop (#23665)
Winston Ma [Thu, 28 May 2026 10:48:34 +0000 (18:48 +0800)]
vulkan: fix wrong index variable in inner loop (#23665)

3 months agovulkan: Fix memory logger unsafe iterator access (#23667)
Winston Ma [Thu, 28 May 2026 10:46:07 +0000 (18:46 +0800)]
vulkan: Fix memory logger unsafe iterator access (#23667)

3 months agoserver, ui : Add support for HTTP ETags in llama-server (#23701)
Markus Tavenrath [Thu, 28 May 2026 10:21:24 +0000 (20:21 +1000)]
server, ui : Add support for HTTP ETags in llama-server (#23701)

* allow caching of ui elements in llama-server

* use fnv_hash

* Update tools/server/server-http.cpp

etag has to be set always

Co-authored-by: Xuan-Son Nguyen <redacted>
---------

Co-authored-by: Xuan-Son Nguyen <redacted>
3 months agodocker : add ZenDNN Dockerfile (#23716)
Sachin Sharma [Thu, 28 May 2026 09:40:49 +0000 (15:10 +0530)]
docker : add ZenDNN Dockerfile (#23716)

3 months agocuda : fix KQ mask offset integer overflow in fattn MMA kernel (#23610)
fairydreaming [Thu, 28 May 2026 08:55:42 +0000 (10:55 +0200)]
cuda : fix KQ mask offset integer overflow in fattn MMA kernel (#23610)

Co-authored-by: Stanisław Szymczyk <redacted>
3 months agoperplexity : fix format specifier in LOG_ERR (#23788)
Adrien Gallouët [Thu, 28 May 2026 07:34:58 +0000 (09:34 +0200)]
perplexity : fix format specifier in LOG_ERR (#23788)

Signed-off-by: Adrien Gallouët <redacted>
3 months agoconvert : add FP8 to Q8 conversion (#23250)
ynankani [Thu, 28 May 2026 07:16:17 +0000 (07:16 +0000)]
convert : add FP8 to Q8 conversion (#23250)

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

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

Change-Id: I0cb789347f2bf60ffaf9047319f727e788c825f8

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

* ci : separate CUDA windows workflow + fix names

* ci : rename workflow

* ci : prefix cache names with workflow name

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

* ci : cache keys

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

* ci : fix apple cache names

* ci : add TODOs

* cont : keep just the last cache

* ci : update release concurrency to queue

* ci : move the release trigger to ubuntu-slim

* ci : hip add TODO

* cont : improve words

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

* K>1 state snapshot support

* removed picky indent multiple of 4 fixes

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

* OP_GATED_DELTA_NET impl

* add back lanes_per_column declaration

* removed has_subgroup_arithmetic and has_subgroup_clustered_reduce

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

* support for K>1 state snapshot

* removed picky indent multiple of 4 fixes

* removed return that won\'t be executed

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

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

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

* hmx-mm: add support for Q4_1

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

* hexagon: fix repack scratch buffer overflow

* hex-mm: fix Q4_1 repack buffer sizing

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

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

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

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

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

---------

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

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

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

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

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

* vulkan: Use aligned loads in mul_mat_vec when available

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

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

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

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

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

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

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

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

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

* feat: extend repeat op for vulkan

* feat: add repeat_f16 vulkan pipeline

* fix: ensure same dst and src types

* fix: use type_size instead of data types

* fix: use int16 and int32 for repeat shader op

* chore: rename repeat_f* to repeat_i*

* chore: rename repeat vulkan pipelines

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

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

* cont : fix deps + fix names

* ocd : fix names

* cont : fix PR links

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

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

* add conversion folder and update dependencies

* limit python version for triton

* update dev-dependencies section

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

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

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

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

* ci : server windows set build type explicitly

* cont : try windows-2025

* ci : use llvm

* cont : use ninja

* cont : fix shell

* ci : set number of jobs correctly

* ci : fix windows with vulkan ccache by using llvm

* ci : server ccache only on master

* ocd : fix job names

[no release]

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

* run tests in correct build folder

* remove wasm test

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

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

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

* ci : ccache the server builds

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

* tmp : force ccache save

* Revert "tmp : force ccache save"

This reverts commit a857b03a10b1304d456129a017e0e46b185618ee.

* cont : no need for node.js

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

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

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

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

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

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

* ggml-zendnn: fixed naming of matmul function

* ggml-zendnn: fixed naming of mul_mat_id function

* ggml-zendnn: fixed print in  mul_mat_id

---------

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

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

[no release]

* cont : add prints

[no ci]
[no release]

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

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

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

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

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

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

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

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

the spark is apparently too slow for some reason

* tests : fix undefined warning

[no ci]

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

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

* vulkan: add CONV_SHAPE_64x128 for medium-K conv2d

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

* vulkan: use WG_SIZE=128 for CONV_SHAPE_64x32 conv2d

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

* vulkan: add coopmat1 conv2d path

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

* Require 16x16x16 and subgroup size 32 or 64

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

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

* ci : remove vulkan dep from webgpu build

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

* ci : fix name + add wasm test

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

* hexagon: add support for CONCAT with optimized concat_2d_transposed

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

* hex-concat: use fastdiv in generic version

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

* hex-concat: reoder dma ops for better pipelining

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

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

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

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

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

* hex-concat: unroll the inner loops of concat_2d

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

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

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

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

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

* hex-rope: replace scalar tail processing with HVX

* hex-rope: optimize rope cache init with HVX

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

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

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

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

* ci : reduce

[no ci]

* cont : disable sycl, cann + rename caches

[no ci]

* cont : cann

[no ci]

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

* convert : support Gemma4ForCausalLM architecture (#23674)

* fix indent

---------

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

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

* SYCL: implement ggml_sycl_pool_vmm

* Add an option to bypass VMM with GGML_SYCL_DISABLE_VMM

* Clean up debugging logging

* document GGML_SYCL_DISABLE_VMM

* Multi-stream MoE optimization

* Revert "Multi-stream MoE optimization"

This reverts commit 938929c3f13a562ec67c59e87cc5d38595444cce.

* Update common.hpp

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

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

* Apply suggestions from code review

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

* Apply suggestion from @sanmai

---------

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

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

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

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

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

* initial talkie support, coherent

* reorder to follow convention

* absorb inverse rope

* stop folding scalars to improve quantization

* use broadcasting instead of duplication

* style cleanup

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

* use layer_out_scale instead of embd_skip_scale

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

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

* Fix to editorconfig checking pass

* Remove mul-mat-legacy pipeline

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

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

* Only run webgpu CI on my fork

* Add webgpu only workflow

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

* restore build.yml

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

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

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

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

* ci : disable SYCL f16 builds

* ci : extract android and hip into separate workflows

* ci : move webgpu to separate workflow

* ci : move the rpc to a separate workflow

* ci : extract s309x and ppcl jobs

* ci : extract opencl job into a separate workflow

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

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

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

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

* CUDA: add fast walsh-hadamard transform

* review: add unrolls + change size_t -> int

* warp size 64

---------

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

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

* Refactored Compressed Tensors NVFP4 support for new base.py

* Support compressed-tensors NVFP4 conversion

* Moved Qwen MTP remap into filter_tensors

* simplify

* pathlib no longer used

---------

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

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

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

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

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

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

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

* TP: fix ggml context size calculation, memory leak

* move split state cache back into the context

* revert to constant ggml context size for cgraphs

* increase headroom for statically allocated tensors

* remove obsolete include

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

* ggml: implement `gguf_init_from_buffer`

* test: `gguf_init_from_buffer`

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

* fix: use `GGML_UNUSED`

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

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

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

* feat: add `gguf_init_from_callback`

* fix: always require a max expected size

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

* fix: harden against offset overflow in buffer read

* fix: remove seek behavior from the callback

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

* fix: seeking in a gguf file with no tensors

---------

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

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

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

Change-Id: If4cc1c738a855274103f8c3ad52daa33528acd0c

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

Change-Id: I9b6c37390f0c7a733a36308c8fb53d22d234ab06

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

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

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

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

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

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

* ui: media attachments before text

* fix prettier formatting

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

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

* common : add common_chat_split_by_role

* cont : fix spans to reach end of message

* server: fix checkpoints creation

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

* cont : clean-up

* Support autoparser detection for message barriers

* server: fix message span delimiter and update docs

---------

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

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

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

* ci : slim -> self-hosted

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

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

* ci : try to bump 3.11 -> 3.13

* ci : move lint back to 3.11

* ci : back to 3.11

* ci : add comment about UI jobs

* ci : move python requirements check to CPU runners

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

* ci : add self-hosted ui workflow

* ci : fix UI naming

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

* revert last commit

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

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

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

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

* cmake : rename host compiled embed helper

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

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

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

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

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