]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
5 weeks agogguf-py : allow converting multi-tensor models from read-only locations (#18100)
Yuri Khrustalev [Wed, 17 Dec 2025 01:27:03 +0000 (20:27 -0500)]
gguf-py : allow converting multi-tensor models from read-only locations (#18100)

5 weeks agollama-fit-params: force disable mlock (#18103)
Johannes Gäßler [Tue, 16 Dec 2025 23:50:12 +0000 (00:50 +0100)]
llama-fit-params: force disable mlock (#18103)

5 weeks agollama-fit-params: lower ctx size for multi GPU (#18101)
Johannes Gäßler [Tue, 16 Dec 2025 23:49:34 +0000 (00:49 +0100)]
llama-fit-params: lower ctx size for multi GPU (#18101)

5 weeks agollama-fit-params: fix underflow for dense models (#18095)
Johannes Gäßler [Tue, 16 Dec 2025 23:47:37 +0000 (00:47 +0100)]
llama-fit-params: fix underflow for dense models (#18095)

5 weeks agollama-fit-params: QoL impr. for prints/errors (#18089)
Johannes Gäßler [Tue, 16 Dec 2025 23:03:19 +0000 (00:03 +0100)]
llama-fit-params: QoL impr. for prints/errors (#18089)

5 weeks agomodel: fix LFM2 missing tensors (#18105)
Xuan-Son Nguyen [Tue, 16 Dec 2025 18:07:43 +0000 (19:07 +0100)]
model: fix LFM2 missing tensors (#18105)

5 weeks agollama: fix early stop in params_fit if ctx is set (#18070)
Johannes Gäßler [Tue, 16 Dec 2025 13:24:00 +0000 (14:24 +0100)]
llama: fix early stop in params_fit if ctx is set (#18070)

5 weeks agoserver: fix crash when batch > ubatch with embeddings (#17912)
yifant-code [Tue, 16 Dec 2025 12:27:36 +0000 (07:27 -0500)]
server: fix crash when batch > ubatch with embeddings (#17912)

* server: fix crash when batch > ubatch with embeddings (#12836)

Fixes #12836 where the server crashes with GGML_ASSERT failure when
running with embeddings enabled and n_batch > n_ubatch.

Root cause: Embeddings use non-causal attention which requires all
tokens to be processed within a single ubatch. When n_batch > n_ubatch,
the server attempts to split processing, causing assertion failure.

Solution:
- Add parameter validation in main() after common_params_parse()
- When embeddings enabled and n_batch > n_ubatch:
  * Log warnings explaining the issue
  * Automatically set n_batch = n_ubatch
  * Prevent server crash

This follows the approach suggested by @ggerganov in issue #12836.

Note: This supersedes stalled PR #12940 which attempted a runtime fix
in the old examples/server/server.cpp location. This implementation
validates at startup in tools/server/server.cpp (current location).

Testing:
- Build: Compiles successfully
- Validation triggers: Warns when -b > -ub with --embedding
- Auto-correction works: Adjusts n_batch = n_ubatch
- No false positives: Valid params don't trigger warnings
- Verified on macOS M3 Pro with embedding model

* Update tools/server/server.cpp

---------

Co-authored-by: ytian218 <redacted>
Co-authored-by: Georgi Gerganov <redacted>
5 weeks agomodel-conversion : remove -fa option in model card template [no ci] (#18088)
Daniel Bevenius [Tue, 16 Dec 2025 12:25:09 +0000 (13:25 +0100)]
model-conversion : remove -fa option in model card template [no ci] (#18088)

This commit updates the causal model card template and removes the
-fa option as it is no longer required (fa is auto detected).

5 weeks agoarch: refactor LLM_TENSOR_NAMES (#18051)
Xuan-Son Nguyen [Tue, 16 Dec 2025 12:22:30 +0000 (13:22 +0100)]
arch: refactor LLM_TENSOR_NAMES (#18051)

* arch: refactor LLM_TENSOR_NAMES

* update docs

* typo

* fix LLM_ARCH_NEMOTRON_H_MOE

* show more meaningful error message on missing tensor

* fix and tested LLM_ARCH_NEMOTRON_H_MOE

5 weeks agoarg: clarify auto kvu/np being set on server (#17997)
Xuan-Son Nguyen [Tue, 16 Dec 2025 11:01:27 +0000 (12:01 +0100)]
arg: clarify auto kvu/np being set on server (#17997)

* arg: clarify auto kvu/np being set on server

* improve docs

* use invalid_argument

5 weeks agoOptimization: Qwen3 next autoregressive pass (#17996)
Piotr Wilkin (ilintar) [Tue, 16 Dec 2025 10:59:53 +0000 (11:59 +0100)]
Optimization: Qwen3 next autoregressive pass (#17996)

* It's Qwen3 Next, the lean mean token generation machine!

* Apply patches from thread

* Remove recurrent version, only keep chunked and autoregressive

* Remove unnecessary conts and asserts

* Remove more extra conts and asserts

* Cleanup masking

5 weeks agoCLI: fixed adding cli and completion into docker containers, improved docs (#18003)
Andrew Aladjev [Tue, 16 Dec 2025 10:52:23 +0000 (13:52 +0300)]
CLI: fixed adding cli and completion into docker containers, improved docs (#18003)

Co-authored-by: Andrew Aladjev <redacted>
5 weeks agoserver: Update README.md incorrect argument (#18073)
2114L3 [Tue, 16 Dec 2025 10:50:43 +0000 (20:50 +1000)]
server: Update README.md incorrect argument (#18073)

n-gpu-layer is incorrect
argument is n-gpu-layers with the 's'

5 weeks agomodel: support GLM4V vision encoder (#18042)
Xuan-Son Nguyen [Tue, 16 Dec 2025 10:25:26 +0000 (11:25 +0100)]
model: support GLM4V vision encoder (#18042)

* convert ok

* no deepstack

* less new tensors

* cgraph ok

* add mrope for text model

* faster patch merger

* add GGML_ROPE_TYPE_MRNORM

* add support for metal

* move glm4v do dedicated graph

* convert: add norm_embd

* clip: add debugging fn

* working correctly

* fix style

* use bicubic

* fix mrope metal

* improve cpu

* convert to neox ordering on conversion

* revert backend changes

* force stop if using old weight

* support moe variant

* fix conversion

* fix convert (2)

* Update tools/mtmd/clip-graph.h

Co-authored-by: Georgi Gerganov <redacted>
* process mrope_section on TextModel base class

* resolve conflict merge

---------

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agomodel-conversion : add note about verifying previous models (#18082)
Daniel Bevenius [Tue, 16 Dec 2025 10:17:40 +0000 (11:17 +0100)]
model-conversion : add note about verifying previous models (#18082)

This commit adds a note to the README in the model-conversion
examples, advising developers to verify that previous versions of models
pass logits verification before adding new models from the same family.

5 weeks agomodel-conversion : use CONVERTED_EMBEDDING_MODEL for embedding_verify_logits (#18079)
Daniel Bevenius [Tue, 16 Dec 2025 10:17:20 +0000 (11:17 +0100)]
model-conversion : use CONVERTED_EMBEDDING_MODEL for embedding_verify_logits (#18079)

This commit updates the embedding model verification script to use the
CONVERTED_EMBEDDING_MODEL environment variable instead of using the
EMBEDDING_MODEL_PATH (the original embedding model path) as the basis
for the converted model file name.

The motivation for this that currently if the converted embedding model
file name differs from the original embedding model directory/name the
verification script will look for the wrong .bin files that were
generating when running the models.

5 weeks agocommon : add nemotron 3 parsing (#18077)
Aldehir Rojas [Tue, 16 Dec 2025 10:05:23 +0000 (04:05 -0600)]
common : add nemotron 3 parsing (#18077)

* common : expose json-schema functionality to extract type info

* common : fix peg parser negation during needs_more_input

* common : add some defensive measures in constructed peg parser

* common : add nemotron nano 3 support

* common : add nemotron nano 3 tests

* remove debug line

5 weeks agoadded note for old Intel hardware pre sycl (#18017)
Francisco Herrera [Tue, 16 Dec 2025 09:45:09 +0000 (04:45 -0500)]
added note for old Intel hardware pre sycl (#18017)

* added note for old Intel hardware pre sycl

Older hardware used opencl

* typo

* use consistent terms

5 weeks agosecurity : add collaborator guidance (#18081)
Georgi Gerganov [Tue, 16 Dec 2025 09:17:11 +0000 (11:17 +0200)]
security : add collaborator guidance (#18081)

5 weeks agollama: Include algorithm header needed for C++23 (#18078)
Chris Peterson [Tue, 16 Dec 2025 07:37:55 +0000 (23:37 -0800)]
llama: Include algorithm header needed for C++23 (#18078)

5 weeks agograph : reuse SSM graphs (#16490)
Georgi Gerganov [Tue, 16 Dec 2025 07:36:21 +0000 (09:36 +0200)]
graph : reuse SSM graphs (#16490)

* graph : reuse hybrid graphs

* graph : reuse recurrent graphs

* graph : fix reuse check for recurrent inputs

* memory : move the recurrent state into the memory context

* Revert "memory : move the recurrent state into the memory context"

This reverts commit 00f115fe810815d4a22a6dee0acc346131e970e1.

* cont : fix build

5 weeks agoci : separate webui from server (#18072)
Sigbjørn Skjæret [Tue, 16 Dec 2025 07:17:26 +0000 (08:17 +0100)]
ci : separate webui from server (#18072)

* separate webui from server

* add public to path

5 weeks agowebui: Improve copy to clipboard with text attachments (#17969)
Aleksander Grygier [Tue, 16 Dec 2025 06:38:46 +0000 (07:38 +0100)]
webui: Improve copy to clipboard with text attachments (#17969)

* feat: Create copy/paste user message including "pasted text" attachments

* chore: update webui build output

* chore: update webui static output

* fix: UI issues

* chore: update webui static output

* fix: Decode HTML entities using `DOMParser`

* chore: update webui build output

* chore: update webui static output

5 weeks agowebui: Add setting to always show sidebar on Desktop (#17809)
Aleksander Grygier [Tue, 16 Dec 2025 06:31:37 +0000 (07:31 +0100)]
webui: Add setting to always show sidebar on Desktop (#17809)

* feat: Add setting to always show Sidebar on Desktop

* chore: update webui build output

* feat: Add auto-show sidebar setting

* fix: Mobile settings dialog UI

* chore: update webui build output

* feat: UI label update

* chore: update webui build output

* chore: update webui build output

* chore: update webui build output

* refactor: Cleanup

* chore: update webui build output

5 weeks agollama : add support for NVIDIA Nemotron 3 Nano (#18058)
Daniel Bevenius [Tue, 16 Dec 2025 06:19:26 +0000 (07:19 +0100)]
llama : add support for NVIDIA Nemotron 3 Nano (#18058)

* llama : add support for NVIDIA Nemotron Nano 3

This commit adds support for the NVIDIA Nemotron Nano 3 model, enabling
the conversion and running of this model.

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agoWebui: Disable attachment button and model selector button when prompt textbox is...
Darius Lukas [Tue, 16 Dec 2025 06:15:49 +0000 (01:15 -0500)]
Webui: Disable attachment button and model selector button when prompt textbox is disabled. (#17925)

* Pass disabled state to the file attachments button and the model
selector button.

* Update index.html.gz

* Fix model info card in non-router mode.

* Update index.html.gz

5 weeks agoconvert : move rope_parameters to TextModel class (#18061)
Sigbjørn Skjæret [Mon, 15 Dec 2025 21:03:16 +0000 (22:03 +0100)]
convert : move rope_parameters to TextModel class (#18061)

* make sure to search text_config for rope parameters

* move rope_parameters to TextModel class

5 weeks agoggml-hexagon: mm for mtmd (#17894)
Shouyu [Mon, 15 Dec 2025 18:53:56 +0000 (13:53 -0500)]
ggml-hexagon: mm for mtmd  (#17894)

* feat: add run_mtmd script for hexagon

* fix: fix issue in fp16xfp32 mm

* fix: remove opt_experiment for fp16xfp32 mm

* fix: ggml-hexagon: matmul fp16xfp32 support non-contigious src0

* fix: fix syntax check for run-mtmd.sh for cli

5 weeks agomodel : add KORMo model (#18032)
HelloKS [Mon, 15 Dec 2025 17:51:43 +0000 (02:51 +0900)]
model : add KORMo model (#18032)

* vocab: add KORMo Tokenizer

* model: add KORMoForCausalLM

* vocab: change pretokenizer to qwen2

* lint: fix unintended line removal

* model: make qwen2 bias tensor optional

* model: use qwen2 architecture for KORMo

5 weeks agokv-cache: Fix state restore fragmented cache (#17982)
ssweens [Mon, 15 Dec 2025 17:28:35 +0000 (09:28 -0800)]
kv-cache: Fix state restore fragmented cache (#17982)

* kv-cache : fix state restore with fragmented cache (#17527)

Change find_slot to allow non-contiguous allocation during state restore. Fixes 'failed to find available cells in kv cache' error when restoring state to fragmented cache.

* tests : update logic

* cleanup: tightened state_read_meta sig, added is_contiguous case

* fix: state_read_meta arg reorder loose ends

---------

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agoFix unreadable user markdown colors and truncate long texts in deletion dialogs ...
Pascal [Mon, 15 Dec 2025 15:34:53 +0000 (16:34 +0100)]
Fix unreadable user markdown colors and truncate long texts in deletion dialogs (#17555)

* webui: limit conversation name length in dialogs

* webui: fix unreadable colors on links and table cell hover in user markdown

* webui: keep table borders visible in user markdown

* webui: updating unified exports

* Update tools/server/webui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentThumbnailFile.svelte

Co-authored-by: Aleksander Grygier <redacted>
* chore: update webui build output

* chore: update webui build output

* chore: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
5 weeks agometal: use shared buffers on eGPU (#17866)
Jeremy Demeule [Mon, 15 Dec 2025 14:14:49 +0000 (15:14 +0100)]
metal: use shared buffers on eGPU (#17866)

* metal: use shared buffers on eGPU

With #15906, I noticed on important regression when using metal backend on eGPU.
This commit restore the previous behavior and add an option to force its activation.

* metal: use shared buffers on eGPU

* metal: use shared buffers on eGPU

5 weeks agomtmd: refactor audio preprocessing (#17978)
Xuan-Son Nguyen [Mon, 15 Dec 2025 13:16:52 +0000 (14:16 +0100)]
mtmd: refactor audio preprocessing (#17978)

* mtmd: refactor audio preprocessing

* refactor

Co-authored-by: Tarek <redacted>
* wip

* wip (2)

* improve constructor

* fix use_natural_log

* fix padding for short input

* clean up

* remove need_chunking

---------

Co-authored-by: Tarek <redacted>
5 weeks agocli: fixed dead links to tools/main for cli and completion, fixed code owners (#17993)
Andrew Aladjev [Mon, 15 Dec 2025 10:47:04 +0000 (13:47 +0300)]
cli: fixed dead links to tools/main for cli and completion, fixed code owners (#17993)

Co-authored-by: Andrew Aladjev <redacted>
5 weeks agowebui: add "delete all conversations" button to import/export tab (#17444)
Thomas Jarosch [Mon, 15 Dec 2025 10:29:29 +0000 (11:29 +0100)]
webui: add "delete all conversations" button to import/export tab (#17444)

* webui: add "delete all conversations" button to import/export tab

- Add 'Delete all conversations' functionality with confirmation dialog
- Add Trash icon and destructive styling for clear visual indication
- Redirects to "?new_chat=true#/" by using conversationsStore.deleteAll()

* chore: update webui build output

5 weeks agollama: automatically set parameters not set by the user in such a way that maximizes...
Johannes Gäßler [Mon, 15 Dec 2025 08:24:59 +0000 (09:24 +0100)]
llama: automatically set parameters not set by the user in such a way that maximizes GPU utilization (#16653)

* llama: automatically fit args to free memory

llama-fit-params tool

* fix CI

* hints for bug reports, ensure no reallocation

* fix segfault with Vulkan

* add llama-fit-params to CI

* fix CI

* fix CI

* fix CI

* minor adjustments

* fix assignment of 1 dense layer

* fix logger not being reset on model load failure

* remove --n-gpu-layer hint on model load failure

* fix llama-fit-params verbosity

* fix edge case

* fix typo [no ci]

5 weeks ago[SYCL] Support gpt-oss by OPs add-id, mul_mat for mxfp4, swiglu_oai (#17826)
Neo Zhang Jianyu [Mon, 15 Dec 2025 02:35:15 +0000 (10:35 +0800)]
[SYCL] Support gpt-oss by OPs add-id, mul_mat for mxfp4, swiglu_oai (#17826)

* support gpt-oss GPU by OP add-id, mul_mat for mxfp4, swiglu_oai, fix warning

* fix fault ut case, update ops.md

* rebase, fix format issue

5 weeks agomodel : add glm-asr support (#17901)
piDack [Mon, 15 Dec 2025 02:18:46 +0000 (10:18 +0800)]
model : add glm-asr support (#17901)

* [model] add glm-asr support

* fix format for ci

* fix convert format for ci

* update glm_asr convert script & use build_ffn for glm_asr clip & use build_stack for padding and review

* check root architecture for convert hf script

* fix conficlt with upstream

* fix convert script for glm asr & format clip-impl

* format

* restore hparams text

* improved conversion

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agopreset: handle negated arg, reverse the meaning if needed (#18041)
Xuan-Son Nguyen [Sun, 14 Dec 2025 21:08:10 +0000 (22:08 +0100)]
preset: handle negated arg, reverse the meaning if needed (#18041)

6 weeks agoconvert : refactor rope scaling handling (#18013)
Sigbjørn Skjæret [Sun, 14 Dec 2025 15:04:37 +0000 (16:04 +0100)]
convert : refactor rope scaling handling (#18013)

* refactor rope scaling handling

* ws--

* missed a couple

* use find_hparam

6 weeks agomtmd: enhance image resizing in llava_uhd (#18014)
Haowei Wu [Sun, 14 Dec 2025 14:57:52 +0000 (22:57 +0800)]
mtmd: enhance image resizing in llava_uhd (#18014)

6 weeks agovulkan: fix mul_mat_vec_iq1_s formatting (#18026)
Ruben Ortlam [Sun, 14 Dec 2025 13:52:46 +0000 (14:52 +0100)]
vulkan: fix mul_mat_vec_iq1_s formatting (#18026)

6 weeks agograph: add f_attn_temp_offset (#18025)
Xuan-Son Nguyen [Sun, 14 Dec 2025 12:05:59 +0000 (13:05 +0100)]
graph: add f_attn_temp_offset (#18025)

6 weeks agocommon : refactor common_sampler + grammar logic changes (#17937)
Georgi Gerganov [Sun, 14 Dec 2025 08:11:13 +0000 (10:11 +0200)]
common : refactor common_sampler + grammar logic changes (#17937)

* common : refactor common_sampler + grammar logic changes

* tests : increase max_tokens to get needed response

* batched : fix uninitialized samplers

6 weeks agovulkan: Fix data race/hang in scalar/cm1 flash attention (#17887)
Jeff Bolz [Sun, 14 Dec 2025 08:00:00 +0000 (02:00 -0600)]
vulkan: Fix data race/hang in scalar/cm1 flash attention (#17887)

6 weeks agovulkan: improve mul_mat_vec_iq1_s speed (#17874)
lovedheart [Sun, 14 Dec 2025 07:47:49 +0000 (08:47 +0100)]
vulkan: improve mul_mat_vec_iq1_s speed (#17874)

6 weeks agovulkan: faster q6_k matmul (#17813)
Eve [Sun, 14 Dec 2025 07:29:37 +0000 (07:29 +0000)]
vulkan: faster q6_k matmul (#17813)

* q6_k faster mul mat

* 8 values

* fix comment

* switch to two at a time

* start ci for .glsl files

6 weeks agomodel-conversion : cast logits to float32 (#18009)
Georgi Gerganov [Sun, 14 Dec 2025 06:58:13 +0000 (08:58 +0200)]
model-conversion : cast logits to float32 (#18009)

6 weeks agomodels : fix YaRN regression + consolidate logic (#18006)
Georgi Gerganov [Sun, 14 Dec 2025 06:34:56 +0000 (08:34 +0200)]
models : fix YaRN regression + consolidate logic (#18006)

* models : fix YaRN regression + consolidate logic

* cont : fix the fix

* cont : remove header

* cont : add header

6 weeks agoggml : arm repack fix build
Georgi Gerganov [Sat, 13 Dec 2025 20:54:14 +0000 (22:54 +0200)]
ggml : arm repack fix build

6 weeks agosync : ggml
Georgi Gerganov [Sat, 13 Dec 2025 08:07:07 +0000 (10:07 +0200)]
sync : ggml

6 weeks agoggml : arm repack fix build (whisper/0)
Georgi Gerganov [Sat, 13 Dec 2025 06:04:09 +0000 (08:04 +0200)]
ggml : arm repack fix build (whisper/0)

6 weeks agocmake : set `CMAKE_RUNTIME_OUTPUT_DIRECTORY` for non standalone build (ggml/1394)
Congcong Cai [Fri, 12 Dec 2025 14:37:38 +0000 (22:37 +0800)]
cmake : set `CMAKE_RUNTIME_OUTPUT_DIRECTORY` for non standalone build (ggml/1394)

Some backend depends on CMAKE_RUNTIME_OUTPUT_DIRECTORY to create temporary file like metal backened.
Missing CMAKE_RUNTIME_OUTPUT_DIRECTORY will cause some cmake error like permission denied (try to copy file to root).
This PR wants to setup a default path for CMAKE_RUNTIME_OUTPUT_DIRECTORY when it does not exist.

6 weeks agoscripts: add script to compare logprobs of llama.cpp against other frameworks (#17947)
Xuan-Son Nguyen [Sat, 13 Dec 2025 21:33:29 +0000 (22:33 +0100)]
scripts: add script to compare logprobs of llama.cpp against other frameworks (#17947)

* scripts: add script to compare logits of llama.cpp against other frameworks

* accept custom prompt file

* fix code style

* clarify endpoint

* fix displaying

* use abs for diff

* fix vllm case

* rm output file

* rename to compare-logprobs

* add "pattern"

6 weeks agoserver-models.cpp: add missing <filesystem> (#18000)
Sergey Fedorov [Sat, 13 Dec 2025 21:02:43 +0000 (05:02 +0800)]
server-models.cpp: add missing <filesystem> (#18000)

Fixes: https://github.com/ggml-org/llama.cpp/issues/17999
6 weeks agollama_context: synchronize before reallocating output buffer (#17974)
Jeff Bolz [Sat, 13 Dec 2025 15:19:51 +0000 (09:19 -0600)]
llama_context: synchronize before reallocating output buffer (#17974)

6 weeks agoarg: fix common_params_parse not accepting negated arg (#17991)
Xuan-Son Nguyen [Sat, 13 Dec 2025 11:53:37 +0000 (12:53 +0100)]
arg: fix common_params_parse not accepting negated arg (#17991)

6 weeks agocmake: correct scope - link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17972)
Gustavo Rocha Dias [Sat, 13 Dec 2025 11:46:36 +0000 (08:46 -0300)]
cmake: correct scope - link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17972)

* fix - w64devkit build

* fix - w64devkit build private scope

6 weeks agovulkan: support get_rows for i32 (#17941)
Jeff Bolz [Sat, 13 Dec 2025 09:12:53 +0000 (03:12 -0600)]
vulkan: support get_rows for i32 (#17941)

6 weeks agovulkan: support GGML_OP_DIAG (#17893)
Jeff Bolz [Sat, 13 Dec 2025 09:07:49 +0000 (03:07 -0600)]
vulkan: support GGML_OP_DIAG (#17893)

6 weeks agovulkan: Multi-pass softmax for large number of cols (#17892)
Jeff Bolz [Sat, 13 Dec 2025 09:04:29 +0000 (03:04 -0600)]
vulkan: Multi-pass softmax for large number of cols (#17892)

When the number of cols is large, split each row across multiple workgroups.
There are three phases that communicate partial results through temp buffers:
(1) compute max partials
(2) take max of partials, compute sum(exp(x-max)) partials
(3) sum partials, compute scaled result

6 weeks agospeculative-simple : free batch on exit (#17985)
Georgi Gerganov [Sat, 13 Dec 2025 07:48:34 +0000 (09:48 +0200)]
speculative-simple : free batch on exit (#17985)

6 weeks agocommon : skip model validation when --completion-bash is requested (#17975)
Sigbjørn Skjæret [Sat, 13 Dec 2025 07:40:50 +0000 (08:40 +0100)]
common : skip model validation when --completion-bash is requested (#17975)

6 weeks agovulkan: Allow non-pow2 n_experts in topk_moe (#17872)
Jeff Bolz [Sat, 13 Dec 2025 07:40:04 +0000 (01:40 -0600)]
vulkan: Allow non-pow2 n_experts in topk_moe (#17872)

6 weeks agoadd llama-completion to completion-bash executables (#17976)
Sigbjørn Skjæret [Sat, 13 Dec 2025 07:35:50 +0000 (08:35 +0100)]
add llama-completion to completion-bash executables (#17976)

6 weeks agomodel-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)
Daniel Bevenius [Sat, 13 Dec 2025 07:34:26 +0000 (08:34 +0100)]
model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)

* model-conversion : use CONVERTED_MODEL value for converted model [no ci]

This commit updates the model verification scripts to use the
CONVERTED_MODEL environment variable instead of using the MODEL_PATH
(the original model path) as the basis for the converted model file
name.

The motivation for this that currently if the converted model file name
differs from the original model directory/name the verification scripts
will look for the wrong .bin files that were generating when running the
models.
For example, the following steps were not possible:
```console
(venv) $ huggingface-cli download google/gemma-3-270m-it --local-dir ggml-org/gemma-3-270m
(venv) $ python3 convert_hf_to_gguf.py ggml-org/gemma-3-270m --outfile test-bf16.gguf --outtype bf16
(venv) $ cd examples/model-conversion/
(venv) $ export MODEL_PATH=../../ggml-org/gemma-3-270m
(venv) $ export CONVERTED_MODEL=../../test-bf16.gguf
(venv) $ make causal-verify-logits
...
Data saved to data/llamacpp-test-bf16.bin
Data saved to data/llamacpp-test-bf16.txt
Error: llama.cpp logits file not found: data/llamacpp-gemma-3-270m.bin
Please run scripts/run-converted-model.sh first to generate this file.
make: *** [Makefile:62: causal-verify-logits] Error 1
```

With the changes in this commit, the above steps will now work as
expected.

6 weeks agocommon: support negated args (#17919)
Xuan-Son Nguyen [Fri, 12 Dec 2025 22:58:53 +0000 (23:58 +0100)]
common: support negated args (#17919)

* args: support negated args

* update docs

* fix typo

* add more neg options

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* rm duplicated arg

* fix LLAMA_ARG_NO_HOST

* add test

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agoclip: move model cgraphs into their own files (#17965)
Xuan-Son Nguyen [Fri, 12 Dec 2025 20:14:48 +0000 (21:14 +0100)]
clip: move model cgraphs into their own files (#17965)

* clip: move model cgraphs into their own files

* more explicit enums

* fix linux build

* fix naming

* missing headers

* nits: add comments for contributors

6 weeks agoci : change the cann version and the container pull method (#17953)
jiahao su [Fri, 12 Dec 2025 19:43:00 +0000 (03:43 +0800)]
ci : change the cann version and the container pull method (#17953)

fix error format

Update build.yml

Remove unnecessary zip files

fix

update

6 weeks agodocker : include legacy llama-completion binary (#17964)
Sigbjørn Skjæret [Fri, 12 Dec 2025 18:39:23 +0000 (19:39 +0100)]
docker : include legacy llama-completion binary (#17964)

6 weeks agoCUDA: fix overflow in MMA kernel without stream-k (#17939)
Johannes Gäßler [Fri, 12 Dec 2025 16:43:58 +0000 (17:43 +0100)]
CUDA: fix overflow in MMA kernel without stream-k (#17939)

6 weeks agomodels : fix the attn_factor for mistral3 graphs + improve consistency (#17945)
Georgi Gerganov [Fri, 12 Dec 2025 15:12:40 +0000 (17:12 +0200)]
models : fix the attn_factor for mistral3 graphs + improve consistency (#17945)

* models : fix the attn_factor for mistral3 graphs

* cont : rework attn_factor correction logic

* cont : make deepseek2 consistent

* cont : add TODO

* cont : special-case DSv2

* cont : revert Mistral 3 Large changes

* cont : fix DS2 to use the original attn_factor

* cont : minor comments

6 weeks agocann : fix ops broken by circular padding guard (#17825)
Sigbjørn Skjæret [Fri, 12 Dec 2025 14:49:27 +0000 (15:49 +0100)]
cann : fix ops broken by circular padding guard (#17825)

6 weeks agoggml-cpu : fix RISC-V Q4_0 repack select and RVV feature reporting (#17951)
ixgbe [Fri, 12 Dec 2025 14:26:03 +0000 (22:26 +0800)]
ggml-cpu : fix RISC-V Q4_0 repack select and RVV feature reporting (#17951)

* ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting

Signed-off-by: Wang Yang <redacted>
* using the name VLEN instead of CNT

* Update ggml/include/ggml-cpu.h

---------

Signed-off-by: Wang Yang <redacted>
Co-authored-by: Georgi Gerganov <redacted>
6 weeks agomtmd: explicitly forbidden inclusion of private header and libcommon (#17946)
Xuan-Son Nguyen [Fri, 12 Dec 2025 14:16:06 +0000 (15:16 +0100)]
mtmd: explicitly forbidden inclusion of private header and libcommon (#17946)

6 weeks agowebui: Fix parsing non-LaTeX occurrencies of `\(` or `\)` (#17810)
Aleksander Grygier [Fri, 12 Dec 2025 14:13:36 +0000 (15:13 +0100)]
webui: Fix parsing non-LaTeX occurrencies of `\(` or `\)` (#17810)

* fix: Improve latex protection logic to prevent turning non-latex `\(` into `$`

* chore: update webui build output

6 weeks agoarg: add -mm and -mmu as short form of --mmproj and --mmproj-url (#17958)
Xuan-Son Nguyen [Fri, 12 Dec 2025 13:06:06 +0000 (14:06 +0100)]
arg: add -mm and -mmu as short form of --mmproj and --mmproj-url (#17958)

* arg: add -mm and -mmu as short form of --mmproj and --mmproj-url

* correct order

* update docs

6 weeks agomodel-conversion : remove max diff check in compare-logits [no ci] (#17954)
Daniel Bevenius [Fri, 12 Dec 2025 12:25:16 +0000 (13:25 +0100)]
model-conversion : remove max diff check in compare-logits [no ci] (#17954)

This commit removes the maximum difference check from the
compare-logits.py which would stop early if the difference between
the logits exceeded a threshold.

The motivation for removing this is that it can be useful to be able to
get the complete log for debugging/reporting purposes.

6 weeks agocommon : add minimalist multi-thread progress bar (#17602)
Adrien Gallouët [Fri, 12 Dec 2025 11:44:35 +0000 (12:44 +0100)]
common : add minimalist multi-thread progress bar (#17602)

Signed-off-by: Adrien Gallouët <redacted>
6 weeks agocmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949)
Gustavo Rocha Dias [Fri, 12 Dec 2025 11:02:28 +0000 (08:02 -0300)]
cmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949)

6 weeks agoHIP: enable mmf for RDNA3 (#17879)
yulo [Fri, 12 Dec 2025 10:34:33 +0000 (18:34 +0800)]
HIP: enable mmf for RDNA3 (#17879)

* enable mmf for RDNA3

* disable mmf for some shape

* move some mmvf to mmf

* more mmfv to mmf

* 3 is good in mmvf

---------

Co-authored-by: zhang hui <redacted>
6 weeks agoAdd a search field on model selector / improve mobile display (#17765)
Pascal [Thu, 11 Dec 2025 17:21:21 +0000 (18:21 +0100)]
Add a search field on model selector / improve mobile display (#17765)

* webui: add search field to model selector and fixes mobile viewport overflow

* webui: simplify model search style and code

* refacor: Search Input component & consistent UI for Models Selector search

* feat: Use Popover component + improve interactions

* fix: Fetching props for only loaded models in ROUTER mode

* webui: prevent models selector popover from overflowing viewport

Use Floating UI's auto-positioning with 50dvh height limit and proper
collision detection instead of forcing top positioning. Fixes overflow
on desktop and mobile keyboard issues

* webui: keep search field near trigger in models selector

Place search at the 'near end' (closest to trigger) by swapping layout
with CSS flexbox order based on popover direction. Prevents input from
moving during typing as list shrinks

* chore: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
6 weeks agoSOLVE_TRI extension to more dimensions (#17793)
Piotr Wilkin (ilintar) [Thu, 11 Dec 2025 16:20:43 +0000 (17:20 +0100)]
SOLVE_TRI extension to more dimensions (#17793)

* Extended TRI

* Fix whitespace

* chore: update webui build output

* Just use cuBLAS for everything...

* Merge both versions

* Remove incorrect imports causing failures for CI

* Still failing... remove all direct cublas imports and rely on common imports from "common.cuh"

* Defines for hipBlas

* Aaaand MUSA defines...

* I hate this job...

* Stupid typo...

* Update ggml/src/ggml-cuda/solve_tri.cu

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

Co-authored-by: Johannes Gäßler <redacted>
6 weeks agoggml-alloc : fix reuse-parent logic for misaligned sizes (#17884)
Georgi Gerganov [Thu, 11 Dec 2025 12:30:10 +0000 (14:30 +0200)]
ggml-alloc : fix reuse-parent logic for misaligned sizes (#17884)

6 weeks agobatch : fix sequence id ownership (#17915)
Georgi Gerganov [Thu, 11 Dec 2025 12:29:47 +0000 (14:29 +0200)]
batch : fix sequence id ownership (#17915)

* batch : fix sequence id ownage

* cont : reduce allocations

6 weeks agodocs: use port 8080 in Docker examples (#17903)
Yuichiro Utsumi [Thu, 11 Dec 2025 09:12:07 +0000 (18:12 +0900)]
docs: use port 8080 in Docker examples (#17903)

6 weeks agoggml-hexagon: fix `rope` failure at `test-backend-ops` (#17565)
nullname [Wed, 10 Dec 2025 22:45:43 +0000 (06:45 +0800)]
ggml-hexagon: fix `rope` failure at `test-backend-ops` (#17565)

* fix test failure

* fix: correct scaling calculations in rope_cache_init

* fix: optimize element copying in rope_hex_f32 using memcpy

* fix: optimize loop boundaries in rope_hex_f32 for better performance

* feat: add profiling macros for performance measurement in operations

6 weeks agoci: fix riscv64-native build (#17916)
Sigbjørn Skjæret [Wed, 10 Dec 2025 22:24:31 +0000 (23:24 +0100)]
ci: fix riscv64-native build (#17916)

6 weeks agomtmd: some small clean up (#17909)
Xuan-Son Nguyen [Wed, 10 Dec 2025 21:20:06 +0000 (22:20 +0100)]
mtmd: some small clean up (#17909)

* clip: add support for fused qkv in build_vit

* use bulid_ffn whenever possible

* fix internvl

* mtmd-cli: move image to beginning

* test script: support custom args

6 weeks agocli: enable jinja by default (#17911)
Xuan-Son Nguyen [Wed, 10 Dec 2025 21:19:42 +0000 (22:19 +0100)]
cli: enable jinja by default (#17911)

* cli: enable jinja by default

* Update common/arg.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agoserver: add presets (config) when using multiple models (#17859)
Pascal [Wed, 10 Dec 2025 21:18:21 +0000 (22:18 +0100)]
server: add presets (config) when using multiple models (#17859)

* llama-server: recursive GGUF loading

Replace flat directory scan with recursive traversal using
std::filesystem::recursive_directory_iterator. Support for
nested vendor/model layouts (e.g. vendor/model/*.gguf).
Model name now reflects the relative path within --models-dir
instead of just the filename. Aggregate files by parent
directory via std::map before constructing local_model

* server : router config POC (INI-based per-model settings)

* server: address review feedback from @aldehir and @ngxson

PEG parser usage improvements:
- Simplify parser instantiation (remove arena indirection)
- Optimize grammar usage (ws instead of zero_or_more, remove optional wrapping)
- Fix last line without newline bug (+ operator instead of <<)
- Remove redundant end position check

Feature scope:
- Remove auto-reload feature (will be separate PR per @ngxson)
- Keep config.ini auto-creation and template generation
- Preserve per-model customization logic

Co-authored-by: aldehir <redacted>
Co-authored-by: ngxson <redacted>
* server: adopt aldehir's line-oriented PEG parser

Complete rewrite of INI parser grammar and visitor:
- Use p.chars(), p.negate(), p.any() instead of p.until()
- Support end-of-line comments (key=value # comment)
- Handle EOF without trailing newline correctly
- Strict identifier validation ([a-zA-Z_][a-zA-Z0-9_.-]*)
- Simplified visitor (no pending state, no trim needed)
- Grammar handles whitespace natively via eol rule

Business validation preserved:
- Reject section names starting with LLAMA_ARG_*
- Accept only keys starting with LLAMA_ARG_*
- Require explicit section before key-value pairs

Co-authored-by: aldehir <redacted>
* server: fix CLI/env duplication in child processes

Children now receive minimal CLI args (executable, model, port, alias)
instead of inheriting all router args. Global settings pass through
LLAMA_ARG_* environment variables only, eliminating duplicate config
warnings.

Fixes: Router args like -ngl, -fa were passed both via CLI and env,
causing 'will be overwritten' warnings on every child spawn

* add common/preset.cpp

* fix compile

* cont

* allow custom-path models

* add falsey check

* server: fix router model discovery and child process spawning

- Sanitize model names: replace / and \ with _ for display
- Recursive directory scan with relative path storage
- Convert relative paths to absolute when spawning children
- Filter router control args from child processes
- Refresh args after port assignment for correct port value
- Fallback preset lookup for compatibility
- Fix missing argv[0]: store server binary path before base_args parsing

* Revert "server: fix router model discovery and child process spawning"

This reverts commit e3832b42eeea7fcb108995966c7584479f745857.

* clarify about "no-" prefix

* correct render_args() to include binary path

* also remove arg LLAMA_ARG_MODELS_PRESET for child

* add co-author for ini parser code

Co-authored-by: aldehir <redacted>
* also set LLAMA_ARG_HOST

* add CHILD_ADDR

* Remove dead code

---------

Co-authored-by: aldehir <redacted>
Co-authored-by: ngxson <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: aldehir <redacted>
6 weeks agoFix race conditions in threadpool when dealing with dynamic/frequent n_threads change...
Max Krasnyansky [Wed, 10 Dec 2025 20:32:23 +0000 (12:32 -0800)]
Fix race conditions in threadpool when dealing with dynamic/frequent n_threads changes (#17748)

* tests: update barrier test to check for race condition in active threads

* cpu: combine n_graph and n_threads into a single atomic update

* tests: add multi-graph test for test_barrier

6 weeks agoggml : remove GGML_KQ_MASK_PAD constant (#17910)
Georgi Gerganov [Wed, 10 Dec 2025 18:53:16 +0000 (20:53 +0200)]
ggml : remove GGML_KQ_MASK_PAD constant (#17910)

* ggml : remove GGML_KQ_MASK_PAD constant

* cont : remove comment

6 weeks agocuda : add missing support check for xielu (#17895)
Sigbjørn Skjæret [Wed, 10 Dec 2025 15:16:20 +0000 (16:16 +0100)]
cuda : add missing support check for xielu (#17895)

6 weeks agocli: new CLI experience (#17824)
Xuan-Son Nguyen [Wed, 10 Dec 2025 14:28:59 +0000 (15:28 +0100)]
cli: new CLI experience (#17824)

* wip

* wip

* fix logging, add display info

* handle commands

* add args

* wip

* move old cli to llama-completion

* rm deprecation notice

* move server to a shared library

* move ci to llama-completion

* add loading animation

* add --show-timings arg

* add /read command, improve LOG_ERR

* add args for speculative decoding, enable show timings by default

* add arg --image and --audio

* fix windows build

* support reasoning_content

* fix llama2c workflow

* color default is auto

* fix merge conflicts

* properly fix color problem

Co-authored-by: bandoti <redacted>
* better loading spinner

* make sure to clean color on force-exit

* also clear input files on "/clear"

* simplify common_log_flush

* add warning in mtmd-cli

* implement console writter

* fix data race

* add attribute

* fix llama-completion and mtmd-cli

* add some notes about console::log

* fix compilation

---------

Co-authored-by: bandoti <redacted>
6 weeks agomodel : Qwen3-Next-80B-A3B has 48 layers (#17898)
Eric Zhang [Wed, 10 Dec 2025 14:22:40 +0000 (22:22 +0800)]
model : Qwen3-Next-80B-A3B has 48 layers (#17898)

* model : Qwen3-Next-80B-A3B has 48 layers

* model : Add 80B-A3B type name

6 weeks agodocs : update opencl ops (#17904)
lhez [Wed, 10 Dec 2025 14:20:00 +0000 (06:20 -0800)]
docs : update opencl ops (#17904)

6 weeks agoCUDA: fix unpadded strides in MMA FA kernel (#17891)
Johannes Gäßler [Wed, 10 Dec 2025 11:39:56 +0000 (12:39 +0100)]
CUDA: fix unpadded strides in MMA FA kernel (#17891)

6 weeks agoconvert: allow using quantized Mistral weight (#17889)
Xuan-Son Nguyen [Wed, 10 Dec 2025 09:26:22 +0000 (10:26 +0100)]
convert: allow using quantized Mistral weight (#17889)

* convert: allow using quantized Mistral weight

* data_torch.ndim

* update dequant fn

Co-authored-by: compilade <redacted>
---------

Co-authored-by: compilade <redacted>