]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
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

6 weeks agomodel : add correct type for GLM 4.7 Flash (#19106)
Georgi Gerganov [Mon, 26 Jan 2026 09:24:30 +0000 (11:24 +0200)]
model : add correct type for GLM 4.7 Flash (#19106)

6 weeks agoCUDA: faster FA for GQA > 1 but not power of 2 (#19092)
Johannes Gäßler [Sun, 25 Jan 2026 20:19:47 +0000 (21:19 +0100)]
CUDA: faster FA for GQA > 1 but not power of 2 (#19092)

6 weeks agometal : fix recommendedMaxWorkingSetSize availability on legacy iOS/macOS (#19088)
ccbinn [Sun, 25 Jan 2026 18:07:19 +0000 (02:07 +0800)]
metal : fix recommendedMaxWorkingSetSize availability on legacy iOS/macOS (#19088)

Co-authored-by: chenbin11 <redacted>
6 weeks agoconvert : yield Gemma3N custom_map tensors directly (#19091)
Sigbjørn Skjæret [Sun, 25 Jan 2026 17:03:34 +0000 (18:03 +0100)]
convert : yield Gemma3N custom_map tensors directly (#19091)

6 weeks agoggml-cpu: Use tiled FA for prompt-processing (#19012)
Aman Gupta [Sun, 25 Jan 2026 15:25:58 +0000 (23:25 +0800)]
ggml-cpu: Use tiled FA for prompt-processing (#19012)

* ggml-cpu: Use tiled FA for prompt-processing

the FA performance is gimped on CPU on long contexts because it essentially uses a vector kernel. This PR adds a tiled FA for PP. Perf tuning for tile sizes done on a AMD EPYC single-socket 64-c machine.

* fix out of bounds for mask

* skip rows where there are all masks

* skip tile if mask is inf

* store mask in worksize

* check inf tile earlier

6 weeks agokv-cache : support V-less cache (#19067)
Georgi Gerganov [Sun, 25 Jan 2026 13:48:56 +0000 (15:48 +0200)]
kv-cache : support V-less cache (#19067)

* kv-cache : support V-less cache

* cuda : better check for V_is_K_view

* cuda : improve V_is_K_view check

* graph : add comments

* hparams : refactor

6 weeks agoconvert : fix Gemma3N, GraniteMoe and Ernie4.5Moe (#19084)
Sigbjørn Skjæret [Sun, 25 Jan 2026 12:05:05 +0000 (13:05 +0100)]
convert : fix Gemma3N, GraniteMoe and Ernie4.5Moe (#19084)

* fix Gemma3N and Ernie4.5Moe

* fix GraniteMoe

6 weeks agocompletion : fix prompt cache for recurrent models (#19045)
Georgi Gerganov [Sun, 25 Jan 2026 07:12:50 +0000 (09:12 +0200)]
completion : fix prompt cache for recurrent models (#19045)

6 weeks agoreadme: update RWKV7 model links (#19061)
Molly Sophia [Sun, 25 Jan 2026 07:11:19 +0000 (15:11 +0800)]
readme: update RWKV7 model links (#19061)

Signed-off-by: Molly Sophia <redacted>
6 weeks agollama: fix integer type consistency in split helpers (#18894)
Jakkala Mahesh [Sun, 25 Jan 2026 07:10:52 +0000 (12:40 +0530)]
llama: fix integer type consistency in split helpers (#18894)

* llama: fix integer type consistency in split helpers

* llama: apply minor style fixes

* llama: remove trailing whitespace

6 weeks agocommon : use two decimal places for float arg help messages (#19048)
Daniel Bevenius [Sun, 25 Jan 2026 06:31:42 +0000 (07:31 +0100)]
common : use two decimal places for float arg help messages (#19048)

* common : use two decimal places for float arg help messages

This commit updates the help messages for various command-line arguments
in arg.cpp to display floating-point default values with two decimal
places instead of one.

The motivation for this changes is that currently only having one decimal
place means that values generated using --help or llama-gen-docs will not
display the correct values.

For example, currently the value of top-p in tools/server/README.md is
`0.9`, but the default value is actually '0.95'. And running
llama-gen-docs does not update this value as it uses the output from the
help message, which shows only one decimal place, so the values look
like they are unchanged.

* docs : run llama-gen-docs to update docs

6 weeks agoconvert : fix conversion for inheriting models that were bypassing modify_tensors...
Bartowski [Sun, 25 Jan 2026 01:36:47 +0000 (20:36 -0500)]
convert : fix conversion for inheriting models that were bypassing modify_tensors (#19064)

* Add undo_permute = False where needed

* Replace super().modify_tensors with ModelBase

* Add one more ModelBase.modify_tensors

* Update convert_hf_to_gguf.py

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update convert_hf_to_gguf.py

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update convert_hf_to_gguf.py

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

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agollama-fit-params: keep explicit --ctx-size 0 (#19070)
Johannes Gäßler [Sat, 24 Jan 2026 21:13:08 +0000 (22:13 +0100)]
llama-fit-params: keep explicit --ctx-size 0 (#19070)

6 weeks agoGGUF: check that tensor size is representable (#19072)
Johannes Gäßler [Sat, 24 Jan 2026 20:57:51 +0000 (21:57 +0100)]
GGUF: check that tensor size is representable (#19072)

6 weeks agochat: fix language input for translategemma (#19052)
Xuan-Son Nguyen [Sat, 24 Jan 2026 16:58:45 +0000 (17:58 +0100)]
chat: fix language input for translategemma (#19052)

* chat: fix language input for translategemma

* Update common/chat.cpp

Co-authored-by: Aldehir Rojas <redacted>
---------

Co-authored-by: Aldehir Rojas <redacted>
6 weeks agoCUDA: re-use MLA K data for V in MMA FA (#19057)
Johannes Gäßler [Sat, 24 Jan 2026 09:09:36 +0000 (10:09 +0100)]
CUDA: re-use MLA K data for V in MMA FA (#19057)

6 weeks agoggml-cuda: enable cuda-graphs for `n-cpu-moe` (#18934)
Aman Gupta [Sat, 24 Jan 2026 06:25:20 +0000 (14:25 +0800)]
ggml-cuda: enable cuda-graphs for `n-cpu-moe` (#18934)

* ggml-cuda: add split-wise cuda graph

* add n-cpu-moe compare_llama_bench.py

* fix hip/musa builds

6 weeks agoggml-hexagon: flash-attn opt (#19025)
nullname [Sat, 24 Jan 2026 06:02:07 +0000 (14:02 +0800)]
ggml-hexagon: flash-attn opt (#19025)

* optimize flash attention kernel by improving score computation and online softmax update

* wip

* Refactor online softmax update in flash attention kernel for improved performance

* Optimize flash attention kernel by replacing float array with HVX_Vector for score computation

* wip

6 weeks agograph : utilize `ggml_build_forward_select()` to avoid reallocations (#18898)
Georgi Gerganov [Fri, 23 Jan 2026 16:22:34 +0000 (18:22 +0200)]
graph : utilize `ggml_build_forward_select()` to avoid reallocations (#18898)

* graph : avoid branches between embedding and token inputs

* models : make deepstack graphs (e.g. Qwen3 VL) have constant topology

* ci : enable -DGGML_SCHED_NO_REALLOC=ON for server CI

* cont : pad token embeddings to n_embd_inp

6 weeks ago[SYCL] use malloc to support both iGPU and dGPU in same time (#18992)
Neo Zhang [Fri, 23 Jan 2026 12:54:10 +0000 (20:54 +0800)]
[SYCL] use malloc to support both iGPU and dGPU in same time (#18992)

* use malloc to support both iGPU and dGPU in same time

* support windows

---------

Co-authored-by: Neo Zhang Jianyu <redacted>
6 weeks agochat : fix translategemma crash on common_chat_format_example (#19019)
Xuan-Son Nguyen [Fri, 23 Jan 2026 11:03:42 +0000 (12:03 +0100)]
chat : fix translategemma crash on common_chat_format_example (#19019)

6 weeks agomodel-conversion : use BUILD_DIR variable in all scripts (#19015)
Daniel Bevenius [Fri, 23 Jan 2026 08:01:36 +0000 (09:01 +0100)]
model-conversion : use BUILD_DIR variable in all scripts (#19015)

This commit modifies all the utility scripts to use an optional
BUILD_DIR variable/argument to specify the build directory.

The motivation for this is that Commit
3d55846a5c626e2e608db8c24fa9ee6defaacca9 ("model-conversion : add
BUILD_DIR variable to run-converted-model scripts") introduced this
variable to the causal and embeddings scripts, but I missed the scripts
in the utils directory.

6 weeks agoggml-cpu: aarm64: q5_K repack gemm and gemv (and generic) implementations (i8mm)...
Alberto Cabrera Pérez [Fri, 23 Jan 2026 07:55:08 +0000 (07:55 +0000)]
ggml-cpu: aarm64: q5_K repack gemm and gemv (and generic) implementations (i8mm) (#18860)

* Boilerplate for q5_Kx8 REPACK on ARM and fallback

Signed-off-by: Alberto Cabrera <redacted>
* Implements make_block_q5_Kx8 by extending make_block_q4_Kx8

Signed-off-by: Alberto Cabrera <redacted>
* q5_K repack gemm and gemv generics

* Gemm and Gemv ARM implementations (i8mm)

* Improved qh manipulation looking at non-repack vec_dot implementation

* Full unroll

* Apply Q5_K Gemv vand and vshl optimizations to gemm. Improve comments.

Signed-off-by: Alberto Cabrera <redacted>
* Fix wrong fallback definitions of Q5_K

Signed-off-by: Alberto Cabrera <redacted>
* Fixed comments. Reverted unnecessary formatting

Signed-off-by: Alberto Cabrera <redacted>
* Fixed typo in generic definitions

* Switching AND + Shift with Shift Insert. Better op interleaving.

* Vectorize + unroll the block scales

* Apply gemm optimizations to gemv

* Improve bias calculation

---------

Signed-off-by: Alberto Cabrera <redacted>
6 weeks agocli : load parser definition (#19031)
Aldehir Rojas [Fri, 23 Jan 2026 02:31:22 +0000 (20:31 -0600)]
cli : load parser definition (#19031)

* cli : load parser definition

* cont : only unload if a parser is defined

6 weeks agoserver : support preserving reasoning_content in assistant message (#18994)
Xuan-Son Nguyen [Thu, 22 Jan 2026 20:30:06 +0000 (21:30 +0100)]
server : support preserving reasoning_content in assistant message (#18994)

* support reasoning_content input

* report template caps to webui

* add docs

* rm commented code

6 weeks agomla : make the V tensor a view of K (#18986)
Georgi Gerganov [Thu, 22 Jan 2026 20:09:01 +0000 (22:09 +0200)]
mla : make the V tensor a view of K (#18986)

* mla : pass V as a view of K to the FA op

* cuda : adjust mla logic to new layout

* kv-cache : fix rope shift

* tests : remove comment

* cuda : fix reusable_cutoff

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

Co-authored-by: Johannes Gäßler <redacted>
6 weeks agoCUDA: fix alignment check for FA (#19023)
Johannes Gäßler [Thu, 22 Jan 2026 19:39:25 +0000 (20:39 +0100)]
CUDA: fix alignment check for FA (#19023)

6 weeks agoconvert_hf_to_gguf.py: refactor modify_tensors to call super (#18866)
Aman Gupta [Thu, 22 Jan 2026 18:58:07 +0000 (02:58 +0800)]
convert_hf_to_gguf.py: refactor modify_tensors to call super (#18866)

6 weeks agoopencl: enable the general fp mm for non-cont input and as a fallback for specialized...
lhez [Thu, 22 Jan 2026 18:29:25 +0000 (10:29 -0800)]
opencl: enable the general fp mm for non-cont input and as a fallback for specialized kqv kernel for adreno (#18970)

* opencl: add `copy_to_contiguous` and utilize mm kernels

* opencl: only copy to cont for f32 and f16 tensors

* opencl: use cont mm for fallback when dst is large

* opencl: use nb local to copy-to-cont

* opencl: use local offset as well

6 weeks agoserver: do not log certain endpoints (avoid log spam) (#19028)
Xuan-Son Nguyen [Thu, 22 Jan 2026 18:24:37 +0000 (19:24 +0100)]
server: do not log certain endpoints (avoid log spam) (#19028)

6 weeks agoquant : manual overrides of tensor types take precedence (#18952)
Georgi Gerganov [Thu, 22 Jan 2026 14:17:06 +0000 (16:17 +0200)]
quant : manual overrides of tensor types take precedence (#18952)

6 weeks agorelease: update github api (#19022)
Aaron Teo [Thu, 22 Jan 2026 13:38:02 +0000 (21:38 +0800)]
release: update github api (#19022)

6 weeks agomtmd : update docs to use llama_model_n_embd_inp (#18999)
Xuan-Son Nguyen [Thu, 22 Jan 2026 13:36:32 +0000 (14:36 +0100)]
mtmd : update docs to use llama_model_n_embd_inp (#18999)

6 weeks agoserver: Reorder methods in `server-task.cpp` (#19016)
손희준 [Thu, 22 Jan 2026 13:36:04 +0000 (22:36 +0900)]
server: Reorder methods in `server-task.cpp` (#19016)

* Move `task_result_state::update_chat_msg` to match with header

* Move `server_task_result_cmpl_partial::to_json_anthropic()` to match with header

---------

Co-authored-by: openingnow <>
6 weeks agoCUDA: add gqa_ratio 4 for GLM 4.7 flash (#18953)
Aman Gupta [Thu, 22 Jan 2026 10:51:53 +0000 (18:51 +0800)]
CUDA: add gqa_ratio 4 for GLM 4.7 flash (#18953)

6 weeks agoopencl: add TRI op support (#18979)
shaofeiqi [Thu, 22 Jan 2026 06:05:54 +0000 (22:05 -0800)]
opencl: add TRI op support (#18979)

7 weeks agoggml-zdnn : mark zDNN buffers as non-host (#18967)
Aleksei Nikiforov [Thu, 22 Jan 2026 00:16:21 +0000 (01:16 +0100)]
ggml-zdnn : mark zDNN buffers as non-host (#18967)

While buffers reside in host memory,
additional transformation is needed to use buffers with zDNN.

Fixes #18848

7 weeks agoci : update GitHub Actions versions [no ci] (#18935)
Pádraic Slattery [Wed, 21 Jan 2026 23:57:18 +0000 (00:57 +0100)]
ci : update GitHub Actions versions [no ci] (#18935)

7 weeks agoconvert : add Devstral-2 (Ministral3ForCausalLM) arch (#18972)
Mariusz Woloszyn [Wed, 21 Jan 2026 23:55:55 +0000 (00:55 +0100)]
convert : add Devstral-2 (Ministral3ForCausalLM) arch (#18972)

* Add Ministral3ForCausalLM architeture

This adds support for newer architectres like Devstral-2

* removed blank line found after function decorator

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

Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agojinja: support none|string (#18995)
Piotr Wilkin (ilintar) [Wed, 21 Jan 2026 18:24:37 +0000 (19:24 +0100)]
jinja: support none|string (#18995)

* jinja: support none|string

* Update common/jinja/value.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update tests/test-jinja.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Add as_string()

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agofix: Use `tabular-nums` for chat message statistics (#18915)
Hendrik Erz [Wed, 21 Jan 2026 17:46:01 +0000 (18:46 +0100)]
fix: Use `tabular-nums` for chat message statistics (#18915)

* fix: Use `tabular-nums` for chat message statistics

* fix: Rebuild WebUI

7 weeks agollama : clarify nemotron-h.cpp comment about RoPE [no ci] (#18997)
Daniel Bevenius [Wed, 21 Jan 2026 17:31:34 +0000 (18:31 +0100)]
llama : clarify nemotron-h.cpp comment about RoPE [no ci] (#18997)

This commit removes the mention of RoPE in the comment for the Q and K
computation as RoPE is not applied.

7 weeks agovulkan: Remove transfer_ctx, do everything in compute_ctx. (#18945)
Jeff Bolz [Wed, 21 Jan 2026 17:01:40 +0000 (11:01 -0600)]
vulkan: Remove transfer_ctx, do everything in compute_ctx. (#18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger

7 weeks agocommon : improve error message when HTTPS is missing but required (#18987)
Adrien Gallouët [Wed, 21 Jan 2026 16:58:38 +0000 (17:58 +0100)]
common : improve error message when HTTPS is missing but required (#18987)

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agoserver: /v1/responses (partial) (#18486)
손희준 [Wed, 21 Jan 2026 16:47:23 +0000 (01:47 +0900)]
server: /v1/responses (partial) (#18486)

* from previous PR

* Make instruction(system) as first message

* Convert [input_message] (text/image/file)

* Rename convert_responses_to_chatcmpl(body) -> response_body

* Initial tool call support

* Erase instructions field from chatcmpl body

* Feed reasoning texts to chat template

* Use std::vector instead of opaque json array

* Make output_item.added events consistent

* Move `server_task_result_cmpl_partial::update` from header to source

* Match ID of output_item.added and .done events

* Add function_call only if there is no "fc_" prefix

* Add function call output at non-streaming API

* Test if ID is persistent

* Add doc

* Fix style - use trailing comma

* Rewrite state management

* catch up with upstream/master

* Fix style - "type" is the first item of SSE data

* Explicitly check "instructions" from response_body

* Make lambdas static

* Check if reasoning content exists

* Add `oai_resp_id` to task_result_state(also initialized at ctor), server_task_result_cmpl_partial, and server_task_result_cmpl_final

* Reject `input_file` since it is not supported by chatcmpl

* Add "fc_" prefix to non-straming function call id as coderabbit pointed out

---------

Co-authored-by: openingnow <>
7 weeks agovulkan: support flash attention GQA/split_k with small batches (#18938)
Jeff Bolz [Wed, 21 Jan 2026 16:43:43 +0000 (10:43 -0600)]
vulkan: support flash attention GQA/split_k with small batches (#18938)

7 weeks agoRevert "vulkan: force full subgroups for flash attention to fix intel subgroup crash...
Masato Nakasaka [Wed, 21 Jan 2026 16:13:43 +0000 (01:13 +0900)]
Revert "vulkan: force full subgroups for flash attention to fix intel subgroup crash (#17356)" (#18831)

This reverts commit 980b7cd17e055c8c587f79ffda7eb4fddf405566.

7 weeks agovulkan: Use mul_mat_vec_id for small values of n (#18918)
Jeff Bolz [Wed, 21 Jan 2026 15:22:02 +0000 (09:22 -0600)]
vulkan: Use mul_mat_vec_id for small values of n (#18918)

Change ggml_vk_mul_mat_vec_id_q_f16 to loop over the batch dimension and
update the indexing calculations in get_offsets.

Mat-vec is faster than mat-mat for small values of n. We don't get the same
reuse of the weights as in the non-ID path, but with this the cost is linear
in n rather than n>1 being far slower than n==1.

7 weeks agomemory : add llama_memory_hybrid_iswa (#18601)
Tarek Dakhran [Wed, 21 Jan 2026 12:30:23 +0000 (13:30 +0100)]
memory : add llama_memory_hybrid_iswa (#18601)

* memory : add llama_memory_hybrid_iswa

* Update src/llama-memory-hybrid-iswa.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoFix GLM 4.7 Lite MoE gating func (#18980)
Piotr Wilkin (ilintar) [Wed, 21 Jan 2026 11:35:20 +0000 (12:35 +0100)]
Fix GLM 4.7 Lite MoE gating func (#18980)

* Fix GLM 4.7 MoE gating func

* Update src/models/deepseek2.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update src/llama-model.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Xuan-Son Nguyen <redacted>
7 weeks agogguf: display strerrno when cant load a model (#18884)
Matthieu Coudron [Wed, 21 Jan 2026 06:52:46 +0000 (07:52 +0100)]
gguf: display strerrno when cant load a model (#18884)

I've had issues loading models with llama-server:
[44039] E gguf_init_from_file: failed to open GGUF file 'mistral-7b-v0.1.Q8_0.gguf'

and I was sure it could access the file. Seems like --models-dir and
--models-presets dont interact like I thought they would but I salvaged
this snippet that helps troubleshooting
[44039] E gguf_init_from_file: failed to open GGUF file 'mistral-7b-v0.1.Q8_0.gguf' (errno No such file or directory)

7 weeks agoCUDA: Fix builds for older CCCL versions by ifdefing strided_iterator (#18964)
Oliver Simons [Wed, 21 Jan 2026 01:34:29 +0000 (02:34 +0100)]
CUDA: Fix builds for older CCCL versions by ifdefing strided_iterator (#18964)

* CUDA: Fix builds for older CCCL versions by ifdefing strided_iterator

Strided iterator was added in [CCCL
3.1](https://github.com/NVIDIA/cccl/releases/tag/v3.1.0), which is packaged into
[CTK
13.1](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id5)

* Unindent as per code review request

7 weeks agocommon, server : use the same User-Agent by default (#18957)
Adrien Gallouët [Tue, 20 Jan 2026 17:28:43 +0000 (18:28 +0100)]
common, server : use the same User-Agent by default (#18957)

This commit also ensures that if a custom User-Agent is used, it will be
the only one sent.

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agocli : fix reasoning responses in CLI (#18961)
Xuan-Son Nguyen [Tue, 20 Jan 2026 17:23:25 +0000 (18:23 +0100)]
cli : fix reasoning responses in CLI (#18961)

* cli : fix reasoning responses in CLI

* fix build

* fix build (2)

7 weeks agoCUDA: Replace init_offsets kernel with iterators in cub-based argsort (#18930)
Oliver Simons [Tue, 20 Jan 2026 12:11:01 +0000 (13:11 +0100)]
CUDA: Replace init_offsets kernel with iterators in cub-based argsort (#18930)

* CUDA: Replace `init_offsets` with iterators in argsort

This is a QOL improvement, saving us the cost of materializing the
iterator

* Remove unnecessary include from top-k.cu

7 weeks agoggml : cleanup path_str() (#18928)
Adrien Gallouët [Tue, 20 Jan 2026 10:42:49 +0000 (11:42 +0100)]
ggml : cleanup path_str() (#18928)

- Remove pragmas as `std::codecvt_utf8` is not used.
- Avoid implicit `strlen()`.

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agometal : enable FA for MLA heads (#18950)
Georgi Gerganov [Tue, 20 Jan 2026 10:21:28 +0000 (12:21 +0200)]
metal : enable FA for MLA heads (#18950)

7 weeks agoconvert : use n_groups instead of hardcoded values in reshape (#18929)
Daniel Bevenius [Tue, 20 Jan 2026 05:55:24 +0000 (06:55 +0100)]
convert : use n_groups instead of hardcoded values in reshape (#18929)

* convert : use n_groups instead of hardcoded values in reshape

This commit modifies the conversion script for NemotronHModel to use
the 'n_groups' hyperparameter, and allow Python to calculate the the
last dimension, using -1, when reshaping the 'mixer.norm.weight' tensor.

* use self.n_group instead of self.hparams["n_groups"]

7 weeks agoserver : refactor oai_parser_opt, move it to server_chat_params (#18937)
Xuan-Son Nguyen [Mon, 19 Jan 2026 22:28:01 +0000 (23:28 +0100)]
server : refactor oai_parser_opt, move it to server_chat_params (#18937)

* server_chat_params

* move chat format into CLI

* use meta whenever possible

* clean up, no more chatml fallback