]>
git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
Mahekk Shaikh [Sun, 30 Nov 2025 00:16:28 +0000 (19:16 -0500)]
cuda : add error checking for cudaMemcpyAsync in argsort (#17599)
* cuda : add error checking for cudaMemcpyAsync in argsort (#12836)
* fix indentation
Acly [Sun, 30 Nov 2025 00:03:21 +0000 (01:03 +0100)]
vulkan : fix FA mask load with bounds check (coopmat2) (#17606)
Xuan-Son Nguyen [Sat, 29 Nov 2025 21:04:44 +0000 (22:04 +0100)]
server: move server-context to its own cpp|h (#17595)
* git mv
* add server-context.h
* add server-context.h
* clean up headers
* cont : cleanup
* also expose server_response_reader (to be used by CLI)
* fix windows build
* decouple server_routes and server_http
---------
Co-authored-by: Georgi Gerganov <redacted>
Haiyue Wang [Sat, 29 Nov 2025 17:43:29 +0000 (01:43 +0800)]
server: explicitly set the function name in lambda (#17538)
As [1] explained, the real debug message will be like:
"res operator(): operator() : queue result stop"
Set the name explicitly, the message is easy for debugging:
"res operator(): recv : queue result stop"
The left "operator()" is generated by 'RES_DBG() ... __func__'
[1]: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/lambda-function-name.html
Signed-off-by: Haiyue Wang <redacted>
Igor Smirnov [Sat, 29 Nov 2025 16:06:32 +0000 (21:06 +0500)]
common : fix json schema with '\' in literals (#17307)
* Fix json schema with '\' in literals
* Add "literal string with escapes" test
Neo Zhang [Sat, 29 Nov 2025 12:59:44 +0000 (20:59 +0800)]
sycl : support to malloc memory on device more than 4GB, update the doc and script (#17566)
Co-authored-by: Neo Zhang Jianyu <redacted>
ixgbe [Sat, 29 Nov 2025 12:56:31 +0000 (20:56 +0800)]
ggml: replace hwcap with riscv_hwprobe for RVV detection (#17567)
Signed-off-by: Wang Yang <redacted>
Ruben Ortlam [Sat, 29 Nov 2025 08:37:22 +0000 (09:37 +0100)]
Vulkan: MMVQ Integer Dot K-Quant and MUL_MAT_ID support (#16900)
* vulkan: split mul_mmq_funcs for mul_mat_vecq use
* add mxfp4 mmvq
* add q2_k mmvq
* add q3_k mmvq
* add q4_k and q5_k mmvq
* add q6_k mmvq
* handle 4x4 quants per mmvq thread
* enable MUL_MAT_ID mmvq support
* enable subgroup optimizations for mul_mat_vec_id shaders
* device tuning
* request prealloc_y sync after quantization
* fix indentation
* fix llvmpipe test failures
* fix mul_mat_id mmvq condition
* fix unused variable warning
Jeff Bolz [Sat, 29 Nov 2025 07:39:57 +0000 (01:39 -0600)]
vulkan: improve topk perf for large k, fix overflow in unit tests (#17582)
Aleksei Nikiforov [Fri, 28 Nov 2025 19:53:01 +0000 (20:53 +0100)]
gguf-py : fix passing non-native endian tensors (editor-gui and new-metadata) (#17553)
gguf_new_metadata.py reads data from reader.
Reader doesn't byteswap tensors to native endianness.
But writer does expect tensors in native endianness to convert them
into requested endianness.
There are two ways to fix this: update reader and do conversion to native endianness and back,
or skip converting endianness in writer in this particular USE-case.
gguf_editor_gui.py doesn't allow editing or viewing tensor data.
Let's go with skipping excessive byteswapping.
If eventually capability to view or edit tensor data is added,
tensor data should be instead byteswapped when reading it.
DAN™ [Fri, 28 Nov 2025 18:29:36 +0000 (13:29 -0500)]
common : move all common_chat_parse_* to chat-parser.cpp. (#17481)
o7si [Fri, 28 Nov 2025 18:14:00 +0000 (02:14 +0800)]
server: fix: /metrics endpoint returning JSON-escaped Prometheus format (#17386)
* fix: /metrics endpoint returning JSON-escaped Prometheus format
* mod: remove string overload from ok() method
Diego Devesa [Fri, 28 Nov 2025 15:33:23 +0000 (07:33 -0800)]
ggml : add GGML_SCHED_NO_REALLOC option to disable reallocations in ggml_backend_sched (#17276)
* ggml : add GGML_SCHED_NO_REALLOC option to disable reallocations in ggml_backend_sched
Enabled in ggml-ci for testing.
* llama : update worst-case graph for unified cache
* ci : disable op offload in some tests
* fix spelling
---------
Co-authored-by: Georgi Gerganov <redacted>
R0CKSTAR [Fri, 28 Nov 2025 13:08:29 +0000 (21:08 +0800)]
[MUSA] enable fp16/fast_fp16/bf16_mma on PH1 (#17551)
* [MUSA] enable fp16/fast_fp16/bf16_mma on PH1
Signed-off-by: Xiaodong Ye <redacted>
* Update ggml/src/ggml-cuda/fattn-vec.cuh
Co-authored-by: Johannes Gäßler <redacted>
* Update ggml/src/ggml-cuda/fattn-vec.cuh
Co-authored-by: Johannes Gäßler <redacted>
* Update ggml/src/ggml-cuda/fattn-tile.cuh
Co-authored-by: Johannes Gäßler <redacted>
* Address review comments
Signed-off-by: Xiaodong Ye <redacted>
---------
Signed-off-by: Xiaodong Ye <redacted>
Co-authored-by: Johannes Gäßler <redacted>
Aman Gupta [Fri, 28 Nov 2025 12:34:51 +0000 (20:34 +0800)]
ggml-cuda: add stricter checking for fusion (#17568)
* ggml-cuda: make conditions for fusion more explicit
* ggml-cuda: remove size check as std::equal already does it
Fredrik Hultin [Fri, 28 Nov 2025 11:57:04 +0000 (12:57 +0100)]
server : add Anthropic Messages API support (#17570)
* server : add Anthropic Messages API support
* remove -@pytest.mark.slow from tool calling/jinja tests
* server : remove unused code and slow/skip on test_anthropic_vision_base64_with_multimodal_model in test_anthropic_api.py
* server : removed redundant n field logic in anthropic_params_from_json
* server : use single error object instead of error_array in streaming response handler for /v1/chat/completions and use unordered_set instead of set in to_json_anthropic_stream()
* server : refactor Anthropic API to use OAI conversion
* make sure basic test always go first
* clean up
* clean up api key check, add test
---------
Co-authored-by: Xuan Son Nguyen <redacted>
Piotr Wilkin (ilintar) [Fri, 28 Nov 2025 11:02:56 +0000 (12:02 +0100)]
model : Qwen3 Next (#16095)
* Qwen3 Next - cleaned up version
* Whitespaces and stuff
* Correct minor errors
* Update src/llama-model.cpp
Co-authored-by: Sigbjørn Skjæret <redacted>
* Misc. fixes.
* Clean up code, add missing hybrid qualifier
* Did someone transpose the SOLVE_TRI result matrix? Perhaps...
* Whitespace
* Proper tensors for cb calls
* Use llama-graph.h vertical alignment
* BROKEN: chunking
* Set new tensors as inputs.
* Proper chunk logic
* It's the circle of life...
* More shenanigans for n_seq > 1
* Nail in the coffin?
* Fix Windows build
* Eh, one fails on Windows, the other fails on Mac... just use general capture.
* quant : cleanup
* model : cleanup
* qwen3 : cleanup
* cont : cleanup
* cont : cleanup
* ggml : revert change
* qwen3 : cleanup
* cont : cleanup
* Readd cmath
* qwen3 : fix typo
* Update convert_hf_to_gguf.py
Co-authored-by: Sigbjørn Skjæret <redacted>
* Usual suspects
* fix my bad suggestion
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Johannes Gäßler [Fri, 28 Nov 2025 09:29:09 +0000 (10:29 +0100)]
CUDA: no FP16 arithmetic for vector FA kernel (#17558)
Jeff Bolz [Fri, 28 Nov 2025 09:07:29 +0000 (03:07 -0600)]
vulkan: Implement GGML_OP_TRI (#17503)
* vulkan: Implement GGML_OP_TRI
* check types match
Radoslav Gerganov [Fri, 28 Nov 2025 08:33:51 +0000 (10:33 +0200)]
rpc : cache and reuse compute graphs (#15405)
Store the last computed graph and reuse it when possible.
Also do not return response from GRAPH_COMPUTE and assume it always
completes successfully. If this this is not the case, the server closes
the connection. This saves us a network round trip to the server.
yulo [Fri, 28 Nov 2025 07:24:30 +0000 (15:24 +0800)]
HIP: enable mul_mat_f for RDNA4 (#17437)
* enable mmf for rdna4
* move some mmvf to mmf
* revert lds128 for wmma loading
* Revert "revert lds128 for wmma loading"
This reverts commit
db9ae8b6b4738a5def5b393caa1611d52133e9b5 .
* Revert "enable mmf for rdna4"
This reverts commit
698c9f24187b990e35c3b73a8067e5387e6ddbd4 .
* Revert "move some mmvf to mmf"
This reverts commit
99b92bd6653cc8593607f641e44606391691792f .
* enable mul_mat for rdna4
---------
Co-authored-by: zhang hui <redacted>
Piotr Wilkin (ilintar) [Fri, 28 Nov 2025 04:15:32 +0000 (05:15 +0100)]
SOLVE_TRI CUDA kernel for small matrices (#17457)
Neo Zhang Jianyu [Fri, 28 Nov 2025 00:50:56 +0000 (08:50 +0800)]
refactor pad_reflect_1d to make the UT case pass (#17204)
Co-authored-by: Zhang Jianyu <redacted>
Jeff Bolz [Thu, 27 Nov 2025 14:48:00 +0000 (08:48 -0600)]
vulkan: Implement SOLVE_TRI (#17486)
* vulkan: Implement SOLVE_TRI
* load B matrix through shared memory
* use FLOAT_TYPE
Georgi Gerganov [Thu, 27 Nov 2025 14:34:13 +0000 (16:34 +0200)]
arch : add description about LLM_TENSOR_INFOS (#17550)
Georgi Gerganov [Thu, 27 Nov 2025 14:04:29 +0000 (16:04 +0200)]
models : fix LFM2 tensors (#17548)
matt23654 [Thu, 27 Nov 2025 11:35:35 +0000 (11:35 +0000)]
cuda : fix UMA detection on discrete GPUs. (#17537)
Alberto Cabrera Pérez [Thu, 27 Nov 2025 11:25:14 +0000 (11:25 +0000)]
ggml-cpu: aarm64: q4_K repack gemm and gemv implementations (dotprod only) (#17494)
* Enabled q4_K_4x8 path
* Fixed generic Q4_K 8x4 implementation
* wip: dotprod gemm
* Working arm q4_K dotprod gemm
Signed-off-by: Alberto Cabrera <redacted>
* Undo acc rename
Signed-off-by: Alberto Cabrera <redacted>
* Q4_K arm dotprod gemm
Signed-off-by: Alberto Cabrera <redacted>
* Fix: q4_qs reinterpret from uint to int
Signed-off-by: Alberto Cabrera <redacted>
* Removed comments
* Fixed macro guards
* Fixed unused vars in generic implementation
* Fixed unused vars in 8x4 repack
* Fixed unused vars in generic implementation, unneeded comment
* Missing arch fallback for x86
* minor : style
---------
Signed-off-by: Alberto Cabrera <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Eric Curtin [Thu, 27 Nov 2025 10:35:47 +0000 (10:35 +0000)]
devops: Add build-essential to Ubuntu 26.04 image (#17531)
This is no longer passing the build, needs more packages.
Signed-off-by: Eric Curtin <redacted>
Aleksei Nikiforov [Thu, 27 Nov 2025 10:35:38 +0000 (11:35 +0100)]
gguf-py : skip endian-conversion of MXFP4 data (#17523)
* gguf_convert_endian.py: skip MXFP4 data
* Use gguf.constants.GGML_QUANT_SIZES to determine block sizes
Acly [Thu, 27 Nov 2025 05:54:19 +0000 (06:54 +0100)]
vulkan : move contiguous checks to device_supports_op (#17490)
* vulkan : remove op_supports_incontiguous and add missing constraints in device_supports_op
* im2col: remove contraints on src0 (kernel input)
Jeff Bolz [Thu, 27 Nov 2025 05:32:30 +0000 (23:32 -0600)]
vulkan: use a fixed 1KB buffer for the add_rms_fusion opt (#17514)
Xuan-Son Nguyen [Thu, 27 Nov 2025 00:02:50 +0000 (01:02 +0100)]
server: enable jinja by default, update docs (#17524)
* server: enable jinja by default, update docs
* fix tests
lhez [Wed, 26 Nov 2025 21:29:58 +0000 (13:29 -0800)]
opencl: add sqr, sqrt, mean and ssm_conv (#17476)
* opencl: add sqr
* opencl: add sqrt
* opencl: add mean
* opencl: add ssm_conv
* opencl: add missing cl_khr_fp16
* opencl: do sqrt in f32 then convert to f16 for better precision
Alberto Cabrera Pérez [Wed, 26 Nov 2025 21:14:54 +0000 (21:14 +0000)]
Fix chunks being too small with small matrix sizes (#17526)
Han Qingzhe [Wed, 26 Nov 2025 20:44:07 +0000 (04:44 +0800)]
clip: (minicpmv) fix resampler kq_scale (#17516)
* debug:"solve minicpmv precision problem"
* “debug minicpmv”
* Apply suggestion from @ngxson
---------
Co-authored-by: Xuan-Son Nguyen <redacted>
Jeff Bolz [Wed, 26 Nov 2025 15:46:33 +0000 (09:46 -0600)]
vulkan: allow graph_optimize for prompt processing workloads (#17475)
Jeff Bolz [Wed, 26 Nov 2025 15:45:43 +0000 (09:45 -0600)]
vulkan: Implement top-k (#17418)
* vulkan: Implement top-k
Each pass launches workgroups that each sort 2^N elements (where N is usually 7-10)
and discards all but the top K. Repeat until only K are left. And there's a fast
path when K==1 to just find the max value rather than sorting.
* fix pipeline selection
* vulkan: Add N-ary search algorithm for topk
* microoptimizations
xctan [Wed, 26 Nov 2025 13:33:05 +0000 (21:33 +0800)]
ggml-cpu : add RISC-V Zvfh impl for ggml_vec_mad_f16 (#17448)
* ggml-cpu : add RISC-V Zvfh impl for ggml_vec_mad_f16
* ggml-cpu : dedup scalar impl
* Update ggml/src/ggml-cpu/vec.h
---------
Co-authored-by: Georgi Gerganov <redacted>
Adrien Gallouët [Wed, 26 Nov 2025 13:15:21 +0000 (14:15 +0100)]
cmake : use EXCLUDE_FROM_ALL to avoid patch-boringssl.cmake (#17520)
We have to separate the code path starting 3.28 because
`FetchContent_Populate` is now deprecated and will be completely removed
in a future version.
Signed-off-by: Adrien Gallouët <redacted>
Adrien Gallouët [Wed, 26 Nov 2025 13:14:41 +0000 (14:14 +0100)]
ggml : fix ARM feature verification (#17519)
On arm64 with `cmake` version 3.31.6, the final feature verification fails:
-- ARM detected flags: -mcpu=neoverse-v2+crc+sve2-aes+sve2-sha3+nossbs
-- Performing Test GGML_MACHINE_SUPPORTS_dotprod
-- Performing Test GGML_MACHINE_SUPPORTS_dotprod - Success
-- Performing Test GGML_MACHINE_SUPPORTS_i8mm
-- Performing Test GGML_MACHINE_SUPPORTS_i8mm - Success
-- Performing Test GGML_MACHINE_SUPPORTS_sve
-- Performing Test GGML_MACHINE_SUPPORTS_sve - Success
-- Performing Test GGML_MACHINE_SUPPORTS_sme
-- Performing Test GGML_MACHINE_SUPPORTS_sme - Failed
-- Performing Test GGML_MACHINE_SUPPORTS_nosme
-- Performing Test GGML_MACHINE_SUPPORTS_nosme - Success
-- Checking for ARM features using flags:
-- -U__ARM_FEATURE_SME
-- -mcpu=neoverse-v2+crc+sve2-aes+sve2-sha3+nossbs+dotprod+i8mm+sve+nosme
-- Performing Test HAVE_DOTPROD
-- Performing Test HAVE_DOTPROD - Failed
-- Performing Test HAVE_SVE
-- Performing Test HAVE_SVE - Failed
-- Performing Test HAVE_MATMUL_INT8
-- Performing Test HAVE_MATMUL_INT8 - Failed
-- Performing Test HAVE_FMA
-- Performing Test HAVE_FMA - Success
-- Performing Test HAVE_FP16_VECTOR_ARITHMETIC
-- Performing Test HAVE_FP16_VECTOR_ARITHMETIC - Failed
-- Performing Test HAVE_SME
-- Performing Test HAVE_SME - Failed
-- Adding CPU backend variant ggml-cpu: -U__ARM_FEATURE_SME;-mcpu=neoverse-v2+crc+sve2-aes+sve2-sha3+nossbs+dotprod+i8mm+sve+nosme
We need to explicitly replace `;` with spaces from the list to make
`CMAKE_REQUIRED_FLAGS` work correctly...
Signed-off-by: Adrien Gallouët <redacted>
Jiacheng (Jason) Chen [Wed, 26 Nov 2025 10:18:48 +0000 (05:18 -0500)]
HIP: Patch failed testcase in WMMA-MMQ kernels for RDNA 4 (#17502)
* patch failed test case MUL_MAT(type_a=q4_0,type_b=f32,m=576,n=512,k=576,bs=[1,1],nr=[1,1],per=[0,1,2,3],k_v=0,o=1) for enabling WMMA on RDNA4
* Quick clean up on mma.cuh to add ggml_cuda_memcpy_1 back in for half2 and bfloat162
hipudding [Wed, 26 Nov 2025 08:44:19 +0000 (16:44 +0800)]
CANN: Add MROPE and IMROPE support (#17401)
* CANN: ROPE supports both MROPE and IMROPE.
1. Optimize the caching logic of rope_cache_init.
2. Add support for mRoPE and i-mRoPE.
Note that on Ascend 910B devices, it is necessary to disable FA
in CLIP and disable NZ-format conversion. These two issues are
still under investigation.
* Resolve review comments
o7si [Wed, 26 Nov 2025 07:21:06 +0000 (15:21 +0800)]
chore: upgrade cpp-httplib from v0.27.0 to v0.28.0 (#17513)
Jeff Bolz [Wed, 26 Nov 2025 06:08:10 +0000 (00:08 -0600)]
vulkan: Implement GGML_OP_CUMSUM (#17479)
Georgi Gerganov [Tue, 25 Nov 2025 13:31:43 +0000 (15:31 +0200)]
ggml : add ggml_top_k (#17365)
* ggml : add ggml_top_k
* cont : add ggml_argsort_top_k
* metal : add top_k support
* ggml : cleanup
* tests : add virtual err() function for test_case
* ggml : add comments
Aleksei Nikiforov [Tue, 25 Nov 2025 13:18:16 +0000 (14:18 +0100)]
convert : fix big-endian conversion (#17431)
* Fix convert_hf_to_gguf.py script on s390x
Assume converted model data is originally little-endian.
Byteswap data on s390x after reading it to put values in correct presentation
for any transformation needed, like calculating weight tensors.
Then byteswap data to little-endian before passing it to GGUFWriter while
GGUFWriter will byteswap data back to big endian if big endian output is requested.
byteswap(inplace=True) calls don't work with lazy tensor and array wrappers.
Use byteswap with copying data to workaround this behaviour.
* Make GGUFWriter accept tensors in native endianness instead of little-endian
With this change if no byteswapping is actually needed, 2 excessive byteswaps can be omitted on s390x
* Fix byteswapping in convert_hf_to_gguf.py for remote models
Diego Devesa [Tue, 25 Nov 2025 12:00:23 +0000 (04:00 -0800)]
codeowners : remove slaren (#17492)
TianHao324 [Tue, 25 Nov 2025 09:39:06 +0000 (17:39 +0800)]
CANN: supports out_prod operator for F32 and F16 (#17406)
Co-authored-by: tianhao <redacted>
Pascal [Tue, 25 Nov 2025 07:01:02 +0000 (08:01 +0100)]
webui: add rehype plugin to restore HTML in Markdown table cells (#17477)
* webui: add rehype plugin to restore HTML in Markdown table cells
The remark/rehype pipeline neutralizes inline HTML as literal text
(remarkLiteralHtml) so that XML/HTML snippets in LLM responses display
as-is instead of being rendered. This causes <br> and <ul> markup in
table cells to show as plain text.
This plugin traverses the HAST post-conversion, parses whitelisted HTML
patterns (<br>, <ul><li>) from text nodes, and replaces them with actual
HAST element nodes. For lists, adjacent siblings must be combined first
as the AST fragmentation breaks pattern matching.
Strict validation rejects malformed markup, keeping it as raw text.
* chore: update webui build output
Jeff Bolz [Tue, 25 Nov 2025 06:11:27 +0000 (00:11 -0600)]
vulkan: Use fewer rows for scalar FA when HS is not a multiple of 16 (#17455)
Aaron Teo [Tue, 25 Nov 2025 01:56:07 +0000 (09:56 +0800)]
llama: introduce support for model-embedded sampling parameters (#17120)
Jeff Bolz [Mon, 24 Nov 2025 21:25:24 +0000 (15:25 -0600)]
vulkan: more FA details in vk_perf_logger (#17443)
Daniel Bevenius [Mon, 24 Nov 2025 20:06:17 +0000 (21:06 +0100)]
llama : skip output reordering for single token batches (#17466)
This commit adds a check to skip the output reordering logic when
n_outputs == 1. With a single output token, the data is trivially
sorted and the reordering code is currently doing unnecessary work
(resetting and rebuilding output_ids to the same values).
The motivation for this change is improved code clarity and avoiding
confusion when debugging. While the performance impact is probably
negligible, this unnecessary work happens on every decode call in
llama-server when processing batches with single-token outputs.
Jiacheng (Jason) Chen [Mon, 24 Nov 2025 19:00:10 +0000 (14:00 -0500)]
HIP: WMMA-MMQ kernels for RDNA 4 (#17156)
* first commit naive test to enable mmq for RDNA4
* adding appropriate WMMA instructions
* git rebase on top of master: fixing the correctness of the mat mul operations, updating layout mappings for RDNA4
* clean up merge conflicts
* add comments and code clean up
* PR clean up, addressed comments
* enable MMQ fallback on RDNA4
* addressed comments: add guards in load generic, separate wmma branch for use_mmq function
* Revert build-xcframework.sh
* Formating: remove trailing whitespace
* revert CMake files
* clean up after rebase: remove duplicated change, revert cmake files
* clean up after rebase: revert changes from build-xcframework.sh
* clean up: remove extra space line in mma.cuh
* Revert "clean up: remove extra space line in mma.cuh"
This reverts commit
b39ed57c4529906466bd0bc7c2a86e08fc2f8bee .
Sigbjørn Skjæret [Mon, 24 Nov 2025 14:50:55 +0000 (15:50 +0100)]
convert : allow quantizing lora again (#17453)
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>
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
```
Georgi Gerganov [Mon, 24 Nov 2025 12:28:37 +0000 (14:28 +0200)]
sync : ggml
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
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>
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>
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>
Max Krasnyansky [Mon, 24 Nov 2025 02:55:56 +0000 (18:55 -0800)]
hexagon: add support for ROPE_NEOX (#17458)
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.
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>
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
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
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
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>
Jeff Bolz [Sun, 23 Nov 2025 05:29:40 +0000 (23:29 -0600)]
vulkan: remove a couple unnecessary switches (#17419)
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>
Masato Nakasaka [Sat, 22 Nov 2025 09:55:43 +0000 (18:55 +0900)]
Revive MUL_MAT_ID to perf testing (#17397)
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>
lhez [Fri, 21 Nov 2025 22:34:48 +0000 (14:34 -0800)]
opencl: refine condition for kqv mm (#17392)
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
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>
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>
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
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
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
Daniel Han [Thu, 20 Nov 2025 19:07:36 +0000 (11:07 -0800)]
readme : add Unsloth exporting to GGUF in tools (#17411)
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
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
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
Georgi Gerganov [Thu, 20 Nov 2025 12:09:48 +0000 (14:09 +0200)]
sync : ggml
YangLe [Thu, 20 Nov 2025 11:54:54 +0000 (19:54 +0800)]
metal : fix compile on macos 11 (whisper/3533)
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
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>
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>
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>
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>
sudhiarm [Thu, 20 Nov 2025 09:45:49 +0000 (09:45 +0000)]
kleidiai: fix zero-size array declaration (#17240)
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>
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>
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
Jeff Bolz [Wed, 19 Nov 2025 15:50:43 +0000 (09:50 -0600)]
vulkan: Add copy_transpose shader (#17371)
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
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)
Aman Gupta [Wed, 19 Nov 2025 10:25:05 +0000 (18:25 +0800)]
cuda: fix rope fusion for gemma3 (#17378)