]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
7 weeks agoggml : Fix FP16 ELU positive branch (#16519)
sirus20x6 [Sun, 12 Oct 2025 05:25:37 +0000 (00:25 -0500)]
ggml : Fix FP16 ELU positive branch (#16519)

Co-authored-by: Aaron <redacted>
7 weeks agohparams : add check for layer index in is_recurrent (#16511)
Daniel Bevenius [Sun, 12 Oct 2025 05:19:06 +0000 (07:19 +0200)]
hparams : add check for layer index in is_recurrent (#16511)

* hparams : add check for layer index in is_recurrent

This commit adds a check in the is_recurrent method to ensure that the
provided layer index is within the valid range.

The motivation for this change is to prevent potential out-of-bounds
and also be consistent with other methods in the class that perform
similar checks, like is_swa.

7 weeks agoggml: Correct SVE implementation in ggml_vec_dot_f16_unroll (#16518)
sirus20x6 [Sun, 12 Oct 2025 05:15:00 +0000 (00:15 -0500)]
ggml: Correct SVE implementation in ggml_vec_dot_f16_unroll (#16518)

The previous SVE implementation for `ggml_vec_dot_f16_unroll` contained a bug due to a copy-paste error. The wrong variable was used in an FMA instruction, leading to incorrect results. This commit corrects the variable usage and improves the clarity of the code by renaming variables to avoid confusion.

Co-authored-by: Aaron <redacted>
7 weeks agoCUDA: faster tile FA, add oob checks, more HSs (#16492)
Johannes Gäßler [Sat, 11 Oct 2025 18:54:32 +0000 (20:54 +0200)]
CUDA: faster tile FA, add oob checks, more HSs (#16492)

7 weeks agometal : fix mul-mm condition + fix mul-mv permuted kernels (#16494)
Georgi Gerganov [Sat, 11 Oct 2025 13:54:10 +0000 (16:54 +0300)]
metal : fix mul-mm condition + fix mul-mv permuted kernels (#16494)

7 weeks agofeat: render user content as markdown option (#16358)
Pascal [Sat, 11 Oct 2025 13:50:49 +0000 (15:50 +0200)]
feat: render user content as markdown option (#16358)

* feat: render user content as markdown option
- Add a persisted 'renderUserContentAsMarkdown' preference to the settings defaults and info metadata so the choice survives reloads like other options
- Surface the new 'Render user content as Markdown' checkbox in the General section of the chat settings dialog, beneath the PDF toggle
- Render user chat messages with 'MarkdownContent' when the new setting is enabled, matching assistant formatting while preserving the existing card styling otherwise
- chore: update webui build output

* chore: update webui build output

7 weeks agoserver / ranking : add sorting and management of top_n (#16403)
Yann Follet [Sat, 11 Oct 2025 13:39:04 +0000 (21:39 +0800)]
server / ranking : add sorting and management of top_n (#16403)

* server / ranking : add sorting and management of top_n

* Make the retro compatible if no top_n will return
all results

here is a script to make some test

```script

URL=${1:-http://127.0.0.1:8181}

curl "$URL/v1/rerank" -H "Content-Type: application/json" \
 -d '{ "model": "M", "query": "What is the recipe to make bread ?",
 "return_text" : true,
 "texts" : true,
 "top_n": 6,
 "documents": [
 "voici la recette pour faire du pain, il faut de la farine de l eau et du levain et du sel",
 "it is a bear",
 "bread recipe : floor, water, yest, salt",
 "The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.",
 "here is the ingedients to bake bread : 500g floor, 350g water, 120g fresh refresh yest, 15g salt",
 "recipe to make cookies : floor, eggs, water, chocolat",
 "here is the recipe to make bread : 500g floor, 350g water, 120g fresh refresh yest, 15g salt",
 "il fait tres beau aujourd hui",
 "je n ai pas faim, je ne veux pas manger",
 "je suis a paris"
 ] }' | jq
```

* use resize() instead for(...)

* simplify top_n init since no need to return error

result to test :

./tests.sh unit/test_rerank.py -v -x
==================================================== test session starts =====================================================
platform linux -- Python 3.12.3, pytest-8.3.5, pluggy-1.6.0 -- /home/yann/dev/yann/llama.cpp/tools/server/tests/test/bin/python3
cachedir: .pytest_cache
rootdir: /home/yann/dev/yann/llama.cpp/tools/server/tests
configfile: pytest.ini
plugins: anyio-4.11.0
collected 8 items

unit/test_rerank.py::test_rerank PASSED                                                                                [ 12%]
unit/test_rerank.py::test_rerank_tei_format PASSED                                                                     [ 25%]
unit/test_rerank.py::test_invalid_rerank_req[documents0] PASSED                                                        [ 37%]
unit/test_rerank.py::test_invalid_rerank_req[None] PASSED                                                              [ 50%]
unit/test_rerank.py::test_invalid_rerank_req[123] PASSED                                                               [ 62%]
unit/test_rerank.py::test_invalid_rerank_req[documents3] PASSED                                                        [ 75%]
unit/test_rerank.py::test_rerank_usage[Machine learning is-A machine-Learning is-19] PASSED                            [ 87%]
unit/test_rerank.py::test_rerank_usage[Which city?-Machine learning is -Paris, capitale de la-26] PASSED               [100%]

===================================================== 8 passed in 4.31s ======================================================

* add rerank top_n unit test

here is the result :

./tests.sh unit/test_rerank.py -v -x
=================================================================== test session starts ===================================================================
platform linux -- Python 3.12.3, pytest-8.3.5, pluggy-1.6.0 -- /home/yann/dev/yann/llama.cpp/tools/server/tests/test/bin/python3
cachedir: .pytest_cache
rootdir: /home/yann/dev/yann/llama.cpp/tools/server/tests
configfile: pytest.ini
plugins: anyio-4.11.0
collected 16 items

unit/test_rerank.py::test_rerank PASSED                                                                                                             [  6%]
unit/test_rerank.py::test_rerank_tei_format PASSED                                                                                                  [ 12%]
unit/test_rerank.py::test_invalid_rerank_req[documents0] PASSED                                                                                     [ 18%]
unit/test_rerank.py::test_invalid_rerank_req[None] PASSED                                                                                           [ 25%]
unit/test_rerank.py::test_invalid_rerank_req[123] PASSED                                                                                            [ 31%]
unit/test_rerank.py::test_invalid_rerank_req[documents3] PASSED                                                                                     [ 37%]
unit/test_rerank.py::test_rerank_usage[Machine learning is-A machine-Learning is-19] PASSED                                                         [ 43%]
unit/test_rerank.py::test_rerank_usage[Which city?-Machine learning is -Paris, capitale de la-26] PASSED                                            [ 50%]
unit/test_rerank.py::test_rerank_top_n[None-4] PASSED                                                                                               [ 56%]
unit/test_rerank.py::test_rerank_top_n[2-2] PASSED                                                                                                  [ 62%]
unit/test_rerank.py::test_rerank_top_n[4-4] PASSED                                                                                                  [ 68%]
unit/test_rerank.py::test_rerank_top_n[99-4] PASSED                                                                                                 [ 75%]
unit/test_rerank.py::test_rerank_tei_top_n[None-4] PASSED                                                                                           [ 81%]
unit/test_rerank.py::test_rerank_tei_top_n[2-2] PASSED                                                                                              [ 87%]
unit/test_rerank.py::test_rerank_tei_top_n[4-4] PASSED                                                                                              [ 93%]
unit/test_rerank.py::test_rerank_tei_top_n[99-4] PASSED                                                                                             [100%]

=================================================================== 16 passed in 8.84s ===================================================================

* editor config check fix

7 weeks agocuda : avoid initializing unused devices (#16510)
Diego Devesa [Sat, 11 Oct 2025 11:02:26 +0000 (04:02 -0700)]
cuda : avoid initializing unused devices (#16510)

7 weeks agoconvert : correctly handle LLaMA tokenizer for Jamba (#16470)
amirai21 [Sat, 11 Oct 2025 08:33:41 +0000 (11:33 +0300)]
convert : correctly handle LLaMA tokenizer for Jamba (#16470)

* fix: convert_hf_to_gguf - change Jamba non-sentencepiece mode (tokenizer.json) vocab construction

* fix: convert_hf_to_gguf - jamba non-sentencepiece tokenizer to use _set_vocab_llama_hf func

* fix: convert_hf_to_gguf - removed get_vocab_base_pre from jamba

7 weeks agoserver : fix division by zero when reporting stats (#16501)
Georgi Gerganov [Fri, 10 Oct 2025 19:15:05 +0000 (22:15 +0300)]
server : fix division by zero when reporting stats (#16501)

7 weeks agovocab : mark EOT token for Granite models (#16499)
Georgi Gerganov [Fri, 10 Oct 2025 14:17:31 +0000 (17:17 +0300)]
vocab : mark EOT token for Granite models (#16499)

* vocab : mark EOT token for Granite models

* sampling : fallback to EOS when EOT is not found

7 weeks agoserver : return HTTP 400 if prompt exceeds context length (#16486)
Radoslav Gerganov [Fri, 10 Oct 2025 14:11:07 +0000 (17:11 +0300)]
server : return HTTP 400 if prompt exceeds context length (#16486)

In streaming mode when prompt exceeds context length, the server returns
HTTP 200 status code with a JSON error in the body.  This is very
confusing and inconsistent with all other inference engines which return
HTTP 4xx error in this case.

This patch fixes this problem and makes the server return HTTP 400 in
such cases.

7 weeks agoserver : log requests to /v1/completions (#16495)
Radoslav Gerganov [Fri, 10 Oct 2025 10:22:27 +0000 (13:22 +0300)]
server : log requests to /v1/completions (#16495)

7 weeks agocmake : Dont define XOPENSOURCE on AIX (#16481)
Prajwal B Mehendarkar [Fri, 10 Oct 2025 08:15:46 +0000 (13:45 +0530)]
cmake : Dont define XOPENSOURCE on AIX (#16481)

7 weeks agowebui: updated the chat service to only include max_tokens in the req… (#16489)
Pascal [Thu, 9 Oct 2025 20:54:57 +0000 (22:54 +0200)]
webui: updated the chat service to only include max_tokens in the req… (#16489)

* webui: updated the chat service to only include max_tokens in the request payload when the setting is explicitly provided, while still mapping explicit zero or null values to the infinite-token sentinel

* chore: update webui build output

7 weeks agocpu : optimize the ggml NORM operation (#15953)
duduta [Thu, 9 Oct 2025 19:11:15 +0000 (22:11 +0300)]
cpu : optimize the ggml NORM operation (#15953)

* ggml-cpu: optimize norm operation to use intrinsics or Accelerate

          rename function

          add endif macro comment

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Aaron Teo <redacted>
* implement s390x SIMD suggested by @taronaeo

* add TODO comment

* tidy up spaces

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Aaron Teo <redacted>
7 weeks agoserver : host-memory prompt caching (#16391)
Georgi Gerganov [Thu, 9 Oct 2025 15:54:51 +0000 (18:54 +0300)]
server : host-memory prompt caching (#16391)

* minor : code style

* server : fix prompt similarity calculation

* server : initial host-memory prompt caching

* cont

* server : refactor

* cont

* cont : make the server task of the slot const

* cont : minor [no ci]

* server : cache prompts and checkpoints only for completion tasks

* server : improve prompt caching logic

* cont : fix check for number of cached prompts [no ci]

* server : improve caching logic, add -cram CLI arg

* server : print prompt mismatch info

* cont : better naming [no ci]

* server : improve prompt cache loading logic

* server : add option to debug the slot contents (#16482)

* server : add option to debug the slot contents

* Update tools/server/server.cpp

---------

Co-authored-by: Xuan-Son Nguyen <redacted>
* server : add option to disable prompt cache

---------

Co-authored-by: Xuan-Son Nguyen <redacted>
7 weeks agoNo markdown in cot (#16483)
Pascal [Thu, 9 Oct 2025 15:36:29 +0000 (17:36 +0200)]
No markdown in cot (#16483)

* fix: let the model think in plaintext

* chore: npm run format + npm run build

7 weeks agomodel-conversion : add support for SentenceTransformers (#16387)
Daniel Bevenius [Thu, 9 Oct 2025 12:35:22 +0000 (14:35 +0200)]
model-conversion : add support for SentenceTransformers (#16387)

* model-conversion : add support for SentenceTransformers

This commit adds support for models that use SentenceTransformer layers.

The motivation for this is that if converted model includes any of the
numbered layers specified in the original models repository then these
changes enable these models to be used and verified. Currently the
model-conversion only support the base model output without any of
the additional transformation layers.

Usage:
Convert the model that also includes the SentenceTransformer layers:
```console
(venv) $ export EMBEDDING_MODEL_PATH="~/google/embeddinggemma-300M"
(venv) make embedding-convert-model
```

Verify the produced embeddings from the converted model against the
original model embeddings:
```console
(venv) make embedding-verify-logits-st
```

The original model can be run using SentenceTransformer:
```console
(venv) make embedding-run-original-model-st
```

Run the converted model using "SentenceTransformer" layers whic
enables pooling and normalization:
```console
(venv) make embedding-run-converted-model-st
```

* add model-conversion example requirements

* add support for -st flag in embedding model conversion

This commit add support for the -st flag in the embedding model
conversion script. This will enable models to be converted using
sentence transformers dense layers.

7 weeks agoci: add ARM64 Kleidiai build and test support (#16462)
sudhiarm [Thu, 9 Oct 2025 08:13:18 +0000 (09:13 +0100)]
ci: add ARM64 Kleidiai build and test support (#16462)

7 weeks agoCANN: Improve ACL graph matching (#16166)
Chenguang Li [Thu, 9 Oct 2025 07:50:25 +0000 (15:50 +0800)]
CANN: Improve ACL graph matching (#16166)

* CANN: improve ACL graph matching

Record `ne` and `nb` information for src tensors and include them in the
graph matching check. This enhances the robustness of ACL graph matching
by preventing incorrect matches when src tensors share the same data
address but differ in shape or stride.

* CANN: add op_params match

7 weeks agokleidiai: kernel interface refactoring (#16460)
Charles Xu [Thu, 9 Oct 2025 07:29:17 +0000 (09:29 +0200)]
kleidiai: kernel interface refactoring (#16460)

7 weeks ago[SYCL] refactor soft_max, add soft_max_back (#16472)
Neo Zhang Jianyu [Thu, 9 Oct 2025 07:25:11 +0000 (15:25 +0800)]
[SYCL] refactor soft_max, add soft_max_back (#16472)

* refactor to support soft_max_ext

* fix error and support soft_max_back

* rm unused functions

* fix format issue

---------

Co-authored-by: Zhang Jianyu <redacted>
7 weeks agomodel: EmbeddingGemma Adding Support for SentenceTransformers Dense Modules (#16367)
Saba Fallah [Thu, 9 Oct 2025 06:39:18 +0000 (08:39 +0200)]
model: EmbeddingGemma Adding Support for SentenceTransformers Dense Modules (#16367)

* model: EmbeddingGemma sentence-transformers dense linear projections support

* model: add support for EmbeddingGemma SentenceTransformers dense linear projections

Adding support for the Dense modules used in EmbeddingGemma models.
EmbeddingGemma is a SentenceTransformers model with additional modules beyond the base Transformer backbone.

See: https://developers.googleblog.com/en/gemma-explained-embeddinggemma-architecture-and-recipe/

* model: add support for EmbeddingGemma SentenceTransformers dense linear projections

- converting model with dense-layers is optional
- introduced dense config params

* Update convert_hf_to_gguf.py

Co-authored-by: Daniel Bevenius <redacted>
* fixed formatting issues

* Update src/llama-graph.cpp

Co-authored-by: Georgi Gerganov <redacted>
* - removed pooling_type_opt, always allow overriding pooling_type
- asserts checking dense features dims

* fix python lint

* fix ubuntu gcc build warning

* - fixed thread-safety test
- moved asserts to load_hparams

* - tidying up code
- simplifying graph-context expecting both dense weights

* minor : add TODO

---------

Co-authored-by: Daniel Bevenius <redacted>
Co-authored-by: Georgi Gerganov <redacted>
7 weeks agorefactor: centralize CoT parsing in backend for streaming mode (#16394)
Pascal [Wed, 8 Oct 2025 20:18:41 +0000 (22:18 +0200)]
refactor: centralize CoT parsing in backend for streaming mode (#16394)

* refactor: unify reasoning handling via backend reasoning_content, drop frontend tag parsing

- Updated the chat message component to surface backend-supplied reasoning via message.thinking while showing the raw assistant content without inline tag scrubbing
- Simplified chat streaming to append content chunks directly, stream reasoning into the message model, and persist any partial reasoning when generation stops
- Refactored the chat service SSE handler to rely on server-provided reasoning_content, removing legacy <think> parsing logic
- Refreshed Storybook data and streaming flows to populate the thinking field explicitly for static and streaming assistant messages

* refactor: implement streaming-aware universal reasoning parser

Remove the streaming mode limitation from --reasoning-format by refactoring
try_parse_reasoning() to handle incremental parsing of <think> tags across
all formats.

- Rework try_parse_reasoning() to track whitespace, partial tags, and
  multiple reasoning segments, allowing proper separation of reasoning_content
  and content in streaming mode
- Parse reasoning tags before tool call handling in content-only and Llama 3.x
  formats to ensure inline <think> blocks are captured correctly
- Change default reasoning_format from 'auto' to 'deepseek' for consistent
  behavior
- Add 'deepseek-legacy' option to preserve old inline behavior when needed
- Update CLI help and documentation to reflect streaming support
- Add parser tests for inline <think>...</think> segments

The parser now continues processing content after </think> closes instead of
stopping, enabling proper message.reasoning_content and message.content
separation in both streaming and non-streaming modes.

Fixes the issue where streaming responses would dump everything (including
post-thinking content) into reasoning_content while leaving content empty.

* refactor: address review feedback from allozaur

- Passed the assistant message content directly to ChatMessageAssistant to drop the redundant derived state in the chat message component
- Simplified chat streaming updates by removing unused partial-thinking handling and persisting partial responses straight from currentResponse
- Refreshed the ChatMessage stories to cover standard and reasoning scenarios without the old THINK-tag parsing examples

Co-authored-by: Aleksander Grygier <redacted>
* refactor: restore forced reasoning prefix to pass test-chat ([chat] All tests passed)

- store the exact sequence seen on input when 'thinking_forced_open' enforces a reasoning block
- inject this prefix before the first accumulated segment in 'reasoning_content', then clear it to avoid duplication
- repeat the capture on every new 'start_think' detection to properly handle partial/streaming flows

* refactor: address review feedback from ngxson

* debug: say goodbye to curl -N, hello one-click raw stream

- adds a new checkbox in the WebUI to display raw LLM output without backend parsing or frontend Markdown rendering

* Update tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage.svelte

Co-authored-by: Aleksander Grygier <redacted>
* webui: add Storybook example for raw LLM output and scope reasoning format toggle per story

- Added a Storybook example that showcases the chat message component in raw LLM output mode with the provided trace sample
- Updated every ChatMessage story to toggle the disableReasoningFormat setting so the raw-output rendering remains scoped to its own example

* npm run format

* chat-parser: address review feedback from ngxson

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

Co-authored-by: Aleksander Grygier <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
7 weeks agoDisable CUDA host buffers on integrated GPUs (#16308)
ai-fonsi [Wed, 8 Oct 2025 18:21:46 +0000 (20:21 +0200)]
Disable CUDA host buffers on integrated GPUs (#16308)

7 weeks agoserver : fix cancel pending task (#16467)
issixx [Wed, 8 Oct 2025 08:20:18 +0000 (17:20 +0900)]
server : fix cancel pending task (#16467)

Co-authored-by: DevAI <redacted>
7 weeks agometal : mark FA blocks (#16372)
Georgi Gerganov [Wed, 8 Oct 2025 07:57:53 +0000 (10:57 +0300)]
metal : mark FA blocks (#16372)

* metal : better unroll in the FA kernels

* metal : index FA blocks

* tests : restore [no ci]

* metal : prevent division by zero in FA kernels

* metal : fix -INF detection logic

7 weeks agoserver : improve context checkpoint logic (#16440)
Georgi Gerganov [Wed, 8 Oct 2025 07:57:29 +0000 (10:57 +0300)]
server : improve context checkpoint logic (#16440)

7 weeks agoggml webgpu: profiling, CI updates, reworking of command submission (#16452)
Reese Levine [Tue, 7 Oct 2025 20:48:56 +0000 (13:48 -0700)]
ggml webgpu: profiling, CI updates, reworking of command submission (#16452)

* Add profiling

* More detailed profiling

* Rework command submission to avoid global locks

* Update wait handling

* try new method of waiting on futures

* Add serializing of command submission in some cases

* Add new pool for timestamp queries and clean up logging

* Serialize command submission in CI and leave a TODO note

* Update webgpu CI

* Add myself as WebGPU codeowner

* Deadlock avoidance

* Leave WebGPU/Vulkan CI serialized

* Fix divide by 0

* Fix logic in division by inflight_threads

* Update CODEOWNERS and remove serialize submit option

7 weeks agollama : support LiquidAI LFM2-MoE hybrid model (#16464)
Tarek Dakhran [Tue, 7 Oct 2025 18:03:35 +0000 (20:03 +0200)]
llama : support LiquidAI LFM2-MoE hybrid model (#16464)

* llama : support LiquidAI LFM2-MoE hybrid model

Add support for [LiquidAI/LFM2-8B-A1B](https://huggingface.co/LiquidAI/LFM2-8B-A1B) model.
For more information about models, please read [the blog post](https://www.liquid.ai/company/news).

[HF PR](https://github.com/huggingface/transformers/pull/41401)
[GGUFs](https://huggingface.co/LiquidAI/LFM2-8B-A1B-GGUF)

* Do not use defaultdict

* Address PR feedback

7 weeks agoserver : add `/v1/health` endpoint (#16461)
Georgi Gerganov [Tue, 7 Oct 2025 12:57:14 +0000 (15:57 +0300)]
server : add `/v1/health` endpoint (#16461)

* server : add /v1/health endpoint

* cont : update readme

8 weeks agowebui : added download action (#13552) (#16282)
Sascha Rogmann [Tue, 7 Oct 2025 09:11:08 +0000 (11:11 +0200)]
webui : added download action (#13552) (#16282)

* webui : added download action (#13552)

* webui : import and export (for all conversations)

* webui : fixed download-format, import of one conversation

* webui : add ExportedConversations type for chat import/export

* feat: Update naming & order

* chore: Linting

* webui : Updated static build output

---------

Co-authored-by: Aleksander Grygier <redacted>
8 weeks agopresets : fix pooling param for embedding models (#16455)
Georgi Gerganov [Tue, 7 Oct 2025 07:32:32 +0000 (10:32 +0300)]
presets : fix pooling param for embedding models (#16455)

8 weeks agorpc : update documentation (#16441)
Radoslav Gerganov [Tue, 7 Oct 2025 06:59:13 +0000 (09:59 +0300)]
rpc : update documentation (#16441)

Update the README file to match the newly added functionality of
exposing multiple devices from a single server.

Co-authored-by: Diego Devesa <redacted>
8 weeks agomemory : use sequential equal splits for recurrent modules (#16442)
Georgi Gerganov [Tue, 7 Oct 2025 05:24:17 +0000 (08:24 +0300)]
memory : use sequential equal splits for recurrent modules (#16442)

8 weeks agometal : add support for non-padded FA KV (#16148)
Georgi Gerganov [Tue, 7 Oct 2025 05:23:30 +0000 (08:23 +0300)]
metal : add support for non-padded FA KV (#16148)

* metal : pad K, V and Mask when needed

* cont : simplify

* cuda : add TODO about KV padding requirement

* metal : add comments

* metal : remove mask padding requirement

8 weeks agotests : add -INF blocks to the KQ mask in the FA tests (#16380)
Georgi Gerganov [Tue, 7 Oct 2025 05:22:35 +0000 (08:22 +0300)]
tests : add -INF blocks to the KQ mask in the FA tests (#16380)

* tests : add -INF blocks to the KQ mask in the FA tests

* cont : bump -INF block size to 64

Co-authored-by: Jeff Bolz <redacted>
* ggml : prevent division by zero in FA CPU op

---------

Co-authored-by: Jeff Bolz <redacted>
8 weeks agometal : various optimizations + refactoring (#16446)
Georgi Gerganov [Tue, 7 Oct 2025 05:21:40 +0000 (08:21 +0300)]
metal : various optimizations + refactoring (#16446)

* metal : ssm_scan minor opts

* metal : get_rows optimize

* metal : cpy optimize

* metal : ssm_conv opt

* metal : ssm_scan simplify

* metal : ssm_Scan opt

8 weeks agollama : add --no-host to disable host buffers (#16310)
Gadflyii [Mon, 6 Oct 2025 17:55:53 +0000 (12:55 -0500)]
llama : add --no-host to disable host buffers (#16310)

* implement --no-host to disable host buffer

* fix equal_mparams

* move no-host enumeration order together with other model params

---------

Co-authored-by: slaren <redacted>
8 weeks agochat : Granite Docling stopping (#16438)
Gabe Goodhart [Mon, 6 Oct 2025 16:59:40 +0000 (10:59 -0600)]
chat : Granite Docling stopping (#16438)

* fix: Fix duplicate fake image before token on first slice

Branch: GraniteDoclingStopping

Signed-off-by: Gabe Goodhart <redacted>
* fix: Use double-newline before overview image

Branch: GraniteDoclingStopping

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove incorrect newline at the end of granite chat template gen prompt

There should not be one, even for the language models.

Branch: GraniteDoclingStopping

Signed-off-by: Gabe Goodhart <redacted>
* tests: Remove bad newline from granite chat template test (legacy)

Branch: GraniteDoclingStopping

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

Signed-off-by: Gabe Goodhart <redacted>
8 weeks agoci : refactor sdk caching to minimize storage (#16414)
Sigbjørn Skjæret [Mon, 6 Oct 2025 15:40:21 +0000 (17:40 +0200)]
ci : refactor sdk caching to minimize storage (#16414)

* refactor sdk caching to minimize storage

* use correct action

* add myself as owner to /.github/actions/ [no ci]

8 weeks agoggml : fix unaligned access in AMX code (#16315)
Georgi Gerganov [Mon, 6 Oct 2025 13:05:27 +0000 (16:05 +0300)]
ggml : fix unaligned access in AMX code (#16315)

8 weeks agoci : remove missing reranker model files (#16444)
Daniel Bevenius [Mon, 6 Oct 2025 12:56:59 +0000 (14:56 +0200)]
ci : remove missing reranker model files (#16444)

This commit removes jina-reranker-v1-tiny-en model files that are no
longer present on Hugging Face.

The motivation for this that it clears up the CI logs from 404 errors
which can be a little confusing when looking at the logs the first time.

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/18070620247/job/51419855630#step:5:2649

8 weeks agoggml-cpu : fix leftover handling in ggml_vec_scale_f32 for SVE (#16443)
Daniel Bevenius [Mon, 6 Oct 2025 12:17:12 +0000 (14:17 +0200)]
ggml-cpu : fix leftover handling in ggml_vec_scale_f32 for SVE (#16443)

This commit updates the leftover handling in ggml_vec_scale_f32.

The motivation for this is that the code currently incorrectly assumes
there would be fewer than ggml_f32_epr leftover elements. However,
since the main loop processes 2*ggml_f32_epr elements per iteration
, there can be up to (2*ggml_f32_epr - 1) leftover elements.

The original single-pass leftover code could only process ggml_f32_epr
elements, leaving some elements unscaled.

Example scenario with 256-bit SVE:
```
ggml_f32_epr  = 8 (elements per register)
ggml_f32_step = 16 (two registers per iteration)
n             = 25
np            = 16
leftovers     = 9 elements (16-24)

Original    : processes only elements 16-23, misses element 24
This commit : loop processes elements 16-23, then element 24
```

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/18070620247/job/51419855630

8 weeks agonix : removed metal for nix (#16118)
Yuannan [Mon, 6 Oct 2025 09:29:56 +0000 (09:29 +0000)]
nix : removed metal for nix (#16118)

8 weeks agoserver: update readme to mention n_past_max metric (#16436)
Oleksandr Kuvshynov [Mon, 6 Oct 2025 07:53:31 +0000 (03:53 -0400)]
server: update readme to mention n_past_max metric (#16436)

https://github.com/ggml-org/llama.cpp/pull/15361 added new metric
exported, but I've missed this doc.

8 weeks agomodel : Granite docling + Idefics3 preprocessing (SmolVLM) (#16206)
Gabe Goodhart [Sun, 5 Oct 2025 12:57:47 +0000 (06:57 -0600)]
model : Granite docling + Idefics3 preprocessing (SmolVLM) (#16206)

* feat: Add granite-docling conversion using trillion pretokenizer

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add granite-docling vocab pre enum

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* fix: Use granite-docling pre

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add clip_is_idefics3

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Allow multi-token boundary sequences for image templating

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add tiling support for idefices3 in clip.cpp

This should likely be moved into llava_uhd::get_slice_instructions, but for
now this avoids disrupting the logic there.

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Partial support for full templating for idefics3 in mtmd

There are still errors encoding some of the image chunks, but the token
sequence now matches transformers _almost_ perfectly, except for the double
newline before the global image which shows up as two consecutive newline
tokens instead of a single double-newline token. I think this is happening
because the blocks are tokenized separately then concatenated.

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Fully working image preprocessing for idefics3 w/ resize and slicing

Branch: gabe-l-hart/GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* feat: Parse the preprocessor config's longest side and add it to the mmproj hparams

Branch: GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* fix: Use the longest side instead of size * scale_factor

For Granite Docling, these come out to the same value, but that was just a
conicidence.

Branch: GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* fix: Allow batch encoding and remove clip_is_idefics3

Branch: GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Remove unnecessary conditionals for empty token vectors

Branch: GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Use image_manipulation util

Branch: GraniteDocling

Signed-off-by: Gabe Goodhart <redacted>
* add test model

---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
8 weeks agoggml webgpu: actually add softmax, fix rms_norm offset (#16400)
Reese Levine [Sun, 5 Oct 2025 03:59:31 +0000 (20:59 -0700)]
ggml webgpu: actually add softmax, fix rms_norm offset (#16400)

* implement soft_max

* Fix soft_max data race

* Temporary fix, wait on each submit

8 weeks agovulkan: use a more appropriate amount of threads when generating shaders (#16418)
Eve [Sat, 4 Oct 2025 20:04:27 +0000 (20:04 +0000)]
vulkan: use a more appropriate amount of threads when generating shaders (#16418)

* use a more flexible amount of threads

* fix windows compile and 0 thread case

* nominmax

8 weeks agorpc : check src buffer when copying tensor (#16421)
Radoslav Gerganov [Sat, 4 Oct 2025 13:22:45 +0000 (16:22 +0300)]
rpc : check src buffer when copying tensor (#16421)

Only dst buffer is guaranteed to be an RPC buffer. Add check for the src
one.

8 weeks agorpc : add support for multiple devices (#16276)
Radoslav Gerganov [Sat, 4 Oct 2025 09:49:16 +0000 (12:49 +0300)]
rpc : add support for multiple devices (#16276)

* rpc : add support for multiple devices

Allow rpc-server to expose multiple devices from a single endpoint.
Change RPC protocol to include device identifier where needed.

closes: #15210

* fixes

* use ggml_backend_reg_t

* address review comments

* fix llama-bench backend report

* address review comments, change device naming

* fix cmd order

8 weeks agovulkan : incremental shader builds (#16341)
Acly [Sat, 4 Oct 2025 09:42:56 +0000 (11:42 +0200)]
vulkan : incremental shader builds (#16341)

* vulkan (DRAFT): split shader generation by GLSL source file, to improve incremental build times

* support dep-files so shaders are recompiled if their included files change

* rename shader files which are used as "headers" to use .glsl extension
* move glslc extension detection shaders to separate folders
* the above is to prevent them from getting glob'd with the actual compute shaders that need to be compiled

* vulkan : only write embedded shader .hpp/.cpp when they change

* avoid recompiling ggml-vulkan.cpp when editing shaders
* pass single --source argument instead of --input-dir & --filter to shader gen
* check for source file match earlier

* fix hang in vulkan-shaders-gen when there are compilation errors

* early out did not decrement compile_count

* clean up

* fix glslc integer dot product test

* unconditionally write the embedded shader cpp output

* replace output filepath in generated dep-files to match output in CMakeLists

---------

Co-authored-by: Jeff Bolz <redacted>
8 weeks agochat : support Magistral thinking (#16413)
Pascal [Fri, 3 Oct 2025 18:51:48 +0000 (20:51 +0200)]
chat : support Magistral thinking (#16413)

* feat: added a dedicated Magistral chat format that preserves [THINK] spans, parses reasoning before tool calls

* feat: new flow in the chat template test suite for Magistral

8 weeks agoserver : context checkpointing for hybrid and recurrent models (#16382)
ddh0 [Fri, 3 Oct 2025 18:34:51 +0000 (13:34 -0500)]
server : context checkpointing for hybrid and recurrent models (#16382)

* initial commit for branch 3

* generalize `swa_checkpoint` to `ctx_checkpoint`

this extends `llama-server`'s SWA checkpointing logic to include
hybrid/recurrent models such as Jamba, Granite

* oops

* disable debug prints

* keep backwards compat with `--swa-checkpoints`

Co-authored-by: Georgi Gerganov <redacted>
* update prompt re-processing message

* fix off-by-one error per GG

* keep `seq_rm` log per GG

Co-authored-by: Georgi Gerganov <redacted>
* server : fix checkpoint logic to support recurrent caches

* server : cleanup and fixes

---------

Co-authored-by: Georgi Gerganov <redacted>
8 weeks agometal : fix loop bound in ggml_mem_ranges (#16412)
Georgi Gerganov [Fri, 3 Oct 2025 16:18:56 +0000 (19:18 +0300)]
metal : fix loop bound in ggml_mem_ranges (#16412)

8 weeks agollama : fix shapes for bert/mpt q/k norm (#16409)
Sigbjørn Skjæret [Fri, 3 Oct 2025 12:40:25 +0000 (14:40 +0200)]
llama : fix shapes for bert/mpt q/k norm (#16409)

8 weeks agoggml : fix graph reallocation with multiple chunks (#16396)
Acly [Fri, 3 Oct 2025 11:49:08 +0000 (13:49 +0200)]
ggml : fix graph reallocation with multiple chunks (#16396)

reallocation is needed if a single chunk grows in size,
even if total allocation size stays the same or is lower

8 weeks agoFix missing messages on sibling navigation (#16408)
Aleksander Grygier [Fri, 3 Oct 2025 10:51:40 +0000 (12:51 +0200)]
Fix missing messages on sibling navigation (#16408)

* fix: resolve message disappearing issue when navigating between regenerated siblings by using current leaf nodes instead of cached sibling IDs

* chore: update webui build output

* chore: update webui build output

8 weeks agovulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE (#16354)
Jeff Bolz [Fri, 3 Oct 2025 10:50:46 +0000 (05:50 -0500)]
vulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE (#16354)

* vulkan: Replace uses of maxMemoryAllocationSize and VK_WHOLE_SIZE

Replace maxMemoryAllocationSize check with maxBufferSize when creating buffers.
The maxMemoryAllocationSize limit is a "soft" limit and allocations can succeed
beyond that limit. This allows > 4GB buffers to be allocated on some
implementations (e.g. NVIDIA) and tensors this large can be used for im2col
and mul_mat.

For temporary buffers (prealloc_x/y/etc) check against maxStorageBufferRange.
I'm not sure this check is ideal, but we always use these buffers as a single
full size binding and the limit may be smaller than maxMemoryAllocationSize
or maxBufferSize, so I think this is reasonable.

Replace descriptor range uses of VK_WHOLE_SIZE with a manually computed range.
The maxStorageBufferRange may be smaller than the maxBufferSize or
maxMemoryAllocationSize (and the Vulkan spec warns about this in a note) and
it's invalid usage if VK_WHOLE_SIZE computes a range larger than
maxStorageBufferRange.

With this change, it should be possible to generate videos using wan networks
in stable-diffusion.cpp.

* vulkan: Add env var GGML_VK_FORCE_MAX_BUFFER_SIZE and use stoull

8 weeks agovulkan: Fix FA coopmat1 invalid array indexing (#16365)
Jeff Bolz [Fri, 3 Oct 2025 09:52:46 +0000 (04:52 -0500)]
vulkan: Fix FA coopmat1 invalid array indexing (#16365)

When computing sinks, the cm1 shader was looping r from 0 to Br rather than
to rows_per_thread. I must have copied this from the scalar path (where it is
correct), and somehow it wasn't causing failures on current drivers.

8 weeks agoci : change macos-13 to macos-15-intel (#16401)
Daniel Bevenius [Fri, 3 Oct 2025 09:45:16 +0000 (11:45 +0200)]
ci : change macos-13 to macos-15-intel (#16401)

This commit updates the macos-13 runners to macos-15-intel.

The motivation for this changes is the macos-13 runners are scheduled
to be retired on 2025-12-04.

Refs: https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/

8 weeks agoCapture model name only after first token (streaming) or completed request (#16405)
Aleksander Grygier [Fri, 3 Oct 2025 09:30:39 +0000 (11:30 +0200)]
Capture model name only after first token (streaming) or completed request (#16405)

* feat: Capture model name only after first token (streaming) or completed request (non-streaming)

* chore: update webui build output

* chore: update webui build output

8 weeks agovulkan: in flash attention, bounds check against nem1 (don't rely on GGML_KQ_MASK_PAD...
Jeff Bolz [Fri, 3 Oct 2025 08:33:08 +0000 (03:33 -0500)]
vulkan: in flash attention, bounds check against nem1 (don't rely on GGML_KQ_MASK_PAD) (#16316)

8 weeks agowebui : Fix messages payload sent to chat completions (#16402)
Aleksander Grygier [Fri, 3 Oct 2025 07:11:34 +0000 (09:11 +0200)]
webui : Fix messages payload sent to chat completions (#16402)

* fix: Include just the currently active message branches instead of all in chat completions request

* chore: Build webui static output

* chore: Formatting

* chore: update webui build output

8 weeks agofix: track viewportHeight via window.innerHeight to avoid unwanted scrolling (#16356)
Pascal [Fri, 3 Oct 2025 06:01:31 +0000 (08:01 +0200)]
fix: track viewportHeight via window.innerHeight to avoid unwanted scrolling (#16356)

Use <svelte:window bind:innerHeight> instead of manual resize listener

Co-authored-by: Aleksander Grygier <redacted>
8 weeks agotest-barrier : do not use more threads than physically available (#16389)
Sigbjørn Skjæret [Thu, 2 Oct 2025 18:10:12 +0000 (20:10 +0200)]
test-barrier : do not use more threads than physically available (#16389)

* do not use more threads than physically available

* ensure n_threads > 0

Co-authored-by: Jeff Bolz <redacted>
---------

Co-authored-by: Jeff Bolz <redacted>
8 weeks agoggml webgpu: add support for soft_max, optimize rms_norm (#16357)
Reese Levine [Thu, 2 Oct 2025 18:00:31 +0000 (11:00 -0700)]
ggml webgpu: add support for soft_max, optimize rms_norm (#16357)

* Add inplace softmax

* Move rms_norm to split row approach

* Update debug for supports_op

* clean up debug statements

* Update tests/test-backend-ops.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
8 weeks agomodel : Apertus model implementation (#15852)
Piotr Wilkin (ilintar) [Thu, 2 Oct 2025 17:43:22 +0000 (19:43 +0200)]
model : Apertus model implementation (#15852)

* First attempt

* No permute during convert (fixes qk tensors), proper norm application.

* RoPE = NeoX

* Coherence!

* Migrate xielu params from tensors to hyperparameters

* Simple CUDA kernel

* Revert stupid LLM refactorings

* Chat template support

* configchecker / flake8 errors

* Reorder unary.cu

* I do conclude that LLMs are, in fact, stupid.

* Fix after merge

* Final newline

* Make xIELU an UNARY_OP

* Final newline

* Correctly account for parameter shift

* Argh.

* Update ggml/src/ggml-cpu/unary-ops.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Refactor: remove unused methods, inline and factorize softplus, add const modifiers

* Revert CUDA changes, implement xIELU as a separate OP

* Pesky newline

* Add float2half / half2float for F16 inputs/outputs

* CUDA variants, attempt 2

* Actually, attempt 3

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

Co-authored-by: Johannes Gäßler <redacted>
* Missing convert header

* Proper formula and reference for xIELU in the comments.

* Modify unary-ops.cpp to add the functor-based logic besides the template system to retain optimizations

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* Add tensor mappings for Apertus to global list instead

* Fix lazy on scalars

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

Co-authored-by: Johannes Gäßler <redacted>
* Add comment about the constraints on positive/negative alpha

* Change `softplus` to `ggml_softplus`

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Johannes Gäßler <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agomusa: update compile flags (#16265)
R0CKSTAR [Thu, 2 Oct 2025 13:29:56 +0000 (21:29 +0800)]
musa: update compile flags (#16265)

Signed-off-by: Xiaodong Ye <redacted>
2 months agoci : fix ubuntu-latest-cmake-rpc (disable ccache) (#16388)
Sigbjørn Skjæret [Thu, 2 Oct 2025 11:51:36 +0000 (13:51 +0200)]
ci : fix ubuntu-latest-cmake-rpc (disable ccache) (#16388)

2 months agoci: update vulkan ci (#16294)
Eve [Thu, 2 Oct 2025 08:10:07 +0000 (08:10 +0000)]
ci: update vulkan ci (#16294)

2 months agoci : fix clean-up of old logs (#16381)
Georgi Gerganov [Thu, 2 Oct 2025 07:35:43 +0000 (10:35 +0300)]
ci : fix clean-up of old logs (#16381)

2 months agoSYCL: Update to oneAPI 2025.2 (#16371)
Neo Zhang Jianyu [Thu, 2 Oct 2025 07:16:25 +0000 (15:16 +0800)]
SYCL: Update to oneAPI 2025.2 (#16371)

* update oneapi to 2025.2, use deep-learning-essentials to replace base-tool

* update to 2025.2 use deeplearn essi to replace base toolkit

* add missed dll

* add deep learning essentials

* add sycl-ls

---------

Co-authored-by: Zhang Jianyu <redacted>
2 months agoHIP: add IMbackK to codeowner (#16375)
uvos [Thu, 2 Oct 2025 03:52:59 +0000 (05:52 +0200)]
HIP: add IMbackK to codeowner (#16375)

2 months agoCI: reenable cdna in rocm docker builds (#16376)
uvos [Wed, 1 Oct 2025 21:32:39 +0000 (23:32 +0200)]
CI: reenable cdna in rocm docker builds (#16376)

2 months agoHIP: Disable ROCWMMA fattn on CDNA when compiled against ROCWMMA 2.0.0 (#16221)
uvos [Wed, 1 Oct 2025 21:09:25 +0000 (23:09 +0200)]
HIP: Disable ROCWMMA fattn on CDNA when compiled against ROCWMMA 2.0.0 (#16221)

* HIP: Disable ROCWMMA fatt on CDNA when compiled against ROCWMMA 2.0.0

rocwmma 2.0.0 includes a bug in the code fakeing fp16 accumulation on CDNA

* CUDA: Fix volta condition in ggml_cuda_should_use_wmma_fattn

2 months agollama : parameter conversion and loading fixes for PLaMo2 variants (#16075)
Shunta Saito [Wed, 1 Oct 2025 21:08:15 +0000 (06:08 +0900)]
llama : parameter conversion and loading fixes for PLaMo2 variants (#16075)

* Fix to use hidden_size_per_head

* Fix num heads

* Fix array

* Fix loading weights

* Support old GGUF converted by the previous version of llama.cpp

* Update src/llama-model.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* Move shared parameter definitions to the outside of loop

* Not calculating n_embd_head_k,v by n_embd / n_head

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoci: Properly install rocwmma for hip builds (#16305)
uvos [Wed, 1 Oct 2025 18:18:03 +0000 (20:18 +0200)]
ci: Properly install rocwmma for hip builds (#16305)

* CI: Properly install rocwmma for hip builds

on windows we now windows install rocwmma from ubuntu pacakges

* CI: update linux rocm docker build to use rocm 7.0

2 months agocommon: introduce http.h for httplib-based client (#16373)
Adrien Gallouët [Wed, 1 Oct 2025 17:22:18 +0000 (19:22 +0200)]
common: introduce http.h for httplib-based client (#16373)

* common: introduce http.h for httplib-based client

This change moves cpp-httplib based URL parsing and client setup into
a new header `common/http.h`, and integrates it in `arg.cpp` and `run.cpp`.

It is an iteration towards removing libcurl, while intentionally
minimizing changes to existing code to guarantee the same behavior when
`LLAMA_CURL` is used.

Signed-off-by: Adrien Gallouët <redacted>
* tools : add missing WIN32_LEAN_AND_MEAN

Signed-off-by: Adrien Gallouët <redacted>
---------

Signed-off-by: Adrien Gallouët <redacted>
Signed-off-by: Adrien Gallouët <redacted>
2 months agoConversation action dialogs as singletons from Chat Sidebar + apply conditional rende...
Aleksander Grygier [Wed, 1 Oct 2025 16:18:10 +0000 (18:18 +0200)]
Conversation action dialogs as singletons from Chat Sidebar + apply conditional rendering for Actions Dropdown for Chat Conversation Items (#16369)

* fix: Render Conversation action dialogs as singletons from Chat Sidebar level

* chore: update webui build output

* fix: Render Actions Dropdown conditionally only when user hovers conversation item + remove unused markup

* chore: Update webui static build

* fix: Always truncate conversation names

* chore: Update webui static build

2 months agoImprove code block color theming (#16325)
Aleksander Grygier [Wed, 1 Oct 2025 13:54:42 +0000 (15:54 +0200)]
Improve code block color theming (#16325)

* feat: Improve code block theming

* chore: update webui build output

* chore: Update webui static build

2 months agoci : use registry cache for docker builds (#16366)
Sigbjørn Skjæret [Wed, 1 Oct 2025 12:09:52 +0000 (14:09 +0200)]
ci : use registry cache for docker builds (#16366)

2 months agoAdd optional setting for showing "Model used:" information (#16337)
Aleksander Grygier [Wed, 1 Oct 2025 10:08:16 +0000 (12:08 +0200)]
Add optional setting for showing "Model used:" information (#16337)

* feat: Add a setting to include model name used to generate the message

* feat: UI improvements

* feat: Save model info along with the database message entry creation

* chore: Build webui static output

2 months agovulkan: make ggml_vk_default_dispatcher support older vulkan headers (#16345)
Eve [Wed, 1 Oct 2025 07:56:36 +0000 (07:56 +0000)]
vulkan: make ggml_vk_default_dispatcher support older vulkan headers (#16345)

* make ggml_vk_default_dispatcher support older vulkan headers

* simpilfy with using

2 months agowebui: Remove running `llama-server` within WebUI `dev.sh` script (#16363)
Aleksander Grygier [Wed, 1 Oct 2025 05:40:26 +0000 (07:40 +0200)]
webui: Remove running `llama-server` within WebUI `dev.sh` script (#16363)

2 months agomodel : support GLM 4.6 (make a few NextN/MTP tensors not required) (#16359)
Bartowski [Tue, 30 Sep 2025 20:24:36 +0000 (16:24 -0400)]
model : support GLM 4.6 (make a few NextN/MTP tensors not required) (#16359)

* Make a few GLM tensors not required

layer.nextn.shared_head_head and layer.nextn.embed_tokens are both excluded from GLM 4.6 resulting in the model not loading after conversion/quantization, this marks those tensors as not required which makes it work

* Update llama-model.cpp

layer.nextn.shared_head_norm also not required in case of future models

2 months agoci : fix ccache key for ubuntu-cpu-cmake (#16355)
Sigbjørn Skjæret [Tue, 30 Sep 2025 19:41:42 +0000 (21:41 +0200)]
ci : fix ccache key for ubuntu-cpu-cmake (#16355)

* fix ccache key for ubuntu-cpu-cmake

* set it for release as well [no ci]

2 months agocommon : disable progress bar without a tty (#16352)
Adrien Gallouët [Tue, 30 Sep 2025 17:52:41 +0000 (19:52 +0200)]
common : disable progress bar without a tty (#16352)

* common : disable progress bar without a tty

Signed-off-by: Adrien Gallouët <redacted>
* Add missing headers

Signed-off-by: Adrien Gallouët <redacted>
---------

Signed-off-by: Adrien Gallouët <redacted>
2 months agoopencl: support pad_ext (#15888)
lhez [Tue, 30 Sep 2025 17:45:45 +0000 (10:45 -0700)]
opencl: support pad_ext (#15888)

2 months agoChatapi ignore empty sampling (#16330)
Pascal [Tue, 30 Sep 2025 17:18:54 +0000 (19:18 +0200)]
Chatapi ignore empty sampling (#16330)

* fix: skip empty sampling fields instead of coercing to 0 in chat API options

* chore: update webui build output

2 months agoggml webgpu: support for rope,div,sub,glu,scale,cont operators (#16187)
Reese Levine [Tue, 30 Sep 2025 16:57:51 +0000 (09:57 -0700)]
ggml webgpu: support for rope,div,sub,glu,scale,cont operators (#16187)

* Work on rope

* Simplify inplace operation generation and combine mul/add generation

* Work on rope variants

* implement neox rope

* rope complete

* Add sub,div,glu operators

* implement scale op

* Update cpy shader to handle cont/more types

* formatting

* Update test vars printing for rope,rms_norm

* Avoid ROPE hardcoded constants

* Add TODO to change ROPE constants to enum

Co-authored-by: Georgi Gerganov <redacted>
* fix TODO comment

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoopencl: support ne3 in get_rows (#15866)
lhez [Tue, 30 Sep 2025 16:55:13 +0000 (09:55 -0700)]
opencl: support ne3 in get_rows (#15866)

2 months agocommon : remove common_has_curl() (#16351)
Adrien Gallouët [Tue, 30 Sep 2025 14:39:44 +0000 (16:39 +0200)]
common : remove common_has_curl() (#16351)

`test-arg-parser.cpp` has been updated to work consistently,
regardless of whether CURL or SSL support is available, and
now always points to `ggml.ai`.

The previous timeout test has been removed, but it can be
added back by providing a dedicated URL under `ggml.ai`.

Signed-off-by: Adrien Gallouët <redacted>
2 months agoci : disable ccache for android (#16348)
Sigbjørn Skjæret [Tue, 30 Sep 2025 13:38:01 +0000 (15:38 +0200)]
ci : disable ccache for android (#16348)

2 months agoggml : bump version to 0.9.4 (ggml/1363)
Georgi Gerganov [Tue, 30 Sep 2025 10:42:39 +0000 (13:42 +0300)]
ggml : bump version to 0.9.4 (ggml/1363)

2 months agocuda : Enable CUDA Graph usage for Nemotron Nano v2 (NemotronH) (#16328)
anavp-nvidia [Tue, 30 Sep 2025 08:13:22 +0000 (08:13 +0000)]
cuda : Enable CUDA Graph usage for Nemotron Nano v2 (NemotronH) (#16328)

* Fix Nemotron Nano v2 9B not executing as CUDA Graph on NVIDIA GPUs

* fix to ensure test-backend-ops check passes

2 months agometal : dynamic simdgroups for MV kernels (#16340)
Georgi Gerganov [Tue, 30 Sep 2025 08:03:23 +0000 (11:03 +0300)]
metal : dynamic simdgroups for MV kernels (#16340)

* metal : dynamic simdgroups for MV kernels

* cont : minor

2 months agocommon : simplify etag tracking by removing json (#16342) upstream/0.0.6641
Adrien Gallouët [Tue, 30 Sep 2025 07:36:33 +0000 (09:36 +0200)]
common : simplify etag tracking by removing json (#16342)

The JSON parser is temporarily kept only for backward compatibility. It
reads the etag from old .json files to prevent unnecessary re-downloads
for existing users.

This legacy code can be removed in a future version.

Signed-off-by: Adrien Gallouët <redacted>
2 months agokleidiai : fix work size and threads sync for fp16 (#16246)
Charles Xu [Tue, 30 Sep 2025 07:07:20 +0000 (09:07 +0200)]
kleidiai : fix work size and threads sync for fp16 (#16246)