]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
5 weeks agoci : fix sanitize workflow to enable ggml sanitizers too (#19323)
Georgi Gerganov [Wed, 4 Feb 2026 13:12:03 +0000 (15:12 +0200)]
ci : fix sanitize workflow to enable ggml sanitizers too (#19323)

5 weeks agomodel: (qwen3next) correct vectorized key_gdiff calculation (#19324)
Xuan-Son Nguyen [Wed, 4 Feb 2026 12:09:58 +0000 (13:09 +0100)]
model: (qwen3next) correct vectorized key_gdiff calculation (#19324)

* model: (qwen3next) correct vectorized key_gdiff calculation

* move transpose to outside of loop

5 weeks agotests : add non-cont, inplace rope tests (#19296)
Georgi Gerganov [Wed, 4 Feb 2026 10:45:21 +0000 (12:45 +0200)]
tests : add non-cont, inplace rope tests (#19296)

* tests : add non-cont, inplace rope tests

* cont : exercise dim 3

Co-authored-by: Jeff Bolz <redacted>
* cont : more dim3 exercises

---------

Co-authored-by: Jeff Bolz <redacted>
5 weeks agomodel-conversion : add tensor-info.py utility (#18954)
Daniel Bevenius [Wed, 4 Feb 2026 09:40:53 +0000 (10:40 +0100)]
model-conversion : add tensor-info.py utility (#18954)

This commit adds a new python script that can be used to print tensors
information from a tensor in a safetensors model.

The motivation for this is that during model conversion work it can
sometimes be useful to verify the shape of tensors in the original
model. While it is possible to print the tensors when loading the model
this can be slow when working with larger models.
With this script it is possible to quickly query tensor shapes.

Example usage:
```console
(venv) $ ./scripts/utils/tensor-info.py --help
usage: tensor-info.py [-h] [-m MODEL_PATH] [-l] [tensor_name]

Print tensor information from a safetensors model

positional arguments:
  tensor_name           Name of the tensor to inspect

options:
  -h, --help            show this help message and exit
  -m MODEL_PATH, --model-path MODEL_PATH
                        Path to the model directory (default: MODEL_PATH environment variable)
  -l, --list            List unique tensor patterns in the model (layer numbers replaced with #)
```

Listing tensor names:
```console
(venv) $ ./scripts/utils/tensor-info.py -m ~/work/ai/models/google/embeddinggemma-300m -l
embed_tokens.weight
layers.#.input_layernorm.weight
layers.#.mlp.down_proj.weight
layers.#.mlp.gate_proj.weight
layers.#.mlp.up_proj.weight
layers.#.post_attention_layernorm.weight
layers.#.post_feedforward_layernorm.weight
layers.#.pre_feedforward_layernorm.weight
layers.#.self_attn.k_norm.weight
layers.#.self_attn.k_proj.weight
layers.#.self_attn.o_proj.weight
layers.#.self_attn.q_norm.weight
layers.#.self_attn.q_proj.weight
layers.#.self_attn.v_proj.weight
norm.weight
```

Printing a specific tensor's information:
```console
(venv) $ ./scripts/utils/tensor-info.py -m ~/work/ai/models/google/embeddinggemma-300m layers.0.input_layernorm.weight
Tensor: layers.0.input_layernorm.weight
File:   model.safetensors
Shape:  [768]
```

5 weeks agospec : fix the check-rate logic of ngram-simple (#19261)
Georgi Gerganov [Wed, 4 Feb 2026 08:39:53 +0000 (10:39 +0200)]
spec : fix the check-rate logic of ngram-simple (#19261)

* spec : fix the check-rate logic of ngram-simple

* cont : refactor + fix checks

5 weeks agocompletion : simplify batch (embd) processing (#19286)
Daniel Bevenius [Wed, 4 Feb 2026 04:43:28 +0000 (05:43 +0100)]
completion : simplify batch (embd) processing (#19286)

* completion : simplify batch (embd) processing

This commit simplifies the processing of embd by removing the for loop
that currently exists which uses params.n_batch as its increment. This
commit also removes the clamping of n_eval as the size of embd is always
at most the size of params.n_batch.

The motivation is to clarify the code as it is currently a little
confusing when looking at this for loop in isolation and thinking that
it can process multiple batches.

* add an assert to verify n_eval is not greater than n_batch

5 weeks agoggml-virtgpu: make the code thread safe (#19204)
Kevin Pouget [Wed, 4 Feb 2026 02:46:18 +0000 (03:46 +0100)]
ggml-virtgpu: make the code thread safe (#19204)

* ggml-virtgpu: regenerate_remoting.py: add the ability to deprecate a function

* ggml-virtgpu: deprecate buffer_type is_host remoting

not necessary

* ggml-virtgpu: stop using static vars as cache

The static init isn't thread safe.

* ggml-virtgpu: protect the use of the shared memory to transfer data

* ggml-virtgpu: make the remote calls thread-safe

* ggml-virtgpu: backend: don't continue if couldn't allocate the tensor memory

* ggml-virtgpu: add a cleanup function for consistency

* ggml-virtgpu: backend: don't crash if buft->iface.get_max_size is missing

* fix style and ordering

* Remove the static variable in apir_device_get_count

* ggml-virtgpu: improve the logging

* fix review minor formatting changes

5 weeks agoggml-cpu: use LUT for converting e8->f32 scales on x86 (#19288)
Aman Gupta [Wed, 4 Feb 2026 01:43:29 +0000 (09:43 +0800)]
ggml-cpu: use LUT for converting e8->f32 scales on x86 (#19288)

* ggml-cpu: use LUT for converting e8->f32 scales on x86

* add dispatch based on macro

5 weeks agometal : add solve_tri (#19302)
Georgi Gerganov [Tue, 3 Feb 2026 21:43:14 +0000 (23:43 +0200)]
metal : add solve_tri (#19302)

5 weeks agoci : add sanitizer runs for server (#19291)
Georgi Gerganov [Tue, 3 Feb 2026 20:41:20 +0000 (22:41 +0200)]
ci : add sanitizer runs for server (#19291)

5 weeks agosampling : delegate input allocation to the scheduler (#19266)
Georgi Gerganov [Tue, 3 Feb 2026 20:16:16 +0000 (22:16 +0200)]
sampling : delegate input allocation to the scheduler (#19266)

* sampling : delegate input allocation to the scheduler

* graph : compute backend samplers only if needed

5 weeks agovulkan: disable coopmat1 fa on Nvidia Turing (#19290)
Ruben Ortlam [Tue, 3 Feb 2026 16:37:32 +0000 (17:37 +0100)]
vulkan: disable coopmat1 fa on Nvidia Turing (#19290)

5 weeks agoCUDA: use mmvq for mul-mat-id for small batch sizes (#18958)
Aman Gupta [Tue, 3 Feb 2026 15:31:23 +0000 (23:31 +0800)]
CUDA: use mmvq for mul-mat-id for small batch sizes (#18958)

* CUDA: use mmvq for mul-mat-id for small batch sizes

* add mmvq too

* Fix perf issue on ampere. Use mmvf mm-id only for non-nvidia GPUs

* templatize multi_token_path

5 weeks agomodels : remove unnecessary cont in openelm (#19289)
Sigbjørn Skjæret [Tue, 3 Feb 2026 13:20:57 +0000 (14:20 +0100)]
models : remove unnecessary cont in openelm (#19289)

5 weeks agometal : minor cleanup (#19251)
Georgi Gerganov [Tue, 3 Feb 2026 11:43:29 +0000 (13:43 +0200)]
metal : minor cleanup (#19251)

5 weeks agoCUDA: Fix loop unrolling for BW in mul_mat_q_stream_k_fixup (#19053)
Oliver Simons [Tue, 3 Feb 2026 10:33:14 +0000 (11:33 +0100)]
CUDA: Fix loop unrolling for BW in mul_mat_q_stream_k_fixup (#19053)

By providing stride_* variables as size_t (i.e., 64-bit) the compiler can
correctly unroll the [two for-loops](https://github.com/ggml-org/llama.cpp/blob/557515be1e93ed8939dd8a7c7d08765fdbe8be31/ggml/src/ggml-cuda/mmq.cuh#L3789-L3816)
on BW. This gives some perf for prefill/pp phase on BW, while not affecting
other SMs:

| GPU                                                     | Model                 | Test   |   t/s master |   t/s osimons/fix_bw_mmq_fixup_kernel |   Speedup |
|:--------------------------------------------------------|:----------------------|:-------|-------------:|--------------------------------------:|----------:|
| NVIDIA RTX 6000 Ada Generation                          | gpt-oss 20B MXFP4 MoE | pp8096 |      8404.05 |                               8375.79 |      1.00 |
| NVIDIA RTX 6000 Ada Generation                          | llama 3B Q4_K_M       | pp8096 |     16148.93 |                              16019.60 |      0.99 |
| NVIDIA RTX 6000 Ada Generation                          | llama 8B Q4_0         | pp8096 |      8008.29 |                               7978.80 |      1.00 |
| NVIDIA RTX 6000 Ada Generation                          | nemotron_h 9B BF16    | pp8096 |      4263.16 |                               4248.53 |      1.00 |
| NVIDIA RTX 6000 Ada Generation                          | nemotron_h 9B Q4_K_M  | pp8096 |      5165.11 |                               5157.43 |      1.00 |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | gpt-oss 20B MXFP4 MoE | pp8096 |     12582.80 |                              12758.37 |      1.01 |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | llama 3B Q4_K_M       | pp8096 |     16879.10 |                              17619.47 |      1.04 |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | llama 8B Q4_0         | pp8096 |     10649.90 |                              10982.65 |      1.03 |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | nemotron_h 9B BF16    | pp8096 |      7717.73 |                               7716.22 |      1.00 |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | nemotron_h 9B Q4_K_M  | pp8096 |      7301.90 |                               7370.38 |      1.01 |

5 weeks agoggml: added cleanups in ggml_quantize_free (#19278)
George [Tue, 3 Feb 2026 06:43:39 +0000 (08:43 +0200)]
ggml: added cleanups in ggml_quantize_free (#19278)

Add missing cleanup calls for IQ2_S, IQ1_M quantization types and IQ3XS with 512 blocks during quantization cleanup.

5 weeks agocuda : revert CUDA_SCALE_LAUNCH_QUEUES override until investigated (#19227)
Gaurav Garg [Tue, 3 Feb 2026 06:41:02 +0000 (12:11 +0530)]
cuda : revert CUDA_SCALE_LAUNCH_QUEUES override until investigated (#19227)

Hangs were reported on Jetson Orin AGX if we set CUDA_SCALE_LAUNCH_QUEUES=4x. Reverting the previous PR (#19042) and updating the document to consider setting CUDA_SCALE_LAUNCH_QUEUES=4x for faster throughput on multi-GPU systems.

5 weeks agovocab: add Falcon-H1-Tiny-Coder FIM tokens (#19249)
Alexey Dubrov [Tue, 3 Feb 2026 06:31:01 +0000 (09:31 +0300)]
vocab: add Falcon-H1-Tiny-Coder FIM tokens (#19249)

5 weeks agospec : simplify time measurement using common_time_meas (#19262)
Georgi Gerganov [Tue, 3 Feb 2026 06:20:15 +0000 (08:20 +0200)]
spec : simplify time measurement using common_time_meas (#19262)

5 weeks agoopencl: refactor some ops, concat, repeat, tanh and scale (#19226)
lhez [Mon, 2 Feb 2026 23:54:43 +0000 (15:54 -0800)]
opencl: refactor some ops, concat, repeat, tanh and scale (#19226)

* opencl: refactor concat

* opencl: refactor repeat

* opencl: refactor tanh

* opencl: enable fp16 for tanh

* opencl: refactor scale

* opencl: fix unused variables

5 weeks agojinja : add missing 'in' test to template engine (#19004) (#19239)
Sid Mohan [Mon, 2 Feb 2026 20:00:55 +0000 (12:00 -0800)]
jinja : add missing 'in' test to template engine (#19004) (#19239)

* jinja : add missing 'in' test to template engine (#19004)

The jinja template parser was missing the 'in' test from
global_builtins(), causing templates using reject("in", ...),
select("in", ...), or 'x is in(y)' to fail with
"selectattr: unknown test 'in'".

This broke tool-calling for Qwen3-Coder and any other model
whose chat template uses the 'in' test.

Added test_is_in supporting array, string, and object containment
checks, mirroring the existing 'in' operator logic in runtime.cpp.

Includes test cases for all three containment types plus
reject/select filter usage.

Co-Authored-By: Claude Opus 4.5 <redacted>
* reuse test_is_in in binary op

---------

Co-authored-by: Sid Mohan <redacted>
Co-authored-by: Claude Opus 4.5 <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
5 weeks agomtmd: add min/max pixels gguf metadata (#19273)
Xuan-Son Nguyen [Mon, 2 Feb 2026 19:59:06 +0000 (20:59 +0100)]
mtmd: add min/max pixels gguf metadata (#19273)

5 weeks agoggml-cpu: FA split across kv for faster TG (#19209)
Aman Gupta [Mon, 2 Feb 2026 17:19:55 +0000 (01:19 +0800)]
ggml-cpu: FA split across kv for faster TG (#19209)

* ggml-cpu: split across kv for faster TG

* simplify sinks application

* add ref impl

5 weeks agoserver: print actual model name in 'model not found" error (#19117)
Matthieu Coudron [Mon, 2 Feb 2026 15:55:27 +0000 (16:55 +0100)]
server: print actual model name in 'model not found" error (#19117)

Experimenting with AI, my environment gets messy fast and it's not
always easy to know what model my software is trying to load. This helps
with troubleshooting.

before:

Error: {
  code = 400,
  message = "model not found",
  type = "invalid_request_error"
}

After:

Error: {
  code = 400,
  message = "model 'toto' not found",
  type = "invalid_request_error"
}

5 weeks agoci: add test-backend-ops test for CPU (#19268)
Aman Gupta [Mon, 2 Feb 2026 14:40:28 +0000 (22:40 +0800)]
ci: add test-backend-ops test for CPU (#19268)

5 weeks agoRemove support for Nvidia & AMD GPU, because the oneAPI plugin for Nvidia & AMD GPU...
Neo Zhang [Mon, 2 Feb 2026 13:06:21 +0000 (21:06 +0800)]
Remove support for Nvidia & AMD GPU, because the oneAPI plugin for Nvidia & AMD GPU is unavailable: download/installation channels are out of work. (#19246)

User can't build up the software for Nvidia & AMD GPU.
rm the oneMath since it is only used in NV and AMD code path.

5 weeks agosycl: implement GGML_OP_TOP_K (#19242)
Tamar [Mon, 2 Feb 2026 13:05:51 +0000 (15:05 +0200)]
sycl: implement GGML_OP_TOP_K (#19242)

5 weeks agometal : support virtual devices (#18919)
Georgi Gerganov [Mon, 2 Feb 2026 12:29:44 +0000 (14:29 +0200)]
metal : support virtual devices (#18919)

* metal : support virtual devices

* cont : manage buffer type context memory

* metal : add events

* cont : implement cpy_tensor_async

5 weeks agomodel-conversion : add debug option to conversion script (#19265)
Daniel Bevenius [Mon, 2 Feb 2026 10:29:57 +0000 (11:29 +0100)]
model-conversion : add debug option to conversion script (#19265)

This commit adds a debug option to the model conversion script to enable
using the Python debugger (pdb) during model conversion.

The motivation for this is that I've found myself adding this a few
times now and it would be quicker to have this flag as an option and a
makefile target/recipe for it.

5 weeks agoggml-backend: fix async set/get fallback sync (#19179)
Johannes Gäßler [Mon, 2 Feb 2026 09:00:05 +0000 (10:00 +0100)]
ggml-backend: fix async set/get fallback sync (#19179)

5 weeks agoauthors : update (#19263)
Georgi Gerganov [Mon, 2 Feb 2026 06:51:25 +0000 (08:51 +0200)]
authors : update (#19263)

[no ci]

5 weeks agodocs : Minor cleanups (#19252)
Christian Kastner [Mon, 2 Feb 2026 06:38:55 +0000 (07:38 +0100)]
docs : Minor cleanups (#19252)

* Update old URLs to github.com/ggml-org/

* Bump copyrights

5 weeks agospec : various improvements ton ngram-map + docs (#19253)
Sascha Rogmann [Mon, 2 Feb 2026 06:26:58 +0000 (07:26 +0100)]
spec : various improvements ton ngram-map + docs (#19253)

* spec: ngram-map and reasoning chats

* spec: add t_begin and t_accept

* ngram-map : add internal hash map

* docs : update ngram-map, add ngram-mod

* docs : fix ngram-map-k

* docs : differences between implementations

5 weeks agoRemove pipeline cache mutexes (#19195)
Nikhil Jain [Mon, 2 Feb 2026 02:47:29 +0000 (18:47 -0800)]
Remove pipeline cache mutexes (#19195)

* Remove mutex for pipeline caches, since they are now per-thread.

* Add comment

* Run clang-format

* Cleanup

* Run CI again

* Run CI once more

* Run clang-format

5 weeks agoBump cmake max version (needed for Windows on Snapdragon builds) (#19188)
Max Krasnyansky [Sun, 1 Feb 2026 22:13:38 +0000 (14:13 -0800)]
Bump cmake max version (needed for Windows on Snapdragon builds) (#19188)

* Bump max cmake version (needed for Windows on Snapdragon builds)

* cmake: move max version setting into ggml/CMakeLists

5 weeks agonix: fix allowUnfreePredicate for packages with multiple licenses (#19237)
Alexis Williams [Sun, 1 Feb 2026 20:10:48 +0000 (12:10 -0800)]
nix: fix allowUnfreePredicate for packages with multiple licenses (#19237)

The allowUnfreePredicate in pkgsCuda was wrapping p.meta.license in a
list unconditionally. This fails when meta.license is already a list
of licenses, as it creates a nested list and then tries to access
.free and .shortName on the inner list.

Use lib.toList instead, which correctly handles both cases:
- Single license attrset -> wraps in list
- List of licenses -> returns unchanged

5 weeks agocreate test.sh to enhance the parameters for testing, update the guide, rm useless...
Neo Zhang [Sun, 1 Feb 2026 10:24:00 +0000 (18:24 +0800)]
create test.sh to enhance the parameters for testing, update the guide, rm useless script (#19243)

5 weeks agonix: fix nix develop .#python-scripts (#19218)
Matthieu Coudron [Sat, 31 Jan 2026 16:01:46 +0000 (17:01 +0100)]
nix: fix nix develop .#python-scripts (#19218)

Without this I get:

> * Getting build dependencies for wheel...
> * Building wheel...
> Successfully built gguf-0.17.1-py3-none-any.whl
> Finished creating a wheel...
> Finished executing pypaBuildPhase
> Running phase: pythonRuntimeDepsCheckHook
> Executing pythonRuntimeDepsCheck
> Checking runtime dependencies for gguf-0.17.1-py3-none-any.whl
>   - requests not installed
For full logs, run:
    nix log /nix/store/x0c4a251l68bvdgang9d8v2fsmqay8a4-python3.12-gguf-0.0.0.drv

I changed a bit the style to make it more terse ~> more elegant in my
opinion.

5 weeks agoggml-hexagon: flash-attention and reduce-sum optimizations (#19141)
nullname [Sat, 31 Jan 2026 05:14:20 +0000 (13:14 +0800)]
ggml-hexagon: flash-attention and reduce-sum optimizations (#19141)

* wip

* ggml-hexagon: add vectorized dot product function for FP32 and FP16 accumulation

* ggml-hexagon: optimize dot product functions for FP16 and FP32 with new vectorized implementations

* wip

* ggml-hexagon: optimize hvx_vec_dump_f32_n and hvx_vec_reduce_sum_qf32x2 functions for improved performance

* ggml-hexagon: refactor dot product functions to use a common loading function for improved readability

* optimize vector dot product functions to use unified reduction for improved performance

* wip

* ggml-hexagon: add vectorized dot product function for FP32 and FP16 accumulation

* ggml-hexagon: optimize dot product functions for FP16 and FP32 with new vectorized implementations

* wip

* ggml-hexagon: optimize hvx_vec_dump_f32_n and hvx_vec_reduce_sum_qf32x2 functions for improved performance

* ggml-hexagon: refactor dot product functions to use a common loading function for improved readability

* optimize vector dot product functions to use unified reduction for improved performance

* hexagon: optimize reduce-sum for v75+

* hexagon: always keep row_sums in sf/fp32

* ggml-hexagon: enhance directory checks for HEXAGON_SDK_ROOT and HEXAGON_TOOLS_ROOT

* fix compiling error after rebase

---------

Co-authored-by: Max Krasnyansky <redacted>
5 weeks agoquantize: add option --tensor-type-file to llama-quantize (#18572)
EugeoSynthesisThirtyTwo [Sat, 31 Jan 2026 03:39:21 +0000 (04:39 +0100)]
quantize: add option --tensor-type-file to llama-quantize (#18572)

* add option --tensor-type-file to llama-quantize, but it raises an error.

* add error message when file not found

* quantize: update help menu, fix CI

Signed-off-by: Aaron Teo <redacted>
---------

Signed-off-by: Aaron Teo <redacted>
Co-authored-by: Your Name <redacted>
Co-authored-by: Aaron Teo <redacted>
5 weeks agomtmd: support MiniCPM-o 4.5(vision only) (#19211)
tc-mb [Fri, 30 Jan 2026 22:19:30 +0000 (06:19 +0800)]
mtmd: support MiniCPM-o 4.5(vision only) (#19211)

Signed-off-by: tc-mb <redacted>
5 weeks agolookup, lookahead: fix crash when n_ctx not specified (#18729)
Daniele Pinna [Fri, 30 Jan 2026 20:10:24 +0000 (21:10 +0100)]
lookup, lookahead: fix crash when n_ctx not specified (#18729)

* lookup, lookahead: fix crash when n_ctx not specified

Since PR #16653 (Dec 15, 2025), the default n_ctx is 0 to enable automatic
GPU memory fitting. This causes llama-lookup and llama-lookahead to crash
when run without explicit -c flag:

    GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded")

Root cause: Both examples use params.n_ctx directly for batch initialization,
but params.n_ctx remains 0 even after the context is properly initialized
to n_ctx_train internally.

Bug history:
- Nov 2023: lookahead.cpp created (PR #4207) with params.n_ctx pattern
- Dec 2023: lookup.cpp created (PR #4484) with same pattern
- Nov 2024: default n_ctx changed to 4096 (PR #10136) - bug dormant
- Dec 2025: default n_ctx changed to 0 (PR #16653) - bug activated

The bug was dormant for 2+ years because params.n_ctx defaulted to 512,
then 4096. PR #16653 changed it to 0 for GPU auto-fitting, triggering
the crash.

Fix: Use llama_n_ctx(ctx) to get the actual runtime context size, matching
the pattern already used elsewhere in lookup.cpp (line 72) and in
speculative.cpp/speculative-simple.cpp.

Tested: llama-lookup now works without -c flag (12.5% acceptance on
Gemma-3-1B).

Note: llama-lookahead has a separate pre-existing issue with sequence
initialization (n_seq_max=1 vs W+G+1 needed) that is unrelated to this fix.

* lookahead: fix n_seq_max and kv_unified configuration

Lookahead decoding requires:
- W + G + 1 = 31 sequences for parallel Jacobi decoding
- Unified KV cache for coupled sequences in batch splitting

These requirements were broken after PR #14482 changed validation logic.

Consolidates fix from PR #18730 per maintainer request.

Commit message drafted with Claude.

5 weeks agongram-mod : fix build [no ci] (#19216)
Georgi Gerganov [Fri, 30 Jan 2026 19:27:27 +0000 (21:27 +0200)]
ngram-mod : fix build [no ci] (#19216)

5 weeks agoopencl: add optimized q8_0 mm kernel for adreno (#18871)
shaofeiqi [Fri, 30 Jan 2026 18:19:27 +0000 (10:19 -0800)]
opencl: add optimized q8_0 mm kernel for adreno (#18871)

* Add Q8_0 OpenCL kernel

Co-authored-by: yunjie <redacted>
* opencl: fix build for non-adreno

* opencl: refactor q8_0

* opencl: enforce subgroup size of 64 for adreno for q8_0

* For A750 and older generations, subgroup size can be 64 or 128.
  This kernel assumes subgroup size 64.

* opencl: suppress warning when adreno kernels are disabled

---------

Co-authored-by: yunjie <redacted>
Co-authored-by: Li He <redacted>
5 weeks agosync : ggml
Georgi Gerganov [Fri, 30 Jan 2026 14:27:14 +0000 (16:27 +0200)]
sync : ggml

5 weeks agocuda : fix compile warnings (whisper/0)
Georgi Gerganov [Fri, 30 Jan 2026 13:56:15 +0000 (15:56 +0200)]
cuda : fix compile warnings (whisper/0)

5 weeks agoserver : wrap around the "id_slot" parameter (#19207)
Georgi Gerganov [Fri, 30 Jan 2026 17:46:10 +0000 (19:46 +0200)]
server : wrap around the "id_slot" parameter (#19207)

* server : wrap around the "id_slot" parameter

* cont : minor

5 weeks agoCorrectly fetch q8_1 quantize pipeline in test as needed by 8a3519b (#19194)
Simon Redman [Fri, 30 Jan 2026 16:27:16 +0000 (11:27 -0500)]
Correctly fetch q8_1 quantize pipeline in test as needed by 8a3519b (#19194)

5 weeks agospec : add ngram-mod (#19164)
Georgi Gerganov [Fri, 30 Jan 2026 16:21:48 +0000 (18:21 +0200)]
spec : add ngram-mod (#19164)

* spec : add ngram-mod

* cont : simplify + keep track of occupancy

* cont : cleanup

* cont : move initialization to common/speculative

* cont : cleanup

* cont : cleanup

* cont : fix

5 weeks agojinja : add unordered_map include to value.h [no ci] (#19205)
Marcello Seri [Fri, 30 Jan 2026 15:09:44 +0000 (16:09 +0100)]
jinja : add unordered_map include to value.h [no ci] (#19205)

On macos Sequoia 15.7.3, x86_64, the build has recently started failing with
```
In file included from .../code/cpp/llama.cpp/common/jinja/string.cpp:2:
.../code/cpp/llama.cpp/common/./jinja/value.h:478:10: error: no template named 'unordered_map' in namespace 'std'
  478 |     std::unordered_map<value, value, value_hasher, value_equivalence> unordered;
      |     ~~~~~^
In file included from .../code/cpp/llama.cpp/common/jinja/caps.cpp:1:
.../code/cpp/llama.cpp/common/jinja/value.h:478:10: error: no template named 'unordered_map' in namespace 'std'
  478 |     std::unordered_map<value, value, value_hasher, value_equivalence> unordered;
      |     ~~~~~^
In file included from .../code/cpp/llama.cpp/common/jinja/value.cpp:1:
In file included from .../code/cpp/llama.cpp/common/jinja/runtime.h:4:
.../code/cpp/llama.cpp/common/jinja/value.h:478:10: error: no template named 'unordered_map' in namespace 'std'
  478 |     std::unordered_map<value, value, value_hasher, value_equivalence> unordered;
[...]
```

After a bit of digging to make sure all the appropriate flags were used, I notifced that the necessary header was not included. This fixes the build for me and should not affect negatively other builds that for some reasons were already succeeding

5 weeks agomemory : clarify comments for r_l and s_l tensors [no ci] (#19203)
Daniel Bevenius [Fri, 30 Jan 2026 14:18:41 +0000 (15:18 +0100)]
memory : clarify comments for r_l and s_l tensors [no ci] (#19203)

This commit updates the comments in state_write_data to clarify that it
is handling the R and S tensors and not Key and Value tensors.

5 weeks agotests : add GQA=20 FA test (#19095)
Georgi Gerganov [Fri, 30 Jan 2026 11:52:57 +0000 (13:52 +0200)]
tests : add GQA=20 FA test (#19095)

5 weeks agoconvert : add missing return statement for GraniteMoeModel (#19202)
Daniel Bevenius [Fri, 30 Jan 2026 10:12:53 +0000 (11:12 +0100)]
convert : add missing return statement for GraniteMoeModel (#19202)

This commit adds a missing return statement to the GraniteMoeModel class
to fix an issue in the model conversion process.

Resolves: https://github.com/ggml-org/llama.cpp/issues/19201

5 weeks agomemory : remove unused tmp_buf (#19199)
Daniel Bevenius [Fri, 30 Jan 2026 09:37:06 +0000 (10:37 +0100)]
memory : remove unused tmp_buf (#19199)

This commit removes the unused tmp_buf variable from llama-kv-cache.cpp
and llama-memory-recurrent.cpp.

The tmp_buf variable was declared but never used but since it has a
non-trivial constructor/desctuctor we don't get an unused variable
warning about it.

5 weeks agodocs: Add LlamaLib to UI projects (#19181)
Antonis Makropoulos [Fri, 30 Jan 2026 06:54:28 +0000 (08:54 +0200)]
docs: Add LlamaLib to UI projects (#19181)

5 weeks agoadd tensor type checking as part of cuda graph properties (#19186)
bssrdf [Fri, 30 Jan 2026 04:57:52 +0000 (23:57 -0500)]
add tensor type checking as part of cuda graph properties (#19186)

5 weeks agosycl: implement GGML_UNARY_OP_SOFTPLUS (#19114)
s8322 [Fri, 30 Jan 2026 04:01:38 +0000 (06:01 +0200)]
sycl: implement GGML_UNARY_OP_SOFTPLUS (#19114)

* sycl: add softplus unary op implementation

* sycl: add softplus unary op implementation

* docs(ops): mark SYCL SOFTPLUS as supported

* docs: update SYCL status for SOFTPLUS

5 weeks agosycl: implement GGML_OP_TRI (#19089)
RachelMantel [Fri, 30 Jan 2026 04:00:49 +0000 (06:00 +0200)]
sycl: implement GGML_OP_TRI (#19089)

* sycl: implement GGML_OP_TRI

* docs: update ops.md for SYCL TRI

* docs: regenerate ops.md

* docs: update SYCL support for GGML_OP_TRI

5 weeks agoFix typos in SYCL documentation (#19162)
DDXDB [Fri, 30 Jan 2026 01:46:57 +0000 (09:46 +0800)]
Fix typos in SYCL documentation (#19162)

* Fix typos in SYCL documentation

* Update SYCL.md

* Update SYCL.md

* Update SYCL.md

* Update docs/backend/SYCL.md

Co-authored-by: Neo Zhang Jianyu <redacted>
* Update SYCL.md

---------

Co-authored-by: Neo Zhang Jianyu <redacted>
5 weeks agoggml-webgpu: improve flastAttention performance by software pipelining (#19151)
Zheyuan Chen [Thu, 29 Jan 2026 22:05:30 +0000 (14:05 -0800)]
ggml-webgpu: improve flastAttention performance by software pipelining (#19151)

* webgpu : pipeline flash_attn Q/K loads in WGSL

* ggml-webgpu: unroll Q*K accumlation inner loop

* ggml-webgpu: vectorization

* ggml-webgpu: unrolling

* ggml-webgpu: remove redundant unrolling

* ggml-webgpu: restore the config

* ggml-webgpu: remove redundant comments

* ggml-webgpu: formatting

* ggml-webgpu: formatting and remove vectorization

* ggml-webgpu: remove unnecessary constants

* ggml-webgpu: change QKV buffer to read_write to pass validation

* ggml-webgpu: add explanation for the additional bracket around Q K accumulate

* Indentation and for -> if for tail

* Kick off CI on wgsl only commits

---------

Co-authored-by: Reese Levine <redacted>
5 weeks agohexagon: enable offloading to Hexagon on Windows on Snapdragon (#19150)
Todor Boinovski [Thu, 29 Jan 2026 20:33:21 +0000 (12:33 -0800)]
hexagon: enable offloading to Hexagon on Windows on Snapdragon (#19150)

* hexagon: updates to enable offloading to HTP on WoS

* Update windows.md

* Update windows.md

* hexagon: enable -O3 optimizations

* hexagon: move all _WINDOWS conditional compilation to _WIN32

* hexagon: updates to enable offloading to HTP on WoS

* hexagon: use run-time vs load-time dynamic linking for cdsp driver interface

* refactor htp-drv

* hexagon: add run-bench.ps1 script

* hexagon: htdrv refactor

* hexagon: unify Android and Windows build readmes

* hexagon: update README.md

* hexagon: refactor htpdrv

* hexagon: drv refactor

* hexagon: more drv refactor

* hexagon: fixes for android builds

* hexagon: factor out dl into ggml-backend-dl

* hexagon: add run-tool.ps1 script

* hexagon: merge htp-utils in htp-drv and remove unused code

* wos: no need for getopt_custom.h

* wos: add missing CR in htpdrv

* hexagon: ndev enforecement applies only to the Android devices

* hexagon: add support for generating and signing .cat file

* hexagon: add .inf file

* hexagon: working auto-signing and improved windows builds

* hexagon: futher improve skel build

* hexagon: add rough WoS guide

* hexagon: updated windows guide

* hexagon: improve cmake handling of certs and logging

* hexagon: improve windows setup/build doc

* hexagon: more windows readme updates

* hexagon: windows readme updates

* hexagon: windows readme updates

* hexagon: windows readme updates

* hexagon: windows readme updates

* Update windows.md

* Update windows.md

* snapdragon: rename docs/backend/hexagon to docs/backends/snapdragon

Also added a power shell script to simplify build env setup.

* hexagon: remove trailing whitespace and move cmake requirement to user-presets

* hexagon: fix CMakeUserPresets path in workflow yaml

* hexagon: introduce local version of libdl.h

* hexagon: fix src1 reuse logic

gpt-oss needs a bigger lookahead window.
The check for src[1] itself being quantized was wrong.

---------

Co-authored-by: Max Krasnyansky <redacted>
5 weeks agocuda : fix nkvo, offload and cuda graph node properties matching (#19165)
Georgi Gerganov [Thu, 29 Jan 2026 16:45:30 +0000 (18:45 +0200)]
cuda : fix nkvo, offload and cuda graph node properties matching (#19165)

* cuda : fix nkvo

* cont : more robust cuda graph node property matching

* cont : restore pre-leafs implementation

* cont : comments + static_assert

5 weeks agochat : add parsing for solar-open-100b (#18540)
Aldehir Rojas [Thu, 29 Jan 2026 15:06:15 +0000 (09:06 -0600)]
chat : add parsing for solar-open-100b (#18540)

* chat : add parsing for solar-open-100b

* add comments to rules

* cont : make assistant start optional

* cont : remove assistant start prefix altogether

---------

Co-authored-by: Piotr Wilkin (ilintar) <redacted>
5 weeks agowebui: Update Svelte to fix effect_update_depth_exceeded errors (#19144)
Andrew Marshall [Thu, 29 Jan 2026 14:56:39 +0000 (09:56 -0500)]
webui: Update Svelte to fix effect_update_depth_exceeded errors (#19144)

The upstream fix is first available in 5.38.2, so constrain to at least
that version.

Rebuild pre-compiled webui index.html.gz based on these changes.

See also:
https://github.com/ggml-org/llama.cpp/issues/16347
https://github.com/huntabyte/bits-ui/issues/1687
https://github.com/sveltejs/svelte/issues/16548

5 weeks agojinja : do not pass empty tools and add some none filters (#19176)
Sigbjørn Skjæret [Thu, 29 Jan 2026 13:06:54 +0000 (14:06 +0100)]
jinja : do not pass empty tools and add some none filters (#19176)

5 weeks agoHIP: add mmf for CDNA (#18896)
yulo [Thu, 29 Jan 2026 10:10:53 +0000 (18:10 +0800)]
HIP: add mmf for CDNA (#18896)

* refactor mmf rows_per_block

* speed up compile

* pass cdna compile

* fix cuda error

* clean up mmf

* f32 mmf

* clean float mma

* fix mmf error

* faster mmf

* extend tile k

* fix compile error

* Revert "extend tile k"

This reverts commit 4d2ef3d483932659801a59a5af0b6b48f6ffd5c7.

* fix smem overflow

* speed up compiling mmf

* speed up compile for hip

* 512 block for cdna

* config pad size

* fix as comment

* update select logic

* move some code to cuh

* fix as comment

* correct cdna3 config

---------

Co-authored-by: zhang hui <redacted>
5 weeks agoarg : add -kvu to llama-batched-bench (#19172)
Georgi Gerganov [Thu, 29 Jan 2026 06:50:47 +0000 (08:50 +0200)]
arg : add -kvu to llama-batched-bench (#19172)

5 weeks agoggml-zendnn : resolve ZenDNN backend cross-module symbol dependency (#19159)
Vishal Singh [Thu, 29 Jan 2026 04:28:57 +0000 (09:58 +0530)]
ggml-zendnn : resolve ZenDNN backend cross-module symbol dependency (#19159)

5 weeks agoCUDA: refactor topk-moe to enable more models (GLM 4.7, Nemotron etc.) (#19126)
Aman Gupta [Thu, 29 Jan 2026 02:31:28 +0000 (10:31 +0800)]
CUDA: refactor topk-moe to enable more models (GLM 4.7, Nemotron etc.) (#19126)

6 weeks agosycl: fix norm kernels: l2_norm, group_norm, rms_norm by remove assert to support...
Neo Zhang [Thu, 29 Jan 2026 01:20:22 +0000 (09:20 +0800)]
sycl: fix norm kernels: l2_norm, group_norm, rms_norm by remove assert to support more cases (#19154)

Co-authored-by: Neo Zhang Jianyu <redacted>
6 weeks agoci : find latest release with asset for winget (#19161)
Sigbjørn Skjæret [Wed, 28 Jan 2026 21:05:39 +0000 (22:05 +0100)]
ci : find latest release with asset for winget (#19161)

6 weeks agoVulkan Flash Attention Coopmat1 Refactor (#19075)
Ruben Ortlam [Wed, 28 Jan 2026 17:52:45 +0000 (18:52 +0100)]
Vulkan Flash Attention Coopmat1 Refactor (#19075)

* vulkan: use coopmat for flash attention p*v matrix multiplication

* fix P loading issue

* fix barrier position

* remove reduction that is no longer needed

* move max thread reduction into loop

* remove osh padding

* add bounds checks and padding

* remove unused code

* fix shmem sizes, loop duration and accesses

* don't overwrite Qf, add new shared psh buffer instead

* add missing bounds checks

* use subgroup reductions

* optimize

* move bounds check, reduce barriers

* support other Bc values and other subgroup sizes

* remove D_split

* replace Of register array with shared memory Ofsh array

* parallelize HSV across the rowgroups

* go back to Of in registers, not shmem

* vectorize sfsh

* don't store entire K tile in shmem

* fixes

* load large k tiles to shmem on Nvidia

* adapt shared memory host check function to shader changes

* remove Bc 32 case

* remove unused variable

* fix missing mask reduction tmspsh barrier

* fix mask bounds check

* fix rowmax f16 under/overflow to inf

* fix flash_attn_cm2 BLOCK_SIZE preprocessor directives

6 weeks agospec : add self‑speculative decoding (no draft model required) + refactor (#18471)
Sascha Rogmann [Wed, 28 Jan 2026 17:42:42 +0000 (18:42 +0100)]
spec : add self‑speculative decoding (no draft model required) + refactor (#18471)

* server: introduce self-speculative decoding

* server: moved self-call into speculative.cpp

* can_speculate() includes self-speculation

Co-authored-by: Georgi Gerganov <redacted>
* server: can_speculate() tests self-spec

* server: replace can_speculate() with slot.can_speculate()

Co-authored-by: Sigbjørn Skjæret <redacted>
* common: use %zu format specifier for size_t in logging

Co-authored-by: Sigbjørn Skjæret <redacted>
* server: can_speculate() requires a task instance

* common: ngram map, config self-speculative decoding

* common: add enum common_speculative_type

* common: add vector of speculative states

* common: add option --spec-draftless

* server: cleanup (remove slot.batch_spec, rename)

* common: moved self-spec impl to ngram-map

* common: cleanup (use common_speculative_state_draft)

* spec : refactor

* cont : naming

* spec: remove --spec-config

* doc: (draftless) speculative decoding

* common: print performance in spec decoding

* minor : cleanup

* common : better names

* minor : cleanup + fix build

* minor: comments

* CODEOWNERS: add common/ngram-map.* (#18471)

* common : rename speculative.draftless_type -> speculative.type

* ngram-map : fix uninitialized values

* ngram-map : take into account the input can become shorter

* ngram-map : revert len check for now

* arg : change `--spec-draftless` -> `--spec-type`

* spec : add common_speculative_state::accept()

* spec : refactor + add common_speculative_begin()

* spec : fix begin() call with mtmd

* spec : additional refactor + remove common_speculative_params

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agoconvert : yield Mamba2Model/GraniteMoeModel modify_tensors (#19157)
Daniel Bevenius [Wed, 28 Jan 2026 15:49:36 +0000 (16:49 +0100)]
convert : yield Mamba2Model/GraniteMoeModel modify_tensors (#19157)

* convert : yield Mamba2Model/GraniteMoeModel modify_tensors

This commit updates the `GraniteHybridModel` class' modify_tensors
function to properly delegate to `Mamba2Model.modify_tensors` and
`GraniteMoeModel.modify_tensors` using 'yield from' instead of 'return'.

The motivation for this is that modify_tensors is a generator function
(it uses 'yield from'), but the two calls above use return statements
but don't yield anything which means that the the caller of this
function will not receive any yielded values from it. And this causes
layer tensors to be silently dropped during conversion.

6 weeks agoggml-sycl: remove unused syclcompat header (#19140)
Patryk Kaminski [Wed, 28 Jan 2026 15:33:54 +0000 (16:33 +0100)]
ggml-sycl: remove unused syclcompat header (#19140)

The syclcompat/math.hpp is not used anymore. The change that intrduced it was successfuly reverted (https://github.com/ggml-org/llama.cpp/pull/17826).
This include path will become obsolete and dropped in oneAPI 2026.0 effectively breaking ggml-sycl builds.

6 weeks agojinja : undefined should be treated as sequence/iterable (return string/array) by...
Sigbjørn Skjæret [Wed, 28 Jan 2026 13:40:29 +0000 (14:40 +0100)]
jinja : undefined should be treated as sequence/iterable (return string/array) by filters/tests (#19147)

* undefined is treated as iterable (string/array) by filters

`tojson` is not a supported `undefined` filter

* add tests

* add sequence and iterable tests

keep it DRY and fix some types

6 weeks agovulkan: handle device dedup on MacOS + Vega II Duo cards (#19058)
Oleksandr Kuvshynov [Wed, 28 Jan 2026 11:35:54 +0000 (06:35 -0500)]
vulkan: handle device dedup on MacOS + Vega II Duo cards (#19058)

Deduplication here relied on the fact that vulkan would return unique
UUID for different physical GPUs. It is at the moment not always the case.
On Mac Pro 2019 running Mac OS, with 2 Vega II Duo cards (so, 4 GPU total),
MotlenVK would assign same UUID to pairs of GPUs, unless they
are connected with Infinity Fabric.

See more details here: KhronosGroup/MoltenVK#2683.

The right way is to fix that in MoltenVK, but until it is fixed,
llama.cpp would only recognize 2 of 4 GPUs in such configuration.

The deduplication logic here is changed to only filter GPUs if UUID is
same but driver is different.

6 weeks agodoc: add build instruction to use Vulkan backend on macos (#19029)
Ben Chen [Wed, 28 Jan 2026 11:30:16 +0000 (19:30 +0800)]
doc: add build instruction to use Vulkan backend on macos (#19029)

6 weeks agoggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718)
Kevin Pouget [Wed, 28 Jan 2026 09:49:40 +0000 (10:49 +0100)]
ggml: new backend for Virglrenderer API Remoting acceleration (v2) (#18718)

6 weeks agoggml-cpu: arm64: Q4_K scale unroll and vectorization (#19108)
Alberto Cabrera Pérez [Wed, 28 Jan 2026 07:15:56 +0000 (07:15 +0000)]
ggml-cpu: arm64: Q4_K scale unroll and vectorization (#19108)

6 weeks agocuda : fix "V is K view" check for non-unified KV cache (#19145)
Georgi Gerganov [Wed, 28 Jan 2026 07:15:27 +0000 (09:15 +0200)]
cuda : fix "V is K view" check for non-unified KV cache (#19145)

6 weeks agoCUDA: tune GLM 4.7 Flash FA kernel selection logic (DGX Spark) (#19142)
Georgi Gerganov [Wed, 28 Jan 2026 07:15:11 +0000 (09:15 +0200)]
CUDA: tune GLM 4.7 Flash FA kernel selection logic (DGX Spark) (#19142)

6 weeks agoserver : adjust spec tests to generate up to 16 tokens (#19093)
Georgi Gerganov [Wed, 28 Jan 2026 07:11:40 +0000 (09:11 +0200)]
server : adjust spec tests to generate up to 16 tokens (#19093)

6 weeks agollama : disable Direct IO by default (#19109)
Georgi Gerganov [Wed, 28 Jan 2026 07:11:13 +0000 (09:11 +0200)]
llama : disable Direct IO by default (#19109)

* llama : disable Direct IO by default

* cont : override mmap if supported

6 weeks agosampling : remove sampling branching in output_reserve (#18811)
Daniel Bevenius [Wed, 28 Jan 2026 04:59:30 +0000 (05:59 +0100)]
sampling : remove sampling branching in output_reserve (#18811)

* sampling : remove sampling branching in output_reserve

This commit updates output_reserve in llama-context.cpp to always
allocate sampling buffers regardless of whether sampling is needed for
the current batch.

The motivation for this is to avoid reallocations and branching based on
the sampling requirements of the batch.

6 weeks agoggml webgpu: Split shared state (webgpu_context) into global state and per-thread...
Nikhil Jain [Wed, 28 Jan 2026 04:53:36 +0000 (20:53 -0800)]
ggml webgpu: Split shared state (webgpu_context) into global state and per-thread state (#18976)

* Squashed commit of the following:

commit b3c6bf4b0450d8d452b934df27a0fb7cb53cd755
Author: Abhijit Ramesh <redacted>
Date:   Mon Dec 1 18:29:00 2025 -0800

    ggml webgpu: fix xielu parameter passing (#11)

    The XIELU operation was incorrectly using static_cast to convert
    float parameters to uint32_t, which converted numeric values instead
    of preserving IEEE 754 bit patterns. This caused incorrect values
    to be interpreted by the GPU shader.

    * Use reinterpret_cast to preserve float bit patterns when passing
      through uint32_t params buffer
    * Update WGSL shader parameter types from u32 to f32
    * Re-enable XIELU support (was disabled due to numerical issues)

    Fixes NMSE test failures for XIELU operation on WebGPU backend.

commit 5ca9b5e49ea7cddc9ab7c8b43a11a9c76a4dff4a
Author: neha-ha <redacted>
Date:   Tue Nov 18 12:17:00 2025 -0800

    Refactored pipelines and workgroup calculations (#10)

    * refactored pipelines

    * refactored workgroup calculation

    * removed commented out block of prior maps

    * Clean up ceiling division pattern

    ---------

Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Reese Levine <redacted>
Author: James Contini <redacted>
Date:   Wed Oct 29 23:13:06 2025 -0700

    formatted embed wgsl and ggml-webgpu.cpp

commit e1f6baea31645e5d96ad53664acae856f74b96f4
Author: James Contini <redacted>
Date:   Wed Oct 29 23:08:37 2025 -0700

    implemented REPL_Template support and removed bug in unary operators kernel

commit 8c70b8fece445cdc9a8c660dbddbf201e52da2bb
Author: James Contini <redacted>
Date:   Wed Oct 15 16:14:20 2025 -0700

    responded and dealt with PR comments

commit f9282c660c10dec4487d434549bdb707a9cd9f37
Author: James Contini <redacted>
Date:   Sun Oct 12 13:41:41 2025 -0700

    removed unnecesarry checking if node->src[1] exists for unary operators

commit 4cf28d7dec41c29186d66152735b244c5699f9dc
Author: James Contini <redacted>
Date:   Sun Oct 12 13:32:45 2025 -0700

    All operators (inlcluding xielu) working

commit 74c6add1761a59d2c2ff60b60e8ad3c8300f6d3e
Author: James Contini <redacted>
Date:   Fri Oct 10 13:16:48 2025 -0700

    fixed autoconfig

commit 362749910be4f0120c8ffb21ceddeb7d2c088e51
Author: James Contini <redacted>
Date:   Fri Oct 10 13:10:46 2025 -0700

    removed vestigial files

commit cb0858333785757804c5104e59c4981843207c16
Author: James Contini <redacted>
Date:   Fri Oct 10 12:59:32 2025 -0700

    abides by editor-config

commit 5360e2852a4b51197d7d67d0a5d42e908b02d7ed
Author: James Contini <redacted>
Date:   Fri Oct 10 12:45:57 2025 -0700

    rms_norm double declaration bug atoned

commit 7b09baa4aa53711be5a126043670cc182c78bfcd
Merge: 8a6ec843 74b8fc17
Author: James Contini <redacted>
Date:   Fri Oct 10 11:50:03 2025 -0700

    resolving merge conflicts

commit 8a6ec843a50ab82f8cef59b4558eb63f318ba02d
Author: James Contini <redacted>
Date:   Wed Oct 8 18:06:47 2025 -0700

    unary operators pass ggml tests

commit c3ae38278a2db236adc5912c9140e4f0d63f2c19
Author: James Contini <redacted>
Date:   Wed Oct 1 16:22:40 2025 -0700

    neg passes backend test

commit aa1c9b2f8877a405470ca56709c42a1fd43713de
Author: James Contini <redacted>
Date:   Tue Sep 30 23:55:27 2025 -0700

    neg f16xf32xip builds and runs, havent actually ran a model that uses neg kernel yet though

Co-authored-by: James Contini <redacted>
Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Abhijit Ramesh <redacted>
* Remove extra code and format

* Add ops documentation (finally)

* ggml webgpu: add SOFTPLUS unary operator

Implements SOFTPLUS (log(1 + exp(x))) with f16/f32 support. Uses f32
precision for intermediate calculations to prevent f16 overflow.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support
* Follow Vulkan backend numerical stability pattern

* ggml webgpu: add EXPM1 unary operator

Implements EXPM1 (exp(x) - 1) with f16/f32 support.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support

* ggml webgpu: add FLOOR unary operator

Implements FLOOR (rounds down to nearest integer) with f16/f32 support.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support

* ggml webgpu: add CEIL unary operator

Implements CEIL (rounds up to nearest integer) with f16/f32 support.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support

* ggml webgpu: add ROUND unary operator

Implements ROUND (rounds to nearest integer) with f16/f32 support.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support

* ggml webgpu: add TRUNC unary operator

Implements TRUNC (truncates towards zero) with f16/f32 support.

* Add shader implementation and 4 variants (f32/f16, inplace/non-inplace)
* Register pipelines and device support

* docs : update WebGPU support for unary operators (FLOOR, CEIL, ROUND, TRUNC, EXPM1, SOFTPLUS)

* Updates to webgpu get_memory

* Move shared state (webgpu_context) and device creation out of registration context, device context, and buffer context, and move into backend context

* Small cleanup

* Move Instance, Device, Adapter, Device creation, and capabilities to global state while moving Queue, pipelines, and buffers to per-thread state.

* Cleanups

* More cleanup

* Move staging_buf mutex to global context

* Resolve merge

* Resolve merge

* Resolve merge

* Clean up merge errors, delete forward declaration, and run clang-format

* Rename device_init to backend_init

* Move webgpu_context to backend_context

* Move buffer context members into global context and refactor function calls

* Run clang-format

* Remove commends

* Move parameter buffers to per-thread, add single memset_tensor param buf

* Fix CI compilation issue

* Fix builds for emscripten not supporting subgroups

* cleanup

* cleanup

---------

Co-authored-by: Reese Levine <redacted>
6 weeks agoggml-zendnn : update ZenDNN git tag to main branch (#19133)
Vishal Singh [Tue, 27 Jan 2026 22:21:36 +0000 (03:51 +0530)]
ggml-zendnn : update ZenDNN git tag to main branch (#19133)

6 weeks agojinja : implement mixed type object keys (#18955)
Sigbjørn Skjæret [Tue, 27 Jan 2026 18:50:42 +0000 (19:50 +0100)]
jinja : implement mixed type object keys (#18955)

* implement mixed type object keys

* add tests

* refactor

* minor fixes

* massive refactor

* add more tests

* forgotten tuples

* fix array/object is_hashable

* correct (albeit broken) jinja responses

verified with transformers

* improved hashing and equality

* refactor hash function

* more exhausive test case

* clean up

* cont

* cont (2)

* missing cstring

---------

Co-authored-by: Xuan Son Nguyen <redacted>
6 weeks agodocs: Remove duplicated word on CUDA build section (#19136)
David Lima [Tue, 27 Jan 2026 13:48:51 +0000 (10:48 -0300)]
docs: Remove duplicated word on CUDA build section (#19136)

6 weeks agoCUDA: tune GLM 4.7 Flash FA kernel selection logic (#19097)
Johannes Gäßler [Tue, 27 Jan 2026 13:28:56 +0000 (14:28 +0100)]
CUDA: tune GLM 4.7 Flash FA kernel selection logic (#19097)

6 weeks agoci : revert slim runner for winget (#19129)
Sigbjørn Skjæret [Tue, 27 Jan 2026 10:54:25 +0000 (11:54 +0100)]
ci : revert slim runner for winget (#19129)

6 weeks agoggml-cpu: aarm64: q6_K repack gemm and gemv (and generic) implementations (i8mm)...
Alberto Cabrera Pérez [Tue, 27 Jan 2026 09:08:10 +0000 (09:08 +0000)]
ggml-cpu: aarm64: q6_K repack gemm and gemv (and generic) implementations (i8mm) #18860 (#18888)

* Boilerplate for q6_K repack

* q6_K repack to q6_Kx8 implementation

Signed-off-by: Alberto Cabrera <redacted>
* q6_K generic gemv and gemm

* wip, gemm_q6_K 8x8

* Still WIP: loading of q8s, q6h and q6l

* first working version of q6_K gemm

* Moved q6 loads outside of sb block, Unrolled inner loop

* Replaced modulo with mask

* First implementation of GEMV

* ggml_vdotq_s32 -> vdotq_s32

* Reduce width of accumulators in q6_K gemv

* Bsums instead of calc bias. Preload scales to use vget_lane. Unroll.

* Reuse scales in GEMM (same GEMV opt)

* Added todos for bsum and different qh repack

* Arch fallback

* VSLIQ for merging qh adn ql

* Removed TODO, already tested

* Apply suggestions

Co-authored-by: Georgi Gerganov <redacted>
* Removed unused import

---------

Signed-off-by: Alberto Cabrera <redacted>
Co-authored-by: Georgi Gerganov <redacted>
6 weeks ago[CUDA] Reduce CPU-side stalls due to the CUDA command buffer being full (#19042)
Gaurav Garg [Tue, 27 Jan 2026 06:52:44 +0000 (06:52 +0000)]
[CUDA] Reduce CPU-side stalls due to the CUDA command buffer being full (#19042)

* [CUDA] Reduce CPU-side stalls due to the CUDA command buffer being full

With pipeline parallelism, during prompt processing, the CPU-side CUDA command buffer gets full, stalling the CPU. Due to this, enough work doesn't get submitted to the GPU, causing bubbles in the GPU timeline.
Fix this by setting the CUDA environment variable CUDA_SCALE_LAUNCH_QUEUES to 4x to increase the command buffer size.

* Set the env variable in the CUDA backend registry allocation

* Add link to PR in code comment

* Remove warning logs and update documentation

6 weeks agocommon : clarify HTTPS build options in error message (#19103)
Daniel Bevenius [Tue, 27 Jan 2026 05:16:00 +0000 (06:16 +0100)]
common : clarify HTTPS build options in error message (#19103)

* common : clarify HTTPS build options in error message

This commit updates the https error message to provide clearer
instructions for users who encounter the "HTTPS is not supported" error.

The motivation for this is that it might not be clear to users that only
one of these options are needed to enable HTTPS support.
The LLAMA_OPENSSL option is also added to the message to cover all
possible build configurations.

* clarify that OpenSSL is the default for HTTPS support

6 weeks agoggml-cpu: Enable FP16 MMA kernels on PPC (#19060)
shalinib-ibm [Tue, 27 Jan 2026 03:52:34 +0000 (09:22 +0530)]
ggml-cpu: Enable FP16 MMA kernels on PPC (#19060)

6 weeks agoopencl: add flattened q6_K mv (#19054)
lhez [Tue, 27 Jan 2026 03:36:24 +0000 (19:36 -0800)]
opencl: add flattened q6_K mv (#19054)

* opencl: flatten `q6_K` and add `kernel_mul_mv_q6_K_f32_flat`

* opencl: clean up

* opencl: refactor q6_K mv - put loop body in `block_q_6_K_dot_y_flat`

* opencl: tweak the workgroup size a bit

* opencl: output 4 values per subgroup for `kernel_mul_mv_q6_K_f32_flat`

* opencl: proper alignment for q6_K

* opencl: boundary handling for flattened q6_K mv

* opencl: rename q6_K mv kernel file

* opencl: put flattened q6_K mv in its own file

* opencl: use lower k in file name

* opencl: use K in variable names

6 weeks agoCUDA: fix padding of GQA to power of 2 in FA (#19115)
Johannes Gäßler [Mon, 26 Jan 2026 22:24:58 +0000 (23:24 +0100)]
CUDA: fix padding of GQA to power of 2 in FA (#19115)

6 weeks agograph : fix nkvo offload with FA (#19105)
Georgi Gerganov [Mon, 26 Jan 2026 18:18:34 +0000 (20:18 +0200)]
graph : fix nkvo offload with FA (#19105)

6 weeks agoci : use new 1vCPU runner for lightweight jobs (#19107)
Sigbjørn Skjæret [Mon, 26 Jan 2026 14:22:49 +0000 (15:22 +0100)]
ci : use new 1vCPU runner for lightweight jobs (#19107)

* use new 1vCPU runner for lightweight jobs

* pyright is too heavy, look into ty some day

use new pip-install input