]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 months agoconvert : allow quantizing lora again (#17453)
Sigbjørn Skjæret [Mon, 24 Nov 2025 14:50:55 +0000 (15:50 +0100)]
convert : allow quantizing lora again (#17453)

2 months agoserver: split server.cpp code into server/common/task/queue (#17362)
Xuan-Son Nguyen [Mon, 24 Nov 2025 13:41:53 +0000 (14:41 +0100)]
server: split server.cpp code into server/common/task/queue (#17362)

* add server-task, server-common

* add server-queue

* rm redundant includes

* move enum stop_type to server-task

* server : headers cleanup

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoexamples : add -kvu to batched usage example [no ci] (#17469)
Daniel Bevenius [Mon, 24 Nov 2025 13:38:45 +0000 (14:38 +0100)]
examples : add -kvu to batched usage example [no ci] (#17469)

This commit adds the --kv-unified flag to the usage example
in the README.md file for the batched example.

The motivation for this is that without this flag the example will fail
with the following error:
```console
Hello my name is
split_equal: sequential split is not supported when there are coupled
sequences in the input batch (you may need to use the -kvu flag)
decode: failed to find a memory slot for batch of size 4
main: llama_decode() failed
```

2 months agosync : ggml
Georgi Gerganov [Mon, 24 Nov 2025 12:28:37 +0000 (14:28 +0200)]
sync : ggml

2 months agoggml : remove dirty flag from version string (ggml/1391)
Daniel Bevenius [Mon, 24 Nov 2025 11:51:50 +0000 (12:51 +0100)]
ggml : remove dirty flag from version string (ggml/1391)

This commit removes the "-dirty" suffix from the GGML version string.

The motivation for this change is to ensure that the version string
works with different ways of checking out ggml and using it in projects.
By removing the dirty flag from the version string, we avoid potential
artifacts like shared libraries getting a -dirty suffix in their names.

Instead, if the project is built from a dirty git state, the dirty flag
will be appended to the commit hash in the GGML_BUILD_COMMIT variable.
This will enable users to still identify that the build was made from
from a modified/dirty state even though the version might match a "real"
version.

For example, the commit can be produces as follows:
```c++
    printf("commit: %s\n", ggml_commit());
```
Which would print the following for a dirty build:
```console
commit: 781baf2a-dirty
```

Refs: https://github.com/ggml-org/ggml/pull/1363#issuecomment-3569691546

2 months agoggml-cpu: arm64: q4_K repack gemm and gemv implementations (i8mm) (#16739)
Alberto Cabrera Pérez [Mon, 24 Nov 2025 11:08:11 +0000 (11:08 +0000)]
ggml-cpu: arm64: q4_K repack gemm and gemv implementations (i8mm) (#16739)

* Enabled q4_K_8x8_q8_K path on ARM

* wip: I8mm qs multiplication, pending bias

* cpu : arm : REPACK gemm q4_K8x8 implementation

Signed-off-by: Alberto Cabrera <redacted>
* Guard gemm with proper features, improved superblock scale and min calc

Signed-off-by: Alberto Cabrera <redacted>
* cpu: arm: Implemented REPACK gemv for Q4_K

Signed-off-by: Alberto Cabrera <redacted>
* Removed completed TODO

* Fixed missing guards when selecting optimal repack type for Q4_K

Signed-off-by: Alberto Cabrera <redacted>
* Fixed macro guard for gemv

* Fixed wrong comment in GEMV

* Fixed warning for unused variable

* vdotq_s32 -> ggml_vdotq_s32

Signed-off-by: Alberto Cabrera <redacted>
* Clang-format issues

* Apply suggestions from code review

Co-authored-by: Diego Devesa <redacted>
* Removed unnecessary GGML_UNUSED

* Fixed guards in q4_k gemm and gemv (repack)

---------

Signed-off-by: Alberto Cabrera <redacted>
Co-authored-by: Diego Devesa <redacted>
2 months agoggml: add RISC-V cpu-feats (#17461)
ixgbe [Mon, 24 Nov 2025 11:07:14 +0000 (19:07 +0800)]
ggml: add RISC-V cpu-feats (#17461)

* ggml: add RISC-V cpu-feats

Signed-off-by: Wang Yang <redacted>
* fix comment[1]

---------

Signed-off-by: Wang Yang <redacted>
2 months agomodels : Added support for RND1 Diffusion Language Model (#17433)
william pan [Mon, 24 Nov 2025 06:16:56 +0000 (22:16 -0800)]
models : Added support for RND1 Diffusion Language Model  (#17433)

* Converted RND1 model to GGUF weights

* RND1 llama.cpp support v1

* RND1 llama.cpp support v2 non causal bug

* RND1 llama.cpp support v3 doccumentation

* RND1 llama.cpp support v4 clean code

* linting issues

* RND1 pr fixes v1

* RND1 pr fixes v2

Co-authored-by: Sigbjørn Skjæret <redacted>
* Diffusion documentation edits

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agohexagon: add support for ROPE_NEOX (#17458)
Max Krasnyansky [Mon, 24 Nov 2025 02:55:56 +0000 (18:55 -0800)]
hexagon: add support for ROPE_NEOX (#17458)

2 months agoCANN: Define `cann_graph_update_required` before macro (#17434)
Raul Torres [Mon, 24 Nov 2025 02:02:52 +0000 (02:02 +0000)]
CANN: Define `cann_graph_update_required` before macro (#17434)

**Description of the problem**

`cann_graph_update_required` is redundantly defined and
initialized as `false` inside two mutually exclusive macro branches.

**Proposed solution**

Define it right before the macro so that it could serve both
branches.

2 months agoggml-hexagon: Initial Hexagon v68/v69 support (#17394)
M. Mediouni [Mon, 24 Nov 2025 00:54:49 +0000 (01:54 +0100)]
ggml-hexagon: Initial Hexagon v68/v69 support  (#17394)

* ggml-hexagon: fix build error with GCC

Add stdexcept include to fix GCC build errors

Signed-off-by: Mohamed Mediouni <redacted>
* ggml-hexagon: check VTCM acquire failures

Signed-off-by: Mohamed Mediouni <redacted>
* ggml-hexagon: disable destination bypass on older than v73

v68 errors out if having bypass enabled when the VTCM is the destination.

At least on v68 this made things actually work... not a proper fix though, so to look at later...

Signed-off-by: Mohamed Mediouni <redacted>
* ggml-hexagon: add initial v68/v69 support

v68 is the Hexagon revision notably used on the Snapdragon 8cx
Gen 3 and the QCM6490.

Also add support for v69.

8MB isn't a supported page size, so relax asked for page size constraint
for HAP_compute_res_attr_set_vtcm_param_v2 to optimal.

Signed-off-by: Mohamed Mediouni <redacted>
---------

Signed-off-by: Mohamed Mediouni <redacted>
2 months agoggml-hexagon: add `hex_supported_buffer` for better buffer supported check (#17212)
nullname [Sun, 23 Nov 2025 22:26:36 +0000 (06:26 +0800)]
ggml-hexagon: add `hex_supported_buffer` for better buffer supported check (#17212)

* hexagon: add buffer support checks for hexagon sessions

* refactor: simplify buffer support checks in hexagon operations

* hexagon: update buffer support checks to use tensor structure

* refactor: streamline buffer initialization for DSP queue in hexagon operations

* refactor: simplify buffer initialization in DSP queue for hexagon operations

* refactor: optimize hex_supported_buffer function by fold expression

* wip

* refactor: simplify dspqueue_buffers_init function and its usage in hexagon operations

* fix: improve nan handling at hvx_vec_fast_sigmoid_fp32_guard

* refactor: optimize hvx_vec_inverse_fp32_guard for better nan handling

* refactor: update hvx_vec_fast_sigmoid_fp32_guard to use adjusted exponent limits

* refactor: modify hvx_vec_fast_sigmoid_fp32_guard to accept parameters for improved flexibility

* refactor: update hvx_vec_exp_fp32_guard to accept max_exp and inf parameters to save some instructions

* refactor: move hvx_vec_inverse_fp32_guard implementation to hvx-inverse.c for better perf

2 months agowebui: minor settings reorganization and add disable autoscroll option (#17452)
Pascal [Sun, 23 Nov 2025 17:42:00 +0000 (18:42 +0100)]
webui: minor settings reorganization and add disable autoscroll option (#17452)

* webui: added a dedicated 'Display' settings section that groups visualization options

* webui: added a Display setting to toggle automatic chat scrolling

* chore: update webui build output

2 months agocuda : support non-contiguous i32 to i32 copy (#17326)
Sigbjørn Skjæret [Sun, 23 Nov 2025 10:13:34 +0000 (11:13 +0100)]
cuda : support non-contiguous i32 to i32 copy (#17326)

* support non-contiguous i32 to i32 copy

* add tests

* rename cpy_flt to cpy_scalar and reindent params

2 months agovulkan: Update docker image to Ubuntu 26.04 to enable glslc features (#17439)
Eric Curtin [Sun, 23 Nov 2025 09:29:36 +0000 (09:29 +0000)]
vulkan: Update docker image to Ubuntu 26.04 to enable glslc features (#17439)

26.04 provides these

Signed-off-by: Eric Curtin <redacted>
2 months agovulkan: remove a couple unnecessary switches (#17419)
Jeff Bolz [Sun, 23 Nov 2025 05:29:40 +0000 (23:29 -0600)]
vulkan: remove a couple unnecessary switches (#17419)

2 months agoci : switch to BoringSSL on Server workflow (#17441)
Adrien Gallouët [Sat, 22 Nov 2025 20:38:19 +0000 (21:38 +0100)]
ci : switch to BoringSSL on Server workflow (#17441)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoRevive MUL_MAT_ID to perf testing (#17397)
Masato Nakasaka [Sat, 22 Nov 2025 09:55:43 +0000 (18:55 +0900)]
Revive MUL_MAT_ID to perf testing (#17397)

2 months agoHIP: RDNA4 tensor core support for MMF (#17077)
yulo [Fri, 21 Nov 2025 23:03:24 +0000 (07:03 +0800)]
HIP: RDNA4 tensor core support for MMF (#17077)

* mmf for rdna4

* align the padding for rdna4

* forbit mul_mat_f for rdna4

* fix as comment

* remove device kernels

* add constexpr for early return

* update based on review comment

* change based on the review comment

* pass compile error

* keep code consistency

---------

Co-authored-by: zhang hui <redacted>
2 months agoopencl: refine condition for kqv mm (#17392)
lhez [Fri, 21 Nov 2025 22:34:48 +0000 (14:34 -0800)]
opencl: refine condition for kqv mm (#17392)

2 months agomodel : detect GigaChat3-10-A1.8B as deepseek lite (#17420)
ubergarm [Fri, 21 Nov 2025 13:51:38 +0000 (08:51 -0500)]
model : detect GigaChat3-10-A1.8B as deepseek lite (#17420)

* Detect GigaChat3-10-A1.8B as deepseek lite

Hardcodes checking number of layers to detect if lite version of deepseek.

* Add commnent identifying deepseek lite variants

deepseek lite variants include DeepSeek-V2-Lite, GigaChat3-10B-A1.8B

2 months agocmake : add option to build and link BoringSSL (#17205)
Adrien Gallouët [Fri, 21 Nov 2025 10:46:45 +0000 (11:46 +0100)]
cmake : add option to build and link BoringSSL (#17205)

* cmake: add option to build and link BoringSSL

Signed-off-by: Adrien Gallouët <redacted>
* cmake : fix typo

Signed-off-by: Adrien Gallouët <redacted>
* cmake : disable boringssl test and asm by default

Signed-off-by: Adrien Gallouët <redacted>
* cmake : skip bssl

Signed-off-by: Adrien Gallouët <redacted>
* cmake : disable fips

Signed-off-by: Adrien Gallouët <redacted>
* cmake : fix cmake --install

Signed-off-by: Adrien Gallouët <redacted>
* ci : use boringssl for windows and mac

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

Signed-off-by: Adrien Gallouët <redacted>
2 months agoci : start using OpenSSL (#17235)
Adrien Gallouët [Fri, 21 Nov 2025 10:45:00 +0000 (11:45 +0100)]
ci : start using OpenSSL (#17235)

Signed-off-by: Adrien Gallouët <redacted>
2 months agovulkan: disable async for older Intel devices (#17369)
Jeff Bolz [Fri, 21 Nov 2025 08:58:17 +0000 (02:58 -0600)]
vulkan: disable async for older Intel devices (#17369)

* vulkan: disable async for older Intel devices

* update detection logic

* use name string for detection

2 months agoCANN: Refactor `evaluate_and_capture_cann_graph` (#17333)
Raul Torres [Fri, 21 Nov 2025 08:23:29 +0000 (08:23 +0000)]
CANN: Refactor `evaluate_and_capture_cann_graph` (#17333)

* CANN: Refactor `evaluate_and_capture_cann_graph`

**Description of the problem**

* `matched_graph` is obtained even if graph mode is disabled.
* End of graph capture and graph replay are unnecessarily placed in different `if` blocks.

**Proposed solution**

* Obtain `matched_graph` only if graph mode is enabled.
* Place end of graph capture and graph reply inside the same `if` block.
* Unify graph related comments.

* Remove trailing whitespace

2 months agoggml-hexagon: fix swiglu failure at `test-backend-ops` (#17344)
nullname [Thu, 20 Nov 2025 23:45:05 +0000 (07:45 +0800)]
ggml-hexagon: fix swiglu failure at `test-backend-ops` (#17344)

* refactor: use hvx_vec_exp_fp32_guard_inf for overflow handling in hvx_exp_f32

* feat: add fast sigmoid function with overflow guard for fp32

* refactor: replace hvx_vec_inverse_fp32 with hvx_vec_inverse_fp32_guard_inf for improved overflow handling

* feat: enhance hvx_add_scalar_f32 with overflow handling using infinity guard

* wip

* add HVX_Vector_Alias

wip

* wip

* fix: improve handling of src1 tensor in glu_swiglu_fp32_per_thread function

* fix nc

* wip

* wip

* handle nan at inverse

* wip

* fix neg

* wip

* rename

* fix hvx_vec_inverse_fp32_guard_inf to handle infinity and NaN cases correctly

* wip

* fix hvx_vec_inverse_fp32_guard_inf to handle NaN cases correctly

* wip

* wip

* wip

* fix output sign

2 months agoreadme : add Unsloth exporting to GGUF in tools (#17411)
Daniel Han [Thu, 20 Nov 2025 19:07:36 +0000 (11:07 -0800)]
readme : add Unsloth exporting to GGUF in tools (#17411)

2 months agogrammar: fix regression caused by #17381 (#17412)
Xuan-Son Nguyen [Thu, 20 Nov 2025 17:35:10 +0000 (18:35 +0100)]
grammar: fix regression caused by #17381 (#17412)

* grammar: fix regression caused by #17381

* more readable

2 months agoImproved file naming & structure for UI components (#17405)
Aleksander Grygier [Thu, 20 Nov 2025 13:07:31 +0000 (14:07 +0100)]
Improved file naming & structure for UI components (#17405)

* refactor: Component iles naming & structure

* chore: update webui build output

* refactor: Dialog titles + components namig

* chore: update webui build output

* refactor: Imports

* chore: update webui build output

2 months agogrammar : fix integer overflow (#17381)
Piotr Wilkin (ilintar) [Thu, 20 Nov 2025 12:47:04 +0000 (13:47 +0100)]
grammar : fix integer overflow (#17381)

* Fix DoS / integer overflow

* Remove optional, use INT64_MAX instead as placeholder value (it's technically -1, so it fits :)

* White space

* Actually, since it's unsigned, use UINT64_MAX

2 months agosync : ggml
Georgi Gerganov [Thu, 20 Nov 2025 12:09:48 +0000 (14:09 +0200)]
sync : ggml

2 months agometal : fix compile on macos 11 (whisper/3533)
YangLe [Thu, 20 Nov 2025 11:54:54 +0000 (19:54 +0800)]
metal : fix compile on macos 11 (whisper/3533)

2 months agocommon : more accurate sampling timing (#17382)
Georgi Gerganov [Thu, 20 Nov 2025 11:40:10 +0000 (13:40 +0200)]
common : more accurate sampling timing (#17382)

* common : more accurate sampling timing

* eval-callback : minor fixes

* cont : add time_meas impl

* cont : fix log msg [no ci]

* cont : fix multiple definitions of time_meas

* llama-cli : exclude chat template init from time measurement

* cont : print percentage of unaccounted time

* cont : do not reset timings

2 months agoconvert : fix TypeError when loading base model remotely in convert_lora_to_gguf...
o7si [Thu, 20 Nov 2025 11:30:12 +0000 (19:30 +0800)]
convert : fix TypeError when loading base model remotely in convert_lora_to_gguf (#17385)

* fix: TypeError when loading base model remotely in convert_lora_to_gguf

* refactor: simplify base model loading using cache_dir from HuggingFace

* Update convert_lora_to_gguf.py

Co-authored-by: Sigbjørn Skjæret <redacted>
* feat: add remote_hf_model_id to trigger lazy mode in LoRA converter

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoggml : Fix transposed SOLVE_TRI result (#17323)
Piotr Wilkin (ilintar) [Thu, 20 Nov 2025 10:58:21 +0000 (11:58 +0100)]
ggml : Fix transposed SOLVE_TRI result (#17323)

* Did someone transpose the SOLVE_TRI result matrix? Perhaps...

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

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

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

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoDGX Spark: UMA support (#17368)
Scott Fudally [Thu, 20 Nov 2025 10:32:02 +0000 (02:32 -0800)]
DGX Spark: UMA support (#17368)

* DGX Spark: UMA support

* Updates from PR feedback

* More PR feedback cleanup

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

Co-authored-by: Georgi Gerganov <redacted>
* Remove trailing whitespace

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

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoggml : remove useless and error-prone variadic macros (#17399)
Adrien Gallouët [Thu, 20 Nov 2025 10:18:27 +0000 (11:18 +0100)]
ggml : remove useless and error-prone variadic macros (#17399)

Signed-off-by: Adrien Gallouët <redacted>
2 months agokleidiai: fix zero-size array declaration (#17240)
sudhiarm [Thu, 20 Nov 2025 09:45:49 +0000 (09:45 +0000)]
kleidiai: fix zero-size array declaration (#17240)

2 months agoggml-cpu:add RISC-V RVV (Zvfh) optimization for FP16 vector scaling (#17314)
ixgbe [Thu, 20 Nov 2025 06:09:18 +0000 (14:09 +0800)]
ggml-cpu:add RISC-V RVV (Zvfh) optimization for FP16 vector scaling (#17314)

* ggml-cpu:add RISC-V RVV (Zvfh) optimization for FP16 vector scaling

Signed-off-by: Wang Yang <redacted>
* fix comment

* fix comment 2

---------

Signed-off-by: Wang Yang <redacted>
2 months agovulkan: implement ADD1, ARANGE, FILL, SOFTPLUS, STEP, ROUND, CEIL, FLOOR, TRUNC ...
Giuseppe Scrivano [Wed, 19 Nov 2025 16:29:45 +0000 (17:29 +0100)]
vulkan: implement ADD1, ARANGE, FILL, SOFTPLUS, STEP, ROUND, CEIL, FLOOR, TRUNC (#17319)

* vulkan: initialize array

* vulkan: implement ADD1

* vulkan: implement ARANGE

* vulkan: implement FILL

* vulkan: implement SOFTPLUS

* vulkan: implement STEP

* vulkan: implement ROUND

* vulkan: implement CEIL

* vulkan: implement FLOOR

* vulkan: implement TRUNC

* docs: update Vulkan ops

Signed-off-by: Giuseppe Scrivano <redacted>
2 months agovulkan: support larger argsort (#17313)
Jeff Bolz [Wed, 19 Nov 2025 16:25:50 +0000 (10:25 -0600)]
vulkan: support larger argsort (#17313)

* vulkan: support larger argsort

This is an extension of the original bitonic sorting shader that puts the
temporary values in global memory and when more than 1024 threads are needed
it runs multiple workgroups and synchronizes through a pipelinebarrier.

To improve the memory access pattern, a copy of the float value is kept with
the index value. I've applied this same change to the original shared memory
version of the shader, which is still used when ncols <= 1024.

* Reduce the number of shader variants. Use smaller workgroups when doing a single pass, for a modest perf boost

* reduce loop overhead

* run multiple cols per invocation, to reduce barrier overhead

2 months agovulkan: Add copy_transpose shader (#17371)
Jeff Bolz [Wed, 19 Nov 2025 15:50:43 +0000 (09:50 -0600)]
vulkan: Add copy_transpose shader (#17371)

2 months agowebui: Add a "Continue" Action for Assistant Message (#16971)
Aleksander Grygier [Wed, 19 Nov 2025 13:39:50 +0000 (14:39 +0100)]
webui: Add a "Continue" Action for Assistant Message (#16971)

* feat: Add "Continue" action for assistant messages

* feat: Continuation logic & prompt improvements

* chore: update webui build output

* feat: Improve logic for continuing the assistant message

* chore: update webui build output

* chore: Linting

* chore: update webui build output

* fix: Remove synthetic prompt logic, use the prefill feature by sending the conversation payload ending with assistant message

* chore: update webui build output

* feat: Enable "Continue" button based on config & non-reasoning model type

* chore: update webui build output

* chore: Update packages with `npm audit fix`

* fix: Remove redundant error

* chore: update webui build output

* chore: Update `.gitignore`

* fix: Add missing change

* feat: Add auto-resizing for Edit Assistant/User Message textareas

* chore: update webui build output

2 months agoconvert : use self.block_count everywhere instead of reading hparams (#17359)
Sigbjørn Skjæret [Wed, 19 Nov 2025 10:52:38 +0000 (11:52 +0100)]
convert : use self.block_count everywhere instead of reading hparams (#17359)

2 months agocuda: fix rope fusion for gemma3 (#17378)
Aman Gupta [Wed, 19 Nov 2025 10:25:05 +0000 (18:25 +0800)]
cuda: fix rope fusion for gemma3 (#17378)

2 months agoFix too relaxed check on CUDA "fast copy" (can_be_transposed) condition (#17332)
Piotr Wilkin (ilintar) [Wed, 19 Nov 2025 09:36:33 +0000 (10:36 +0100)]
Fix too relaxed check on CUDA "fast copy" (can_be_transposed) condition (#17332)

* Fix too relaxed check on CUDA "fast copy" (can_be_transposed) condition

* Argh.

* Making CISC happy ;)

* Integrate CONT tests

* Use loopy loop

* Skip new tests for (B)F16 for now.

2 months agovulkan: force full subgroups for flash attention to fix intel subgroup crash (#17356)
Ruben Ortlam [Wed, 19 Nov 2025 07:46:26 +0000 (08:46 +0100)]
vulkan: force full subgroups for flash attention to fix intel subgroup crash (#17356)

2 months agoggml-cpu: Don't pass -mpowerpc64 when -mcpu already implies it (#17308)
Jeremy Rand [Wed, 19 Nov 2025 06:19:00 +0000 (06:19 +0000)]
ggml-cpu: Don't pass -mpowerpc64 when -mcpu already implies it (#17308)

2 months agochat: fix int overflow, prevent size calculation in float/double (#17357)
Xuan-Son Nguyen [Tue, 18 Nov 2025 18:11:53 +0000 (19:11 +0100)]
chat: fix int overflow, prevent size calculation in float/double (#17357)

* chat: fix int overflow, prevent size calculation in float/double

* Update common/chat.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
2 months agovocab : call reserve() for building plamo-2-translate suffix (#17343)
Haiyue Wang [Tue, 18 Nov 2025 17:58:22 +0000 (01:58 +0800)]
vocab : call reserve() for building plamo-2-translate suffix (#17343)

Test 'Q4_K_M' quantization on https://huggingface.co/pfnet/plamo-2-translate

The 'suffix_to_score' size is 193510, it needs 19 memory allocation with final
capacity 262144 to hold the value, if not preserve the memory.

Signed-off-by: Haiyue Wang <redacted>
2 months agocommon : Generalized XML-style tool-call parsing with streaming support (GLM 4.5...
hksdpc255 [Tue, 18 Nov 2025 17:54:15 +0000 (04:54 +1100)]
common : Generalized XML-style tool-call parsing with streaming support (GLM 4.5/4.6 + MiniMax M2 + SeedOSS + Kimi-K2 + Qwen3-Coder + Apriel-1.5 + Xiaomi-MiMo) (#16932)

* Add files via upload

* fix unit test

* fix crashes for --reasoning-format=none

* Patch buggy official MiniMax-M2 chat template

* add upstream minja fix: https://github.com/ochafik/minja/pull/7

* Fix <think> token not generated

* add test copied from https://github.com/ggml-org/llama.cpp/pull/16946

* cleanup

* Hopes to fix the compilation error on CI

* Delete chat template patching since it’s fixed by upstream Minja

* Remove undeeded Minimax-M2 template patch

https://github.com/ochafik/minja/pull/7#issuecomment-3480356100

* Add proper handling of optional parameters with test
merged tests from: https://github.com/ggml-org/llama.cpp/pull/16946/commits/23d4bb75c485c12ac89f81c424dc03c87a640e8c

* Fix making all tool parameters optional

* Move xml tool parser to separate file

* cleanup & add tests for GLM4.5

* add streaming tests & enhancement & cleanups

Add streaming test for both GLM 4.5 and minimax-m2.
Cleanup for preserved_tokens.
Cleanup for grammar rule name.
Enhance the parser's stability.

* cleanup & add support for Kimi-K2 Qwen3-Coder Apriel-1.5 Xiaomi-MiMo

* apply suggestions from reviewers

* fix a misuse for data.grammar_lazy

* fix grammar when tool have no argument

* Fix `no triggers set for lazy grammar!` for GLM4.5/4.6. Insert additional stops for Kimi-K2

* update chat.cpp

* fix grammar for GLM 4.5/4.6

* Try fix Jinja template for GLM

* Try fix GLM-4.6.jinja

* Update common/chat-parser-xml-toolcall.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
* improve chat template for GLM, rename Kimi-K2 template to Kimi-K2-Thinking

* Improve Kimi-K2 chat template

* Fix unit test

* Fix "Invalid tool call arguments passed" in a rare case.

In a rare case, the model may emit a raw string that begins with a valid JSON string. This commit adds unit tests to cover that scenario and fixes the regression introduced during the Kimi-K2 adaptation.

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoci : change the openEuler-310p image to fix release (#17361)
jiahao su [Tue, 18 Nov 2025 17:10:23 +0000 (01:10 +0800)]
ci : change the openEuler-310p image to fix release (#17361)

2 months agogitignore : be more specific about ignored stuff (#17354)
Georgi Gerganov [Tue, 18 Nov 2025 14:44:53 +0000 (16:44 +0200)]
gitignore : be more specific about ignored stuff (#17354)

2 months agoCANN: fix acl_tensor_ptr usage in ASCEND_310P ROPE (#17347)
Chenguang Li [Tue, 18 Nov 2025 08:41:52 +0000 (16:41 +0800)]
CANN: fix acl_tensor_ptr usage in ASCEND_310P ROPE (#17347)

* cann: fix acl_tensor_ptr usage in ASCEND_310P ROPE implementation

Fix compilation errors in the ASCEND_310P-specific ROPE operation code
by adding .get() calls when passing acl_tensor_ptr smart pointers to
functions expecting raw aclTensor* pointers.

This fixes the code that was missed in the previous refactoring commit
(8981848) which changed ggml_cann_create_tensor() return type from
aclTensor* to acl_tensor_ptr.

* cann: format code

2 months agofix: resolve undefined variable 'svr' compilation error (#17348)
o7si [Tue, 18 Nov 2025 08:10:47 +0000 (16:10 +0800)]
fix: resolve undefined variable 'svr' compilation error (#17348)

2 months agoCANN: Add openEuler-cann in build and release (#17192)
jiahao su [Tue, 18 Nov 2025 08:08:55 +0000 (16:08 +0800)]
CANN: Add openEuler-cann in build and release (#17192)

Update openEuler version

Remove variable ASCEND_SOC_TYPE

Modify the chip type

Fix case in zip filename

Change "device" to "chip_type"

Modify the value of chip_type

2 months agovulkan: support noncontig i32 copy (#17328)
Jeff Bolz [Tue, 18 Nov 2025 06:41:24 +0000 (00:41 -0600)]
vulkan: support noncontig i32 copy (#17328)

2 months agoserver: split HTTP into its own interface (#17216)
Xuan-Son Nguyen [Mon, 17 Nov 2025 21:05:44 +0000 (22:05 +0100)]
server: split HTTP into its own interface (#17216)

* server: split HTTP into its own interface

* move server-http and httplib to its own file

* add the remaining endpoints

* fix exception/error handling

* renaming

* missing header

* fix missing windows header

* fix error responses from http layer

* fix slot save/restore handler

* fix case where only one stream chunk is returned

* add NOMINMAX

* do not call sink.write on empty data

* use safe_json_to_str for SSE

* clean up

* add some comments

* improve usage of next()

* bring back the "server is listening on" message

* more generic handler

* add req.headers

* move the chat template print to init()

* add req.path

* cont : minor

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agovulkan: add log RTE support to fix Nvidia CI (#17320)
Ruben Ortlam [Mon, 17 Nov 2025 20:37:49 +0000 (21:37 +0100)]
vulkan: add log RTE support to fix Nvidia CI (#17320)

* vulkan: add log RTE support to fix Nvidia CI

* actually use the rte shader

2 months agocmake : fix ARM feature verification (#17170)
Adrien Gallouët [Mon, 17 Nov 2025 20:37:29 +0000 (21:37 +0100)]
cmake : fix ARM feature verification (#17170)

* cmake : fix ARM feature verification

Use check_cxx_source_compiles to prevent conflicts with
the existing GGML_NATIVE detection code.

Signed-off-by: Adrien Gallouët <redacted>
* cmake : unset __ARM_FEATURE when feature is disabled

Signed-off-by: Adrien Gallouët <redacted>
* cmake : fix scope, this is really a macro

Signed-off-by: Adrien Gallouët <redacted>
* arm_neon.h is useless

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

Signed-off-by: Adrien Gallouët <redacted>
2 months agoggml : add missing AVX512 feature checks (#17270)
Adrien Gallouët [Mon, 17 Nov 2025 11:12:00 +0000 (12:12 +0100)]
ggml : add missing AVX512 feature checks (#17270)

_mm512_cvtepu8_epi16        requires  __AVX512BW__
_mm512_srli_epi16           requires  __AVX512BW__
__builtin_ia32_inserti32x8  requires  __AVX512DQ__

Signed-off-by: Adrien Gallouët <redacted>
2 months agometal : support I32 -> I32 copy (#17317)
Georgi Gerganov [Mon, 17 Nov 2025 09:52:00 +0000 (11:52 +0200)]
metal : support I32 -> I32 copy (#17317)

2 months agometal : faster argsort (#17315)
Georgi Gerganov [Mon, 17 Nov 2025 09:51:48 +0000 (11:51 +0200)]
metal : faster argsort (#17315)

* metal : faster argsort

* cont : keep data in registers

2 months agometal : add cumsum (#17305)
Georgi Gerganov [Mon, 17 Nov 2025 09:51:13 +0000 (11:51 +0200)]
metal : add cumsum (#17305)

2 months agoCANN: Use smart pointers to manage ACL objects (#17238)
hipudding [Mon, 17 Nov 2025 00:43:59 +0000 (08:43 +0800)]
CANN: Use smart pointers to manage ACL objects (#17238)

* CANN: Use smart pointers to manage ACL objects

Previously, ACL objects were managed via manual destruction, which
led to multiple memory-leak issues during runtime. This patch replaces
manual memory management with smart pointers so that ACL objects
are properly released and ownership is clearly defined.

Note that the ownership of an ACL object belongs to the function
that creates it. Other internal functions should operate on these ACL
objects using raw pointers to avoid unintended ownership transfers.

Additionally, since aclTensorList automatically frees its contained
aclTensor objects, any aclTensor added to a tensor list must release
ownership to avoid double free operations.

This PR also removes the asynchronous task submission mechanism.
Due to changes in recent CANN versions, tiling time has significantly
decreased. Even with a dual-thread submission model, the dispatch
overhead still falls on the critical path, making async submission
less beneficial. Moreover, aclGraph support provides a much better
path to reducing operator dispatch latency.

* CANN: resolve review comments

2 months agovulkan: add LOG operation support for F32 and F16 (#17183)
Pavels Zaicenkovs [Sun, 16 Nov 2025 21:50:09 +0000 (22:50 +0100)]
vulkan: add LOG operation support for F32 and F16 (#17183)

* vulkan: add LOG operation support for F32 and F16

Part of #14909.

* vulkan: Fix LOG operation types

* docs: Update operation support documentation for Vulkan LOG operation

* vulkan: fix log_f16 shader

* docs: restore missing LOG test cases and regenerate ops.md

2 months agovulkan: fix MMQ quantize_y condition (#17301)
Ruben Ortlam [Sun, 16 Nov 2025 18:38:17 +0000 (19:38 +0100)]
vulkan: fix MMQ quantize_y condition (#17301)

2 months agoci : revert #16249 (#17303)
Eve [Sun, 16 Nov 2025 18:09:17 +0000 (18:09 +0000)]
ci : revert #16249 (#17303)

* Delete .github/workflows/build-amd.yml

* Update build.yml

2 months agometal : remove obosolete asserts (#17295)
Georgi Gerganov [Sun, 16 Nov 2025 07:50:26 +0000 (09:50 +0200)]
metal : remove obosolete asserts (#17295)

2 months agoserver : handle context overflow during decode (#17267)
Georgi Gerganov [Sun, 16 Nov 2025 07:23:37 +0000 (09:23 +0200)]
server : handle context overflow during decode (#17267)

* server : handle context overflow during decode

* server : minor refactor

2 months agoopencl: fix rms_norm_mul (#17250)
lhez [Sun, 16 Nov 2025 01:40:14 +0000 (17:40 -0800)]
opencl: fix rms_norm_mul (#17250)

* opencl: use subgrroup reduce for reduction in rms_norm_mul

* opencl: add comment about workgroup size

2 months agoopencl: add kernel to handle mat mul in attention to improve encoding speed (#17181)
shaofeiqi [Sun, 16 Nov 2025 01:33:10 +0000 (17:33 -0800)]
opencl: add kernel to handle mat mul in attention to improve encoding speed (#17181)

* Add mul_mm_f16_f32_kq_kqv kernel

* Add ggml_cl_mul_mat_kq_kqv_adreno func

* fix whitespace

* remove unused variable

* remove redundant

* refactor and clean up

* remove trailing whitespace

2 months agosycl : unify unary kernels with a generic implementation and enable wide operator...
shani-f [Sat, 15 Nov 2025 23:52:42 +0000 (01:52 +0200)]
sycl : unify unary kernels with a generic implementation and enable wide operator support (#17213)

* SYCL: add generic unary op implementation for multiple ops (ABS/SGN/…); unify non-contiguous access

* SYCL: update documentation and sycl.csv to reflect new unary op support

* update ops.md after syncing SYCL.csv changes

* Fix SYCL.csv merge conflict

* Update ops.md after fixing SYCL.csv conflicts

* Fix SYCL.csv tail after merge conflict and regenerate ops.md

* Fix line endings and final newline in SYCL.csv

* Remove TOPK_MOE entries from SYCL.csv as requested

* Update ops.md after removing TOPK_MOE from SYCL.csv

* Regenerated SYCL.csv and synced ops.md with upstream

* Update ops.md using create_ops_docs.py

2 months agowebui: Fix clickability around chat processing statistics UI (#17278)
Aleksander Grygier [Sat, 15 Nov 2025 21:41:41 +0000 (22:41 +0100)]
webui: Fix clickability around chat processing statistics UI (#17278)

* fix: Better pointer events handling in chat processing info elements

* chore: update webui build output

2 months agowebui: add OAI-Compat Harmony tool-call streaming visualization and persistence in...
Pascal [Sat, 15 Nov 2025 20:09:32 +0000 (21:09 +0100)]
webui: add OAI-Compat Harmony tool-call streaming visualization and persistence in chat UI (#16618)

* webui: add OAI-Compat Harmony tool-call live streaming visualization and persistence in chat UI

- Purely visual and diagnostic change, no effect on model context, prompt
  construction, or inference behavior

- Captured assistant tool call payloads during streaming and non-streaming
  completions, and persisted them in chat state and storage for downstream use

- Exposed parsed tool call labels beneath the assistant's model info line
  with graceful fallback when parsing fails

- Added tool call badges beneath assistant responses that expose JSON tooltips
  and copy their payloads when clicked, matching the existing model badge styling

- Added a user-facing setting to toggle tool call visibility to the Developer
  settings section directly under the model selector option

* webui: remove scroll listener causing unnecessary layout updates (model selector)

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

Co-authored-by: Aleksander Grygier <redacted>
* Update tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessageAssistant.svelte

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

* chore: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
2 months agoconvert : remove unnecessary chat template patching (#17289)
Sigbjørn Skjæret [Sat, 15 Nov 2025 19:58:59 +0000 (20:58 +0100)]
convert : remove unnecessary chat template patching (#17289)

2 months agovulkan: Fuse mul_mat_id+add_id+mul and mul_mat+add+add. (#17287)
Jeff Bolz [Sat, 15 Nov 2025 18:54:23 +0000 (12:54 -0600)]
vulkan: Fuse mul_mat_id+add_id+mul and mul_mat+add+add. (#17287)

These both show up in gpt-oss. Also, cleanup the mul_mat_vec fusion code a bit.

2 months agovulkan: Replace 16-bit unpack8 calls to work around legacy Windows AMD driver bug...
Ruben Ortlam [Sat, 15 Nov 2025 14:18:58 +0000 (15:18 +0100)]
vulkan: Replace 16-bit unpack8 calls to work around legacy Windows AMD driver bug (#17285)

2 months agoconvert : use all parts in safetensors index (#17286)
Sigbjørn Skjæret [Sat, 15 Nov 2025 13:12:39 +0000 (14:12 +0100)]
convert : use all parts in safetensors index (#17286)

2 months agoconvert : set expert gating func in base class (#17279)
Sigbjørn Skjæret [Sat, 15 Nov 2025 13:06:24 +0000 (14:06 +0100)]
convert : set expert gating func in base class (#17279)

2 months agomtmd-cli: Avoid logging to stdout for model loading messages in mtmd-cli (#17277)
Ankur Verma [Sat, 15 Nov 2025 11:41:16 +0000 (03:41 -0800)]
mtmd-cli: Avoid logging to stdout for model loading messages in mtmd-cli (#17277)

2 months agovulkan: implement ABS and NEG (#17245)
Giuseppe Scrivano [Sat, 15 Nov 2025 11:00:29 +0000 (12:00 +0100)]
vulkan: implement ABS and NEG (#17245)

* docs: update Vulkan ops

* vulkan: add NEG op

* vulkan: add ABS op

---------

Signed-off-by: Giuseppe Scrivano <redacted>
2 months agovulkan: Use ggml_vk_tensor_subbuffer in mul_mat_vec(id) paths (#17244)
Jeff Bolz [Sat, 15 Nov 2025 10:56:15 +0000 (04:56 -0600)]
vulkan: Use ggml_vk_tensor_subbuffer in mul_mat_vec(id) paths (#17244)

* vulkan: Use ggml_vk_tensor_subbuffer in mul_mat_vec(id) paths

* set allow_misalign

2 months agovulkan: skip all-negative-inf blocks in FA (#17186)
Jeff Bolz [Sat, 15 Nov 2025 09:37:25 +0000 (03:37 -0600)]
vulkan: skip all-negative-inf blocks in FA (#17186)

2 months agovulkan: change graph_compute to be async and enable get_tensor_async (#17158)
Jeff Bolz [Sat, 15 Nov 2025 08:06:41 +0000 (02:06 -0600)]
vulkan: change graph_compute to be async and enable get_tensor_async (#17158)

* vulkan: change graph_compute to be async and enable get_tensor_async

This allows some additional CPU/GPU overlap for large pp workloads. Also seems
to help a bit for token gen, maybe getting rid of a small bubble between
graph_compute and get_tensor.

Async set and copy functions seem to be very rarely used, so I didn't enable
them because I didn't have a good way to test them.

The async commands need to be ordered against each other, so put them all on
the compute queue. The non-async commands still use the transfer queue.

The fence for graph_compute/get_tensor_async is submitted and waited on in
ggml_vk_synchronize.

* fix thread safety errors

* teardown context cleanly

* Handle async read to non-pinned dst

2 months agomtmd: add mtmd_log_set (#17268)
Xuan-Son Nguyen [Fri, 14 Nov 2025 14:56:19 +0000 (15:56 +0100)]
mtmd: add mtmd_log_set (#17268)

2 months agomodel : add AfmoeForCausalLM support (#16477)
Bartowski [Fri, 14 Nov 2025 12:54:10 +0000 (07:54 -0500)]
model : add AfmoeForCausalLM support (#16477)

* Add AFMOE model support

* Update to vocab

* Add model sizing

* Undo Rope change for ARCEE model

* Address review comments

* Update modeling code is_sliding -> use_rope, replace hard-coded logic

* Fix AFMOE tokenizer

* Update convert_hf_to_gguf.py

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

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update AFMoE tokenizer class identification to be more unique

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agofix : Dangling pointer for non-empty trigger words in lazy grammar construction ...
Marek Hradil jr. [Fri, 14 Nov 2025 12:35:26 +0000 (13:35 +0100)]
fix : Dangling pointer for non-empty trigger words in lazy grammar construction (#17048)

* fix : Dangling pointer for non-empty trigger words in llama_sampler_init_grammar_impl (#17047)

* Replace 'static' workaround, with keeping variable in scope for longer

* Create std::array directly and pass into llama_grammar_init_impl

* Add back the trigger pattern

* Missed array include

2 months agoserver : fix "can batch with" bug (#17263)
Georgi Gerganov [Fri, 14 Nov 2025 12:03:45 +0000 (14:03 +0200)]
server : fix "can batch with" bug (#17263)

2 months agometal : support argsort for ne00 > 1024 (#17247)
Georgi Gerganov [Fri, 14 Nov 2025 07:36:06 +0000 (09:36 +0200)]
metal : support argsort for ne00 > 1024 (#17247)

* metal : refactor argsort

* cont : sort chunks

* cont : merge sorted buckets

* cont : cleanup

2 months agometal : make the FA extra sizes consistent (#17143)
Georgi Gerganov [Fri, 14 Nov 2025 07:13:34 +0000 (09:13 +0200)]
metal : make the FA extra sizes consistent (#17143)

2 months agoreadme : add RVV,ZVFH,ZFH,ZICBOP support for RISC-V (#17259)
ixgbe [Fri, 14 Nov 2025 07:12:56 +0000 (15:12 +0800)]
readme : add RVV,ZVFH,ZFH,ZICBOP support for RISC-V (#17259)

Signed-off-by: Wang Yang <redacted>
2 months agoBetter UX for handling multiple attachments in WebUI (#17246)
Aleksander Grygier [Fri, 14 Nov 2025 00:19:08 +0000 (01:19 +0100)]
Better UX for handling multiple attachments in WebUI (#17246)

2 months agoggml-cpu: handle 3d tensors in repack mat_mul (#17241)
Alberto Cabrera Pérez [Thu, 13 Nov 2025 20:53:00 +0000 (20:53 +0000)]
ggml-cpu: handle 3d tensors in repack mat_mul (#17241)

* ggml-cpu: handle 3d tensors in repack mul_mat

* Removed unnecessary branch, removed need for <algorithm>

* Fixed dst_ptr pointer in chunk + clang_format

* GGML_ASSERT to check wdata within bounds

* Accidental ggml.h inclusion

* Improved GGML_ASSERT on wdata boundaries

* Address performance regression in Qwen and llama.cpp due to chunking

2 months agoserver: fixing naming conflict res_error (#17243)
Xuan-Son Nguyen [Thu, 13 Nov 2025 19:53:47 +0000 (20:53 +0100)]
server: fixing naming conflict res_error (#17243)

2 months agoggml : add ops SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM (#17063)
Piotr Wilkin (ilintar) [Thu, 13 Nov 2025 18:54:47 +0000 (19:54 +0100)]
ggml : add ops SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM (#17063)

* Add ops needed for new hybrid models: SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM

* Update ggml/include/ggml.h

Co-authored-by: Georgi Gerganov <redacted>
* Update tests/test-backend-ops.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Code review

* Whitespace

* Update tests/test-backend-ops.cpp

Co-authored-by: Diego Devesa <redacted>
* This is actually sigmoid, duh.

* Add CONST, remove TRI_KEEP, other changes from review

* Update tests/test-backend-ops.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml.c

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml.c

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/src/ggml-cuda/unary.cu

Co-authored-by: Aman Gupta <redacted>
* Remove extra script

* Update ggml/src/ggml.c

Co-authored-by: Diego Devesa <redacted>
* Update tests/test-backend-ops.cpp

Co-authored-by: Diego Devesa <redacted>
* moving changes from laptop [no ci]

* pre-rebase

* Update tests/test-backend-ops.cpp

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

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

* ggml : cleanup

* cont : fix ggml_fill srcs

* tests : add note

* ggml : add ggml_fill_inplace

* ggml : add asserts

* ggml : fix ggml_fill constant cast

* cont : ggml_tri minor

* Use TENSOR_LOCALS

* Fix regression from #14596, regenerate

* Don't make commits at night...

---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Diego Devesa <redacted>
Co-authored-by: Aman Gupta <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agovulkan: remove shell call from vulkan-shaders-gen tool, revert file check (#17219)
Ruben Ortlam [Thu, 13 Nov 2025 13:51:21 +0000 (14:51 +0100)]
vulkan: remove shell call from vulkan-shaders-gen tool, revert file check (#17219)

* vulkan: remove shell call from vulkan-shaders-gen tool

* use string vector for command execution

* Fix condition

* use string, remove const_cast

* Fix dependency file quotation on Windows

---------

Co-authored-by: Jeff Bolz <redacted>
2 months agosched : fix reserve ignoring user tensor assignments (#17232)
Diego Devesa [Thu, 13 Nov 2025 12:14:02 +0000 (04:14 -0800)]
sched : fix reserve ignoring user tensor assignments (#17232)

2 months agoggml-cpu : add RISC-V vector intrinsic support for silu and cvar operations (#17227)
ixgbe [Thu, 13 Nov 2025 12:13:32 +0000 (20:13 +0800)]
ggml-cpu : add RISC-V vector intrinsic support for silu and cvar operations (#17227)

Signed-off-by: Wang Yang <redacted>
2 months agometal: accelerated conv2d (#17175)
bagheera [Thu, 13 Nov 2025 11:32:44 +0000 (05:32 -0600)]
metal: accelerated conv2d (#17175)

* metal: accelerated conv2d

* cont : cleanup

---------

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