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

7 weeks agoconvert : support Glm4MoeLite (#18936)
ddh0 [Mon, 19 Jan 2026 22:09:20 +0000 (16:09 -0600)]
convert : support Glm4MoeLite (#18936)

* initial commit for branch

* add glm-4.7-flash, move tokenizer hash

* use `glm4` pretok

* silence flake8 E302 (CI)

* apply review feedback

* add <|user|> as eog

* also add EOG `<|observation|>`

* revert llama-vocab

* inherit vocab from glm4

---------

Co-authored-by: Xuan Son Nguyen <redacted>
7 weeks agojinja : fix undefined keys and attributes and int/float as bool (#18924)
Sigbjørn Skjæret [Mon, 19 Jan 2026 19:29:43 +0000 (20:29 +0100)]
jinja : fix undefined keys and attributes and int/float as bool (#18924)

* fix undefined keys and attributes

* add falsy tests

* as_bool for integers and floats

* more falsy/truthy tests

* --typo

7 weeks agoci : run test-jinja -py on high perf [no ci] (#18916)
Sigbjørn Skjæret [Mon, 19 Jan 2026 19:29:15 +0000 (20:29 +0100)]
ci : run test-jinja -py on high perf [no ci] (#18916)

7 weeks agoserver: fix memory reservations in populate_token_probs (#18787)
Lennart Austenfeld [Mon, 19 Jan 2026 18:13:31 +0000 (19:13 +0100)]
server: fix memory reservations in populate_token_probs (#18787)

7 weeks agoggml : add ggml_build_forward_select (#18550)
Georgi Gerganov [Mon, 19 Jan 2026 18:03:19 +0000 (20:03 +0200)]
ggml : add ggml_build_forward_select (#18550)

* ggml : add ggml_build_forward_select

* cuda : adapt CUDA graph compat to new feature

* vulkan : update logic to handle command buffer closing

* ggml : check compute for fusion

* ggml : add comment

7 weeks agomodel-conversion : add BUILD_DIR variable to run-converted-model scripts (#18927)
Daniel Bevenius [Mon, 19 Jan 2026 12:12:38 +0000 (13:12 +0100)]
model-conversion : add BUILD_DIR variable to run-converted-model scripts (#18927)

This commit adds a BUILD_DIR variable to the scripts used for running
converted models.

The motivation for this is that currently the `build` directory is
hardcoded and it can be useful to specify a different build directory,
with builds for different configurations.

7 weeks agollama : Extend fallback, fix fileno for dio file, exclude case that mmap uses dio...
Julius Tischbein [Sun, 18 Jan 2026 16:35:57 +0000 (17:35 +0100)]
llama : Extend fallback, fix fileno for dio file, exclude case that mmap uses dio file (#18887)

7 weeks agodocs: add linux to index (#18907)
Francisco Herrera [Sun, 18 Jan 2026 10:03:35 +0000 (05:03 -0500)]
docs: add linux to index (#18907)

7 weeks agotests : add test-jinja -py option for cross-checking (#18906)
Xuan-Son Nguyen [Sun, 18 Jan 2026 07:14:27 +0000 (08:14 +0100)]
tests : add test-jinja -py option for cross-checking (#18906)

* tests : add test-jinja -py option or cross-checking

* Update tests/test-jinja.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* fix + add source

* SandboxedEnvironment

* fix array.map case

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agojinja : fix object item order (and properly implement dictsort) (#18904)
Sigbjørn Skjæret [Sun, 18 Jan 2026 02:40:06 +0000 (03:40 +0100)]
jinja : fix object item order (and properly implement dictsort) (#18904)

* fix object item order

* as_ordered_object

* copy whole object

7 weeks agojinja : attribute support for join, map and sort (#18883)
Sigbjørn Skjæret [Sun, 18 Jan 2026 01:53:01 +0000 (02:53 +0100)]
jinja : attribute support for join, map and sort (#18883)

* support negative array index and default value

* attribute support (int and str) for join, map and sort

* add tests

* update CODEOWNERS

* improve fixme sorting comment

7 weeks agojinja : add missing tojson filter for bool (#18900)
Sigbjørn Skjæret [Sun, 18 Jan 2026 00:05:09 +0000 (01:05 +0100)]
jinja : add missing tojson filter for bool (#18900)

* add missing tojson for bool

* add more literal tests

7 weeks agojinja : fix lexing of float literals with sign (#18901)
Sigbjørn Skjæret [Sat, 17 Jan 2026 23:57:51 +0000 (00:57 +0100)]
jinja : fix lexing of float literals with sign (#18901)

* fix lexing of float literals with sign

* add test

* consume_numeric

7 weeks agojinja: correct member access rule (#18905)
Xuan-Son Nguyen [Sat, 17 Jan 2026 23:48:55 +0000 (00:48 +0100)]
jinja: correct member access rule (#18905)

7 weeks agoopencl: fix q6_K mv for m=1 (#18893)
lhez [Sat, 17 Jan 2026 21:50:32 +0000 (13:50 -0800)]
opencl: fix q6_K mv for m=1 (#18893)

7 weeks agoci : add label for jinja changes (#18903)
Sigbjørn Skjæret [Sat, 17 Jan 2026 20:52:02 +0000 (21:52 +0100)]
ci : add label for jinja changes (#18903)

7 weeks agokv-cache : optimize KQ mask construction (#18842)
Georgi Gerganov [Sat, 17 Jan 2026 13:42:42 +0000 (15:42 +0200)]
kv-cache : optimize KQ mask construction (#18842)

* kv-cache : optimize KQ mask construction

* cont : add explanation + improve

* cont : fix

7 weeks agoggml webgpu: support for backend sampling (#18880)
Reese Levine [Sat, 17 Jan 2026 00:12:43 +0000 (16:12 -0800)]
ggml webgpu: support for backend sampling (#18880)

* 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

* Add argmax

* Add argmax,cumsum,sum,sum_rows

* Add necessary CPY/GET_ROWS operators

* Support for argsort using multi-pass strategy

* Update set_rows for i32 indices, move to pre-wgsl

* Port unary operators to pre-wgsl and support FILL

* Implement PAD

* Add support for top-k

* clean up, scope pipeline init mutex

* fix newline

* Add support for log

* Update LOG for better precision, and ops doc

---------

Co-authored-by: Abhijit Ramesh <redacted>
7 weeks agoggml : extend ggml_pool_1d + metal (#16429)
Thore Koritzius [Fri, 16 Jan 2026 14:59:56 +0000 (15:59 +0100)]
ggml : extend ggml_pool_1d + metal (#16429)

* chore: resolve conflicts

* feat: ggml metal impl

* fix: ggml_metal_kargs_pool_1d struct

* fix: require contiguous input

* chore: test pool_1d

* chore: limit pool1d test cases to p0=0 and s0=k0 to conform with asserts

* chore: add p0 and s0 to testing

* fix: allow padding for cpu and metal

* Update ggml/src/ggml-metal/ggml-metal.metal

* fix: correct single-threaded loop

* ggml : cleanup

* tests : add ne[1] != 1 tests

* fix: ne[1] handling in np

* cont : fixes

---------

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agodocs : update ops.md for CANN backend (#18654)
hipudding [Fri, 16 Jan 2026 12:32:17 +0000 (20:32 +0800)]
docs : update ops.md for CANN backend (#18654)

7 weeks agoggml-blas: hide warnings from included BLAS headers (#18818)
Perry Naseck [Fri, 16 Jan 2026 11:38:25 +0000 (06:38 -0500)]
ggml-blas: hide warnings from included BLAS headers (#18818)

* fix compile def openblas, blis for compat libs, nvpl compile def, warn if no blas vendor set

* ggml-blas: hide warnings from included BLAS headers

7 weeks agomtmd : Fix ASR for LFM2.5-Audio-1.5B (#18876)
Tarek Dakhran [Fri, 16 Jan 2026 10:23:08 +0000 (11:23 +0100)]
mtmd : Fix ASR for LFM2.5-Audio-1.5B (#18876)

7 weeks agocommon : implement new jinja template engine (#18462)
Xuan-Son Nguyen [Fri, 16 Jan 2026 10:22:06 +0000 (11:22 +0100)]
common : implement new jinja template engine (#18462)

* jinja vm

* lexer

* add vm types

* demo

* clean up

* parser ok

* binary_expression::execute

* shadow naming

* bin ops works!

* fix map object

* add string builtins

* add more builtins

* wip

* use mk_val

* eval with is_user_input

* render gemma tmpl ok

* track input string even after transformations

* support binded functions

* keyword arguments and slicing array

* use shared_ptr for values

* add mk_stmt

* allow print source on exception

* fix negate test

* testing more templates

* mostly works

* add filter_statement

* allow func to access ctx

* add jinja-value.cpp

* impl global_from_json

* a lot of fixes

* more tests

* more fix, more tests

* more fixes

* rm workarounds

* demo: type inferrence

* add placeholder for tojson

* improve function args handling

* rm type inference

* no more std::regex

* trailing spaces

* make testing more flexible

* make output a bit cleaner

* (wip) redirect minja calls

* test: add --output

* fix crash on macro kwargs

* add minimal caps system

* add some workarounds

* rm caps_apply_workarounds

* get rid of preprocessing

* more fixes

* fix test-chat-template

* move test-chat-jinja into test-chat-template

* rm test-chat-jinja from cmake

* test-chat-template: use common

* fix build

* fix build (2)

* rename vm --> interpreter

* improve error reporting

* correct lstrip behavior

* add tojson

* more fixes

* disable tests for COMMON_CHAT_FORMAT_GENERIC

* make sure tojson output correct order

* add object.length

* fully functional selectattr / rejectattr

* improve error reporting

* more builtins added, more fixes

* create jinja rendering tests

* fix testing.h path

* adjust whitespace rules

* more fixes

* temporary disable test for ibm-granite

* r/lstrip behavior matched with hf.js

* minimax, glm4.5 ok

* add append and pop

* kimi-k2 ok

* test-chat passed

* fix lstrip_block

* add more jinja tests

* cast to unsigned char

* allow dict key to be numeric

* nemotron: rm windows newline

* tests ok

* fix test

* rename interpreter --> runtime

* fix build

* add more checks

* bring back generic format support

* fix Apertus

* [json.exception.out_of_range.403] key 'content' not found

* rm generic test

* refactor input marking

* add docs

* fix windows build

* clarify error message

* improved tests

* split/rsplit with maxsplit

* non-inverse maxsplit

forgot to change after simplifying

* implement separators for tojson and fix indent

* i like to move it move it

* rename null -- > none

* token::eof

* some nits + comments

* add exception classes for lexer and parser

* null -> none

* rename global -> env

* rm minja

* update docs

* docs: add input marking caveats

* imlement missing jinja-tests functions

* oops

* support trim filter with args, remove bogus to_json reference

* numerous argument fixes

* updated tests

* implement optional strip chars parameter

* use new chars parameter

* float filter also has default

* always leave at least one decimal in float string

* jinja : static analysis + header cleanup + minor fixes

* add fuzz test

* add string.cpp

* fix chat_template_kwargs

* nits

* fix build

* revert

* unrevert

sorry :)

* add fuzz func_args, refactor to be safer

* fix array.map()

* loosen ensure_vals max count condition, add not impl for map(int)

* hopefully fix windows

* check if empty first

* normalize newlines

---------

Co-authored-by: Alde Rojas <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoSetting mmap and direct_io to false as default in llama-bench.cpp (#18841)
Julius Tischbein [Fri, 16 Jan 2026 08:46:51 +0000 (09:46 +0100)]
Setting mmap and direct_io to false as default in llama-bench.cpp (#18841)

7 weeks agoCANN: Remove unused `ggml_cann_get_device` function (#18625)
Raul Torres [Fri, 16 Jan 2026 08:34:09 +0000 (08:34 +0000)]
CANN: Remove unused `ggml_cann_get_device` function (#18625)

7 weeks agoCANN: fix an issue where get_env was not fully renamed (#18796)
Chenguang Li [Fri, 16 Jan 2026 08:24:04 +0000 (16:24 +0800)]
CANN: fix an issue where get_env was not fully renamed (#18796)

* CANN: fix an issue where get_env was not fully renamed

* ci: add cann with acl group

* ci: define use_acl_graph using GitHub Action

* ci: update cann dockerfile with acl graph

7 weeks agoCANN: support gated linear attn (#18653)
hipudding [Fri, 16 Jan 2026 08:18:49 +0000 (16:18 +0800)]
CANN: support gated linear attn (#18653)

* CANN: support gated linear attn

This change adds support for the GGML_OP_GATED_LINEAR_ATTN operator.
The feature was implemented by YushengZhao. Because the previous
submission was based on an outdated codebase, this PR was rebased to
merge.

Co-authored-by: YushengZhao <redacted>
Co-authored-by: hipudding <redacted>
* CANN: optimize OP gla

Optimize gla for high preformance

* Remove unused comments

---------

Co-authored-by: 赵禹昇 <redacted>
Co-authored-by: YushengZhao <redacted>
7 weeks agoOpenCL: add SOLVE_TRI op support (#18846)
shaofeiqi [Thu, 15 Jan 2026 19:17:17 +0000 (11:17 -0800)]
OpenCL: add SOLVE_TRI op support (#18846)

7 weeks agocuda : print less debug logs when disabling cuda graphs (#18868)
Georgi Gerganov [Thu, 15 Jan 2026 18:53:01 +0000 (20:53 +0200)]
cuda : print less debug logs when disabling cuda graphs (#18868)

7 weeks agocontext : do not reserve scheduler for warmups (#18867)
Georgi Gerganov [Thu, 15 Jan 2026 17:35:57 +0000 (19:35 +0200)]
context : do not reserve scheduler for warmups (#18867)

7 weeks agollama : add adaptive-p sampler (#17927)
ddh0 [Thu, 15 Jan 2026 17:16:29 +0000 (11:16 -0600)]
llama : add adaptive-p sampler (#17927)

* initial commit for branch

* simplify constants

* add params to `struct common_params_sampling`, add reference to PR

* explicitly clamp `min_target` and `max_target` to `[0.0, 1.0]`

* add args, rename `queue_size` -> `window_size`

* improved comments

* minor

* remove old unused code from algorithm

* minor

* add power law case to `common_sampler_init`, add sampler name mappings

* clarify behaviour when `window_size = 0`

* add missing enums

* remove `target_range` param, make `target == 1` no-op, cleanup code

* oops, straggler

* add missing parameters in `server-task.cpp`

* copy from author

ref:
https://gist.github.com/MrJackSpade/9be99c7efbba7b95a41377e123b7b069

* remove old debug log, style nit

* fix compiler warning, add commented-out logging per token

* re-write + change parameters + simplify

* oops forgot args.cpp

* fix leftover `window_size`

* add missing values to `common_params_sampling::print()`

* with logging

* does this fix it?

* no, but does this?

* update default decay

* optimize

* fix bad merge

my git skills are lacking

* silence `missing initializer for member`

* update default decay to 0.9

* fix logging

* format (double)

* add power law to the new `samplers` vector

* log sampler init values

* improve logging messages in llama_sampler_power_law

* remove extraneous logging

* simplify target computation

last commit with debug logging!

* remove debug logging, explicitly clamp params at init

* add `use_power_law` flag + logic, minor cleanup

* update `power-law` -> `adaptive-p`

* fix cold start EMA

- `ctx->weighted_sum` is now initialized and reset to `target / (1.0f -
clamped_decay)`
- `ctx->total_weight` is now initialized and reset to `1.0f / (1.0f -
clamped_decay)`

this fixes a "cold start" problem with the moving average

* update `SHARPNESS` constant to `10.0f`

* minor style fixes

no functional changes

* minor style fixes cont.

* update `llama_sampler_adaptive_p_i` for backend sampling (ref: #17004)

* separate into `apply` + `accept` functions

* `pending_token_idx`: switch from `llama_token` to `int32`

functionally identical (`llama.h` has `typedef int32_t llama_token;`),
but its more correct now

* don't transform logits <= -1e9f

* fix masking in backend top-p, min-p

* address review comments

* typo in comments `RND` -> `RNG`

* add docs

* add recommended values in completion docs

* address PR feedback

* remove trailing whitespace (for CI `editorconfig`)

* add to adaptive-p to `common_sampler_types_from_chars`

7 weeks agoserver: improve slots scheduling for n_cmpl (#18789)
Xuan-Son Nguyen [Thu, 15 Jan 2026 16:10:28 +0000 (17:10 +0100)]
server: improve slots scheduling for n_cmpl (#18789)

* server : make sure children tasks are scheduled to launch with parent

* fix

* add comment pointing to this PR

* fix

* clean up

* more debug messages

* add pop_deferred_task with specific ID version

* improve the logic

* simple approach

* no double move

* correct return type of launch_slots_with_parent_task

7 weeks agocontext : reserve new scheduler when graph topology changes (#18547)
Georgi Gerganov [Thu, 15 Jan 2026 14:39:17 +0000 (16:39 +0200)]
context : reserve new scheduler when graph topology changes (#18547)

* context : reserve new scheduler when graph topology changes

* cont : fix

* cont : fix reserve

* cont : reserve only when changes occur + timing

* context : add comments

* llama : reserve on sampler changes

* common : allow null common_sampler

* server : task declares needs (embd, logits, sampling)

* server : do not init sampler if not needed

* llama : fix need_reserve when unsetting a sampler

* server : consolidate slot reset/clear logic

7 weeks agoCUDA: fix allignment on register spill for FA (#18815)
Johannes Gäßler [Thu, 15 Jan 2026 14:14:50 +0000 (15:14 +0100)]
CUDA: fix allignment on register spill for FA (#18815)

7 weeks agoggml-cpu: optimize ggml_vec_dot_bf16 for Power9 (#18837)
shalinib-ibm [Thu, 15 Jan 2026 09:31:18 +0000 (15:01 +0530)]
ggml-cpu: optimize ggml_vec_dot_bf16 for Power9 (#18837)

7 weeks agolora: make sure model keep track of associated adapters (#18490)
Xuan-Son Nguyen [Thu, 15 Jan 2026 09:24:28 +0000 (10:24 +0100)]
lora: make sure model keep track of associated adapters (#18490)

* lora: make sure model keep track of associated adapters

* deprecate llama_adapter_lora_free

* minor : std::unordered_set over std::set

---------

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agomodel-loader : support bool array sliding window pattern (#18850)
Sigbjørn Skjæret [Thu, 15 Jan 2026 09:12:46 +0000 (10:12 +0100)]
model-loader : support bool array sliding window pattern (#18850)

7 weeks agotests : download models only when running ctest (#18843)
Adrien Gallouët [Thu, 15 Jan 2026 08:47:29 +0000 (09:47 +0100)]
tests : download models only when running ctest (#18843)

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agohexagon: support for OP_CPY, host buffers now optional, hvx-utils refactoring and...
Max Krasnyansky [Thu, 15 Jan 2026 05:46:12 +0000 (21:46 -0800)]
hexagon: support for OP_CPY, host buffers now optional, hvx-utils refactoring and optimizations   (#18822)

* hexagon: disable repack buffers if host buffers are disabled, improved handling of env vars

* hexagon: add support for OP_CPY fp16/fp32 -> fp16/fp32

Factore out all hvx_copy functions into hvx-copy.h header and reduced code duplication.
Update HTP ops infra to support OP_CPY

* hexagon: cleanup and refactor hex/hvx/htp headers and helper libs

hex is basically all scalar/core platform stuff (L2, DMA, basic utils)
hvx is all hvx related utils, helpers, etc
htp is higher level stuff like Ops, etc

hvx-utils library got a nice round of cleanup and refactoring to reduce duplication

use hvx_vec_store_a where possible

* hexagon: refactor HVX sigmoid functions to hvx-sigmoid.h

Moved sigmoid and tanh vector functions from hvx-utils.h to a new header
hvx-sigmoid.h. Implemented aligned and unaligned variants for sigmoid
array processing using a macro pattern similar to hvx-copy.h. Updated
act-ops.c to use the new aligned variant hvx_sigmoid_f32_aa. Removed
unused hvx-sigmoid.c.

* hexagon: factor out hvx-sqrt.h

* hexagon: mintor update to hvx-utils.h

* hexagon: remove spurios log

* hexagon: factor out and optimize hvx_add/sub/mul

* hexagon: remove _opt variants of add/sub/mul as they simply fully aligned versions

* hexagon: refactor reduction functions to hvx-reduce.h

Moved `hvx_self_max_f32` and `hvx_self_sum_f32` from `hvx-utils.h`/`.c` to `hvx-reduce.h`.
Renamed them to `hvx_reduce_max_f32` and `hvx_reduce_sum_f32`.
Added aligned (`_a`) and unaligned (`_u`) variants and used macros to unify logic.
Updated `softmax-ops.c` to use the new functions.

* hexagon: refactor the rest of arithmetic functions to hvx-arith.h

Moved `hvx_sum_of_squares_f32`, `hvx_min_scalar_f32`, and `hvx_clamp_scalar_f32` from `hvx-utils.c/h` to `hvx-arith.h`. Implemented aligned/unaligned variants (`_aa`, `_au`, etc.) and used macros to reduce code duplication. Updated `hvx_min_scalar_f32` and `hvx_clamp_scalar_f32` to use `dst, src, ..., n` argument order. Updated call sites in `act-ops.c`.

Refactor Hexagon HVX arithmetic functions (min, clamp) to hvx-arith.h

Moved `hvx_min_scalar_f32` and `hvx_clamp_scalar_f32` from `hvx-utils.c/h` to `hvx-arith.h`. Implemented aligned/unaligned variants (`_aa`, `_au`, etc.) and used macros to reduce code duplication. Updated these functions to use `dst, src, ..., n` argument order and updated call sites in `act-ops.c`. `hvx_sum_of_squares_f32` remains in `hvx-utils.c` as requested.

* hexagon: refactor hvx_sum_of_squares_f32

- Modify `hvx_sum_of_squares_f32` in `ggml/src/ggml-hexagon/htp/hvx-reduce.h` to use `dst, src` signature.
- Implement `_a` (aligned) and `_u` (unaligned) variants for `hvx_sum_of_squares_f32`.
- Update `hvx_reduce_loop_body` macro to support both returning and storing results via `finalize_op`.
- Update existing reduction functions in `hvx-reduce.h` to use the updated macro.
- Update `rms_norm_htp_f32` in `ggml/src/ggml-hexagon/htp/unary-ops.c` to match the new signature.

* hexagon: use hvx_splat instead of memset

* hexagon: consistent use of f32/f16 in all function names to match the rest of GGML

* hexagon: fix hvx_copy_f16_f32 on v75 and older

* hexagon: update readme to include GGML_HEXAGON_EXPERIMENTAL

* scripts: update snapdragon/adb scripts to enable host param

8 weeks agoCUDA: Factor out and re-use `block_reduce` function (#18785)
Oliver Simons [Thu, 15 Jan 2026 02:44:54 +0000 (03:44 +0100)]
CUDA: Factor out and re-use `block_reduce` function (#18785)

* CUDA: Refactor and expose two_stage_warp_reduce_* function

* Use `two_stage_warp_reduce` also in softmax kernel, move smem out of it

Moving smem out of `__device__` function to `__global__` function
allows for explicit smem reuse, as either compiler or cuda rt seem to not
free it afterwards (`cudaFuncSetAttribute` fails when not accounting for
it once for each call to two_stage_warp_reduce)

* Update ggml/src/ggml-cuda/common.cuh

Co-authored-by: Aman Gupta <redacted>
* Use two_stage_warp_reduce in group_norm_f32

* Use two_stage_warp_reduce in rms_norm_f32

* Fix smem calculation which expects bytes

* Make `two_stage_warp_reduce` accept all values warp_reduce accepts

Also integrate it into norm_f32 function

* Use two_stage_warp_reduce in l2_norm_f32

* Use type traits for block reduction for better legibility

Also adresss other requests by @am17an such as variable renaming

* Make norm tests cover all cuda paths

* Mark columns % WARP_SIZE !=0 as supported for RMS_NORM_BACK

Unit-tests passed locally, let's see if they pass in the CI as well

* Use `enum class` for `block_reduce_method`

This is more type-safe than plain enum

* Rename variables as suggested in code review by @am17an

* Rename two_stage_warp_reduce -> block_reduce

* Fix trailing whitespace in common.cuh

* Make condition of static_assert type-dependent

This delays evaluation until the template is actually instantiated.
Otherwise, some compilers may evaluate the assert when parsing the
template, resulting in build errors as observed here:

https://github.com/ggml-org/llama.cpp/actions/runs/20960323123/job/60235530068?pr=18785

* Inline definitions

---------

Co-authored-by: Aman Gupta <redacted>
8 weeks agoRestore clip's cb() to its rightful glory - extract common debugging elements in...
Piotr Wilkin (ilintar) [Wed, 14 Jan 2026 19:29:35 +0000 (20:29 +0100)]
Restore clip's cb() to its rightful glory - extract common debugging elements in llama (#17914)

* Extract common debugging functions; plug eval-callback and mtmd's MTMD_DEBUG_GRAPH with same functionality

* Move to common

* Remove unneeded header

* Unlink from common

* chore: update webui build output

* Cleanup; properly pass params to mtmd without depending on common; factorize debug.cpp to use common debug code.

* Revert change to webapp

* Post-merge adjust

* Apply suggestions from code review

Co-authored-by: Xuan-Son Nguyen <redacted>
* Apply code review changes

* Remove changes to server-context

* Remove mtmd.h include

* Remove utility functions from header

* Apply suggestions from code review

Co-authored-by: Xuan-Son Nguyen <redacted>
* Rename functions

* Update tools/mtmd/clip.cpp

Co-authored-by: Xuan-Son Nguyen <redacted>
* Update tools/mtmd/clip.cpp

Co-authored-by: Xuan-Son Nguyen <redacted>
* Update tools/mtmd/clip.cpp

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

Co-authored-by: Xuan-Son Nguyen <redacted>
8 weeks agomodel : clean up and fix EXAONE-MoE configuration (#18840)
Junwon Hwang [Wed, 14 Jan 2026 18:38:21 +0000 (03:38 +0900)]
model : clean up and fix EXAONE-MoE configuration (#18840)

* Fix mismatch of EXAONE-MoE configuration

* ensure gating func is set, cleanup

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
8 weeks agorefactor : remove libcurl, use OpenSSL when available (#18828)
Adrien Gallouët [Wed, 14 Jan 2026 17:02:47 +0000 (18:02 +0100)]
refactor : remove libcurl, use OpenSSL when available (#18828)

8 weeks agovulkan: Check maxStorageBufferRange in supports_op (#18709)
Jeff Bolz [Wed, 14 Jan 2026 09:59:05 +0000 (03:59 -0600)]
vulkan: Check maxStorageBufferRange in supports_op (#18709)

* vulkan: Check maxStorageBufferRange in supports_op

* skip maxStorageBufferRange check when shader64BitIndexing is enabled

8 weeks agollama-model: fix unfortunate typo (#18832)
Aman Gupta [Wed, 14 Jan 2026 09:55:15 +0000 (17:55 +0800)]
llama-model: fix unfortunate typo (#18832)

8 weeks agoCUDA : fix typo in clang pragma comment [no ci] (#18830)
Daniel Bevenius [Wed, 14 Jan 2026 09:31:49 +0000 (10:31 +0100)]
CUDA : fix typo in clang pragma comment [no ci] (#18830)

8 weeks agovulkan: work around Intel fp16 bug in mmq (#18814)
Ruben Ortlam [Wed, 14 Jan 2026 08:41:23 +0000 (09:41 +0100)]
vulkan: work around Intel fp16 bug in mmq (#18814)

8 weeks agoggml-metal: do not copy headers for embedded, use current binary dir for embedded...
Perry Naseck [Wed, 14 Jan 2026 07:22:25 +0000 (02:22 -0500)]
ggml-metal: do not copy headers for embedded, use current binary dir for embedded (#18705)

8 weeks agommap: add Haiku support by skipping RLIMIT_MEMLOCK check (#18819)
Daniel Benjaminsson [Wed, 14 Jan 2026 07:11:05 +0000 (08:11 +0100)]
mmap: add Haiku support by skipping RLIMIT_MEMLOCK check (#18819)

Haiku OS does not support RLIMIT_MEMLOCK, similar to visionOS/tvOS.
Skip the resource limit check on Haiku to allow mlock functionality
to work without compile errors.

Tested on Haiku with NVIDIA RTX 3080 Ti using Vulkan backend.

8 weeks agoci, tests : use cmake to download models and remove libcurl dependency (#18791)
Adrien Gallouët [Wed, 14 Jan 2026 06:46:27 +0000 (07:46 +0100)]
ci, tests : use cmake to download models and remove libcurl dependency (#18791)

* ci, tests : use cmake to download models and remove libcurl dependency
* llama_dl_model -> llama_download_model
* use EXPECTED_HASH for robust model downloading
* Move llama_download_model to cmake/common.cmake

Signed-off-by: Adrien Gallouët <redacted>
8 weeks agollama : print_info alignment fix (#18708)
ddh0 [Tue, 13 Jan 2026 23:05:11 +0000 (17:05 -0600)]
llama : print_info alignment fix (#18708)

* fix text spacing in print_info

* align all

8 weeks agomodel : add EXAONE MoE (#18543)
Junwon Hwang [Tue, 13 Jan 2026 22:28:38 +0000 (07:28 +0900)]
model : add EXAONE MoE (#18543)

* Add EXAONE MoE implementations

Co-authored-by: Junwon Hwang <redacted>
* Address PR feedback

* Address PR feedback

* [WIP] Add MTP for EXAONE-MoE

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

---------

Co-authored-by: LG-AI-EXAONE <redacted>
8 weeks agovocab : fix attribute overrides for harmony (#18806)
Georgi Gerganov [Tue, 13 Jan 2026 15:40:13 +0000 (17:40 +0200)]
vocab : fix attribute overrides for harmony (#18806)

* vocab : fix attribute overrides for harmony

* cont : add warning log

8 weeks agollama-mmap: fix direct-io loading fallback EOF exception (#18801)
Ruben Ortlam [Tue, 13 Jan 2026 14:57:07 +0000 (15:57 +0100)]
llama-mmap: fix direct-io loading fallback EOF exception (#18801)

8 weeks agomodel-conversion : remove -c 0 from model card template [no ci] (#18807)
Daniel Bevenius [Tue, 13 Jan 2026 13:13:10 +0000 (14:13 +0100)]
model-conversion : remove -c 0 from model card template [no ci] (#18807)

This commit removes the `-c, --ctx-size N` from the llama-server
command in the model card template for causal models.

The motivation for this is that -c 0 is the default and specifying it
is redundant.

8 weeks agoHIP: add fattn-mma-f16 for RDNA4 (#18481)
yulo [Tue, 13 Jan 2026 12:52:16 +0000 (20:52 +0800)]
HIP: add fattn-mma-f16 for RDNA4 (#18481)

* finish VQ mma

* flash_attn_ext_f16_iter

* KQ_rowsum

* correct exp

* fix scale error

* fix softmax scale

* fix softmax scale

* enable fattn on cpu side

* fix random error

* disable fattn-mma-f16 on rdna3

* fix wrong col for rdna

* use identity mat to transpose

* resolve conflicts

* basic tuning for DeepSeek-R1-Distill-Qwen-1.5B

* fix volta compile error

* align rdna4 policy for fattn

* adjust fattn policy

* adjust kernel selection logic

* update as the review comments

* keep fattn-wmma logic

* adjust kernel selection logic

---------

Co-authored-by: zhang hui <redacted>
Co-authored-by: Johannes Gäßler <redacted>
8 weeks agodoc: ban AI-generated PR descriptions [no ci] (#18765)
Johannes Gäßler [Tue, 13 Jan 2026 12:43:12 +0000 (13:43 +0100)]
doc: ban AI-generated PR descriptions [no ci] (#18765)

8 weeks agomtmd: fix use_non_causal being reported incorrectly (#18793) upstream/0.0.7721
Xuan-Son Nguyen [Tue, 13 Jan 2026 11:19:38 +0000 (12:19 +0100)]
mtmd: fix use_non_causal being reported incorrectly (#18793)

* mtmd: fix use_non_causal being reported incorrectly

* move clip_is_mrope to mtmd_decode_use_mrope

* fix sloppy code ggml_cpy

8 weeks agoCUDA : fix unused argument when USE_CUDA_GRAPH=OFF (#18800)
Georgi Gerganov [Tue, 13 Jan 2026 10:25:53 +0000 (12:25 +0200)]
CUDA : fix unused argument when USE_CUDA_GRAPH=OFF (#18800)

8 weeks agograph : clean up t5 input builders (#18795)
Gabe Goodhart [Tue, 13 Jan 2026 08:43:51 +0000 (01:43 -0700)]
graph : clean up t5 input builders (#18795)

* fix: Remove unnecessary `h` loops where `h` was only ever 0

Branch: CleanUpT5InputBuilders

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove unnecessary padding loop that is never hit anymore

The upper bound used to use GGML_PAD(n_tokens, GGML_KQ_MASK_PAD), but was
removed in https://github.com/ggml-org/llama.cpp/pull/17910 leaving the
loop dead.

Branch: CleanUpT5InputBuilders

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

Signed-off-by: Gabe Goodhart <redacted>
8 weeks agollama-bench: add direct_io parameter (#18778)
Ruben Ortlam [Tue, 13 Jan 2026 07:49:10 +0000 (08:49 +0100)]
llama-bench: add direct_io parameter (#18778)

8 weeks agoci : remove libcurl in releases (#18775)
Adrien Gallouët [Mon, 12 Jan 2026 20:43:02 +0000 (21:43 +0100)]
ci : remove libcurl in releases (#18775)

Signed-off-by: Adrien Gallouët <redacted>
8 weeks agoserver : add arg for disabling prompt caching (#18776)
Radoslav Gerganov [Mon, 12 Jan 2026 17:21:34 +0000 (19:21 +0200)]
server : add arg for disabling prompt caching (#18776)

* server : add arg for disabling prompt caching

Disabling prompt caching is useful for clients who are restricted to
sending only OpenAI-compat requests and want deterministic
responses.

* address review comments

* address review comments

8 weeks agoci : use openssl for openEuler-latest-cmake-cann (#18779)
Adrien Gallouët [Mon, 12 Jan 2026 16:29:00 +0000 (17:29 +0100)]
ci : use openssl for openEuler-latest-cmake-cann (#18779)

Signed-off-by: Adrien Gallouët <redacted>
8 weeks agovendor : update cpp-httplib to 0.30.1 (#18771)
Adrien Gallouët [Mon, 12 Jan 2026 14:58:52 +0000 (15:58 +0100)]
vendor : update cpp-httplib to 0.30.1 (#18771)

Signed-off-by: Adrien Gallouët <redacted>
8 weeks agoexamples : add --kv-unified to batched example (#18774)
Daniel Bevenius [Mon, 12 Jan 2026 12:47:58 +0000 (13:47 +0100)]
examples : add --kv-unified to batched example (#18774)

This commit adds the --kv-unified flag to the batched example. This flag
is currently specified in the README.md as required, but is currently
not available as a command line option for the batched example.

The motivation for this is that specifying this flag as the README
instructs, will lead to an error about the flag not being recognized,
and without this option the example fail with the following error:
```console
split_equal: sequential split is not supported when there are coupled
sequences in the input batch (you may need to use the -kvu flag)
decode: failed to find a memory slot for batch of size 4
main: llama_decode() failed
```

8 weeks agovulkan: change memory_logger to be controlled by an env var (#18769)
Jeff Bolz [Mon, 12 Jan 2026 12:32:55 +0000 (06:32 -0600)]
vulkan: change memory_logger to be controlled by an env var (#18769)

8 weeks agoserver: update docs for sleeping [no ci] (#18777)
Xuan-Son Nguyen [Mon, 12 Jan 2026 12:01:24 +0000 (13:01 +0100)]
server: update docs for sleeping [no ci] (#18777)

8 weeks agovulkan: Use VK_EXT_shader_64bit_indexing to handle large mat_mul(_id) (#18678)
Jeff Bolz [Mon, 12 Jan 2026 11:32:13 +0000 (05:32 -0600)]
vulkan: Use VK_EXT_shader_64bit_indexing to handle large mat_mul(_id) (#18678)

This fixes incoherent output in Llama-4-Maverick-17B-128E-PAB-Q8_0, which
has a mul_mat_id with an A matrix that's Q8_0 8192 x 5120 x 128.

This should work when the number of blocks in the A matrix is less than 2^32
(for mul_mat_vec or mul_mm_cm2), or for mul_mm I think the limit is like
2^32*LOAD_VEC_A elements.

- Divide batch_stride by QUANT_K earlier, so the block index calculation works in 32b.
- Each vk_pipeline_struct has a linked list of pipelines that will allow it to handle
variants. So far this change just adds a single use case for this, compiling with the
e64BitIndexingEXT flag.
- Use the 64b indexing variant when the A matrix is larger than maxStorageBufferRange.

64-bit indexing has some cost - around 3-5% in MoE models, so it's worth the effort
to avoid enabling it unconditionally.

8 weeks agovulkan: Disable large coopmat matmul configuration on proprietary AMD driver (#18763)
Ruben Ortlam [Mon, 12 Jan 2026 06:29:35 +0000 (07:29 +0100)]
vulkan: Disable large coopmat matmul configuration on proprietary AMD driver (#18763)

* vulkan: Disable large coopmat matmul configuration on proprietary AMD driver

* Also disable the large tile size

8 weeks agomodel: fix qwen3next broken due to #18683 (#18762)
Xuan-Son Nguyen [Sun, 11 Jan 2026 20:00:10 +0000 (21:00 +0100)]
model: fix qwen3next broken due to #18683 (#18762)

8 weeks agoVulkan: Optimize Matmul parameters for AMD GPUs with Coopmat support (#18749)
Ruben Ortlam [Sun, 11 Jan 2026 16:33:33 +0000 (17:33 +0100)]
Vulkan: Optimize Matmul parameters for AMD GPUs with Coopmat support (#18749)

* vulkan: Enable and optimize large matmul parameter combination for AMD

* limit tuning to AMD GPUs with coopmat support

* use tx_m values instead of _l

8 weeks agosecurity: make it clear about subtopics in server (#18754)
Xuan-Son Nguyen [Sun, 11 Jan 2026 15:51:03 +0000 (16:51 +0100)]
security: make it clear about subtopics in server (#18754)

* security: make it clear about subtopics in server

* exclude DoS

8 weeks agodebug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check (#18692)
Daniel Bevenius [Sun, 11 Jan 2026 15:34:41 +0000 (16:34 +0100)]
debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check (#18692)

* debug : include LLAMA_POOLING_TYPE_UNSPECIFIED in pooling check

This commit updates the pooling check in the debug example to
also include LLAMA_POOLING_TYPE_UNSPECIFIED and not just
LLAMA_POOLING_TYPE_NONE.

* debug : normalize both pooled and token embeddings

This commit updates debug.cpp to normalize embeddings for both pooled
and non-pooled outputs. For pooled embeddings, normalization is applied
to the single vector, and for non-pooled embeddings, normalization is
applied to each token embedding vector individually.

The motivation for this is to enable non-pooled embeddings to be
normalized which was not possible previously.

8 weeks agotests : refactor test-backend-sampler (#18753)
Georgi Gerganov [Sun, 11 Jan 2026 15:31:03 +0000 (17:31 +0200)]
tests : refactor test-backend-sampler (#18753)

* tests : use "auto", use std::string

* tests : refactor test-backend-sampler.cpp

* cmake : remove redundant declarations

* ci : use smaller model

* tests : add struct test_params

* tests : reduce logit bias 100.0f -> 10.0f

8 weeks agomodel: try to improve Qwen3 Next (#18683)
Xuan-Son Nguyen [Sun, 11 Jan 2026 11:53:33 +0000 (12:53 +0100)]
model: try to improve Qwen3 Next (#18683)

* qwen3next: simplify qkvz projection

* use ggml_swiglu_split

* revert swiglu_split, but remove redundant repeat()

* fix missing reshape

* rm 2 redundant transposes

* move mul_mat(k,q) to outside of chunking

* rm redundant cont

* improve g_cs_chunk

* add comments about no cont

* use std::pair instead of ggml_concat

* vectorize key_gdiff calculation

* rm unused tensor

* avoid ggml_concat inside loop

* bring back ggml_concat as it may not work on other backend

* nits

8 weeks agoreadme : update UIs (#18751)
thom-dev-fr [Sun, 11 Jan 2026 11:46:50 +0000 (12:46 +0100)]
readme : update UIs (#18751)

8 weeks agosecurity: narrow down the scope of what we consider a vulnerability (#18752)
Xuan-Son Nguyen [Sun, 11 Jan 2026 11:23:36 +0000 (12:23 +0100)]
security: narrow down the scope of what we consider a vulnerability (#18752)

* security: narrow down the scope of what we consider a vulnerability

* fix typo

8 weeks agoopencl: add SOFTPLUS op support (#18726)
shaofeiqi [Sun, 11 Jan 2026 05:57:44 +0000 (21:57 -0800)]
opencl: add SOFTPLUS op support (#18726)

8 weeks agotest-backend-ops: fix mxfp4 tests on blackwell (#18736)
Aman Gupta [Sat, 10 Jan 2026 17:12:57 +0000 (01:12 +0800)]
test-backend-ops: fix mxfp4 tests on blackwell (#18736)

8 weeks agoHIP: adjust RDNA3.5 MMQ kernel selction logic (#18666)
Johannes Gäßler [Sat, 10 Jan 2026 16:19:01 +0000 (17:19 +0100)]
HIP: adjust RDNA3.5 MMQ kernel selction logic (#18666)

8 weeks agocmake : update blas logic (#18205)
Perry Naseck [Sat, 10 Jan 2026 16:00:54 +0000 (11:00 -0500)]
cmake : update blas logic (#18205)

8 weeks agoserver : adjust unified KV cache tests (#18716)
Georgi Gerganov [Sat, 10 Jan 2026 15:51:56 +0000 (17:51 +0200)]
server : adjust unified KV cache tests (#18716)

8 weeks agoscripts : follow api redirects in pr2wt.sh (#18739)
Sigbjørn Skjæret [Sat, 10 Jan 2026 15:04:05 +0000 (16:04 +0100)]
scripts : follow api redirects in pr2wt.sh (#18739)

8 weeks agopreset: allow named remote preset (#18728)
Xuan-Son Nguyen [Sat, 10 Jan 2026 14:12:29 +0000 (15:12 +0100)]
preset: allow named remote preset (#18728)

* preset: allow named remote preset

* nits: fix docs

* cont docs

8 weeks agodocs(ggml): update backend ops (#18734)
Aaron Teo [Sat, 10 Jan 2026 10:48:17 +0000 (18:48 +0800)]
docs(ggml): update backend ops (#18734)

Signed-off-by: Aaron Teo <redacted>
8 weeks agoCorrected: changed s13 = src1->nb[3] instead of nb[2] (#18724)
Michael Wand [Sat, 10 Jan 2026 09:16:07 +0000 (01:16 -0800)]
Corrected: changed s13 = src1->nb[3] instead of nb[2] (#18724)

8 weeks agocommon : add --license to display embedded licenses (#18696)
Adrien Gallouët [Sat, 10 Jan 2026 08:46:24 +0000 (09:46 +0100)]
common : add --license to display embedded licenses (#18696)

This commit introduces a mechanism to embed all licenses directly
into the compiled binaries.

This eliminates the need to distribute separate LICENSE files alongside
the executable, making the binaries self-contained and simplifying
deployment.

2 months agoserver: fix n_cmpl not skipping processing prompt (#18663)
Xuan-Son Nguyen [Fri, 9 Jan 2026 23:00:41 +0000 (00:00 +0100)]
server: fix n_cmpl not skipping processing prompt (#18663)

* server: fix n_cmpl not skipping processing

* fix infinite loop on empty batch

* cont : init child samplers + modify child logic

* cont : cleanup

* cont : improve n_cmpl logic

- launch the parent task first so it finds the slot with best cache
- parent task waits for child tasks to be launched
- when a child task finishes - remove its cache

* cont : remove redundant function

* cont : reduce parent checks

* fix : nullptr task dereference

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agomtmd: Add Gemma3n multimodal support with MobileNetV5 vision encoder (#18256)
Simranjeet Singh [Fri, 9 Jan 2026 22:42:38 +0000 (22:42 +0000)]
mtmd: Add Gemma3n multimodal support with MobileNetV5 vision encoder (#18256)

* Add Gemma3nVisionModel - MobileNetV5 vision encoder convertor to convert_hf_to_gguf.py. Add gemma3n to vision projectors in gguf-py/gguf/constants.py.

* Add mobilenetv5 impl

* Fix comments, remove unused vars

* Fix permute and remove transpose of projection weights

* Fix comments, remove debugging prints from hf_to_gguf

* 1. Hard-code image_mean = 0 and image_std = 1
2. Use available tensor mapping logic
3. Remove redundant chat template replacement of soft tokens placeholder with media placeholder

* 1. Move mobilenetv5 helpers declarations to `clip_graph_mobilenetv5` struct and definitions to mobilenetv5.cpp
2.Remove unused `clip_is_gemma3n` func declarations and definitions
3. Remove redundant `rescale_image_u8_to_f32` func and use `normalize_image_u8_to_f32` with zero mean and unit std
4. Calculate n_patches using image_size / patch_size

* Remove obsolete comments

* - convert_hf_to_gguf.py & constants.py & tensor_mapping.py: Use explicit mapping: Custom map for double indexed blocks and tensor_mapping.py for rest
- convert_hf_to_gguf.py: Unsqueeze Stem Bias and Layer scale tensors to correct shape while converting to gguf
- mobilenetv5.cpp: Remove explicit reshaping of Stem Bias and Layer scale which are now handled while converting to gguf, replace fprintf with LOG_*
- clip.cpp: Remove unused embedding and hard_emb_norm tensor loading

* - Rename tensors to v.conv..., v.blk..., v.msfa... to better align with already existing terminology

* Fix stem conv bias name

* Remove explicit handling of bias term for stem conv

* - Change order of addition in "project_per_layer_inputs" to support broadcasting of vision inp_per_layer
- Simplify the vision embeddings path of "get_per_layer_inputs" to output [n_embd_altup, n_layer, 1], broadcastable

* clean up conversion script

* fix code style

* also preserve audio tensors

* trailing space

* split arch A and V

* rm unused gemma3 func

* fix alignment

---------

Co-authored-by: Xuan Son Nguyen <redacted>
2 months agoopencl: add EXPM1 op (#18704)
shaofeiqi [Fri, 9 Jan 2026 18:13:13 +0000 (10:13 -0800)]
opencl: add EXPM1 op (#18704)

2 months agoUpdates to webgpu get_memory (#18707)
Reese Levine [Fri, 9 Jan 2026 16:17:18 +0000 (08:17 -0800)]
Updates to webgpu get_memory (#18707)

2 months agoWebui/file upload (#18694)
Pascal [Fri, 9 Jan 2026 15:45:32 +0000 (16:45 +0100)]
Webui/file upload (#18694)

* webui: fix restrictive file type validation

* webui: simplify file processing logic

* chore: update webui build output

* webui: remove file picker extension whitelist (1/2)

* webui: remove file picker extension whitelist (2/2)

* chore: update webui build output

* refactor: Cleanup

* chore: update webui build output

* fix: update ChatForm storybook test after removing accept attribute

* chore: update webui build output

* refactor: more cleanup

* chore: update webui build output

2 months agocmake: only build cli when server is enabled (#18670)
Asbjørn Olling [Fri, 9 Jan 2026 15:43:26 +0000 (16:43 +0100)]
cmake: only build cli when server is enabled (#18670)