]>
git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
R0CKSTAR [Fri, 1 Aug 2025 00:47:27 +0000 (08:47 +0800)]
compare-commits.sh: support both llama-bench and test-backend-ops (#14392)
* compare-commits.sh: support both llama-bench and test-backend-ops
Signed-off-by: Xiaodong Ye <redacted>
* Speed up the build by specifying -j 12
Signed-off-by: Xiaodong Ye <redacted>
* Remove build_number from test-backend-ops db
Signed-off-by: Xiaodong Ye <redacted>
* Apply suggestion from @JohannesGaessler
Co-authored-by: Johannes Gäßler <redacted>
* Refine tool selection logic
Signed-off-by: Xiaodong Ye <redacted>
* Address review comments
Signed-off-by: Xiaodong Ye <redacted>
---------
Signed-off-by: Xiaodong Ye <redacted>
Signed-off-by: Xiaodong Ye <redacted>
Co-authored-by: Johannes Gäßler <redacted>
Ed Addario [Thu, 31 Jul 2025 19:32:18 +0000 (20:32 +0100)]
quantize : skip tensor override when in fallback mode (#14995)
Diego Devesa [Thu, 31 Jul 2025 18:15:41 +0000 (11:15 -0700)]
llama : add simple option to enable CPU for MoE weights (--cpu-moe) (#14992)
Aman Gupta [Thu, 31 Jul 2025 17:22:58 +0000 (01:22 +0800)]
Fix params bug in diffusion example (#14993)
Diego Devesa [Thu, 31 Jul 2025 16:11:34 +0000 (09:11 -0700)]
llama : allow other bufts when overriding to CPU, add --no-repack option (#14990)
Ruben Ortlam [Thu, 31 Jul 2025 15:46:54 +0000 (17:46 +0200)]
Vulkan: Fix minor debug mode issues (#14899)
* vulkan: fix debug mode issues
* vulkan: remove broken check_results GGML_OP_SET_ROWS support
tc-mb [Thu, 31 Jul 2025 15:22:17 +0000 (23:22 +0800)]
mtmd : support MiniCPM-V 4.0 (#14983)
* support minicpm-v 4
* add md
* support MiniCPM-o 4.0
* add default location
* temp rm MiniCPM-o 4.0
* fix code
* fix "minicpmv_projector" default path
Csaba Kecskemeti [Thu, 31 Jul 2025 14:59:49 +0000 (07:59 -0700)]
MODEL_TENSOR.SSM_DT_NORM has defined twice (#14991)
* MODEL_TENSOR.SSM_DT_NORM has defined twice, and second overwritten the jamba model's layername
* correct order
g2mt [Thu, 31 Jul 2025 12:25:23 +0000 (05:25 -0700)]
server : implement universal assisted decoding (#12635)
* llama-server : implement universal assisted decoding
* Erase prompt tail for kv-cache
* set vocab_dft_compatible in common_speculative
* rename ctx_main to ctx_tgt
* move vocab_dft_compatible to spec struct
* clear mem_dft, remove mem
* detokenize id_last for incompatible models
* update comment
* add --spec-replace flag
* accept special tokens when translating between draft/main models
* Escape spec-replace
* clamp draft result to size to params.n_draft
* fix comment
* clean up code
* restore old example
* log common_speculative_are_compatible in speculative example
* fix
* Update common/speculative.cpp
Co-authored-by: Georgi Gerganov <redacted>
* Update common/speculative.cpp
Co-authored-by: Georgi Gerganov <redacted>
* Update common/speculative.cpp
Co-authored-by: Georgi Gerganov <redacted>
---------
Co-authored-by: Georgi Gerganov <redacted>
Dongliang Wei [Thu, 31 Jul 2025 12:12:20 +0000 (20:12 +0800)]
llama : merge build_moe_ffn_from_probs function into build_moe_ffn (#14968)
Lukas Straub [Thu, 31 Jul 2025 12:08:23 +0000 (14:08 +0200)]
server : add openai-style logit_bias support (#14946)
Signed-off-by: Lukas Straub <redacted>
Aman Gupta [Thu, 31 Jul 2025 11:49:09 +0000 (19:49 +0800)]
Add LLaDA 8b Diffusion model (#14771)
* Add support for Llada-8b: diffusion model
* Add README
* Fix README and convert_hf_to_gguf
* convert_hf_to_gguf.py: address review comments
* Make everything in a single example
* Remove model-specific sampling
* Remove unused argmax
* Remove braced initializers, improve README.md a bit
* Add diffusion specific gguf params in set_vocab, remove setting rope_theta and rms_norm_eps
* Remove adding the mask token
* Move add_add_bos_token to set_vocab
* use add_bool in gguf_writer.py
hipudding [Thu, 31 Jul 2025 11:47:20 +0000 (19:47 +0800)]
CANN: Improve loading efficiency after converting weights to NZ format. (#14985)
* CANN: Improve loading efficiency after converting weights to NZ format.
* CANN: fix typo
compilade [Thu, 31 Jul 2025 05:02:46 +0000 (01:02 -0400)]
graph : reduce splits for recurrent and hybrid models (#14825)
* graph : avoid creating redundant s_copy views
* graph : comment the s_copy views
lhez [Wed, 30 Jul 2025 21:56:55 +0000 (14:56 -0700)]
opencl: add `mul_mat_f32_f32_l4_lm` and `mul_mat_f16_f32_l4_lm` (#14809)
Ed Addario [Wed, 30 Jul 2025 19:11:56 +0000 (20:11 +0100)]
quantize : fix using combined imatrix GGUFs (multiple datasets) (#14973)
Daniel Bevenius [Wed, 30 Jul 2025 16:07:11 +0000 (18:07 +0200)]
server : add support for `embd_normalize` parameter (#14964)
This commit adds support for the `embd_normalize` parameter in the
server code.
The motivation for this is that currently if the server is started with
a pooling type that is not `none`, then Euclidean/L2 normalization will
be the normalization method used for embeddings. However, this is not
always the desired behavior, and users may want to use other
normalization (or none) and this commit allows that.
Example usage:
```console
curl --request POST \
--url http://localhost:8080/embedding \
--header "Content-Type: application/json" \
--data '{"input": "Hello world today", "embd_normalize": -1}
```
uvos [Wed, 30 Jul 2025 15:38:06 +0000 (17:38 +0200)]
HIP: enable mfma mmq on gfx908 and gfx90a for select datatypes and shapes (#14949)
Georgi Gerganov [Wed, 30 Jul 2025 13:03:13 +0000 (16:03 +0300)]
sync : ggml
ggml-ci
Kai Pastor [Wed, 30 Jul 2025 12:53:16 +0000 (14:53 +0200)]
cmake : Fix BLAS link interface (ggml/1316)
Kai Pastor [Wed, 30 Jul 2025 12:52:26 +0000 (14:52 +0200)]
vulkan : fix 32-bit builds (ggml/1313)
The pipeline member can be cast to VkPipeline.
This is a VkPipeline_T* on 64 bit but a uint64_t on 32 bit.
Cf. VK_DEFINE_NON_DISPATCHABLE_HANDLE documentation.
Johannes Gäßler [Wed, 30 Jul 2025 13:46:13 +0000 (15:46 +0200)]
CUDA: skip masked KV slices for all FA kernels (#14924)
Georgi Gerganov [Wed, 30 Jul 2025 12:12:02 +0000 (15:12 +0300)]
tests : update for LLAMA_SET_ROWS=1 (#14961)
* test-thread-safety : each context uses a single sequence
* embedding : handle --parallel argument
ggml-ci
* save-load : handle -np 1
ggml-ci
* thread-safety : avoid overriding threads, reduce test case arg
ggml-ci
Georgi Gerganov [Wed, 30 Jul 2025 10:52:11 +0000 (13:52 +0300)]
graph : fix stack-use-after-return (#14960)
ggml-ci
Douglas Hanley [Wed, 30 Jul 2025 05:25:05 +0000 (00:25 -0500)]
embeddings: fix extraction of CLS pooling results (#14927)
* embeddings: fix extraction of CLS pooling results
* merge RANK pooling into CLS case for inputs
Xinpeng Dou [Wed, 30 Jul 2025 00:39:24 +0000 (08:39 +0800)]
CANN: update ops docs (#14935)
* CANN:add ops docs
* CANN: update ops docs
uvos [Tue, 29 Jul 2025 18:23:04 +0000 (20:23 +0200)]
HIP: remove the use of __HIP_PLATFORM_AMD__, explicitly support only AMD targets (#14945)
uvos [Tue, 29 Jul 2025 15:44:30 +0000 (17:44 +0200)]
HIP: add GGML_HIP_MMQ_MFMA option to allow disableing the MFMA path. (#14930)
This is useful for testing for regressions on GCN with CDNA hardware.
With GGML_HIP_MMQ_MFMA=Off and GGML_CUDA_FORCE_MMQ=On we can conveniently test the GCN code path on CDNA. As CDNA is just GCN renamed with MFMA added and limited use ACC registers, this provides a good alternative for regression testing when GCN hardware is not available.
uvos [Tue, 29 Jul 2025 15:43:43 +0000 (17:43 +0200)]
HIP: Ignore unsupported unroll transformation in fattn-vec (#14931)
llvm with the amdgcn target dose not support unrolling loops with conditional break statements, when those statements can not be resolved at compile time. Similar to other places in GGML lets simply ignore this warning.
kallewoof [Tue, 29 Jul 2025 15:05:38 +0000 (00:05 +0900)]
common : avoid logging partial messages (which can contain broken UTF-8 sequences) (#14937)
* bug-fix: don't attempt to log partial parsed messages to avoid crash due to unfinished UTF-8 sequences
hipudding [Tue, 29 Jul 2025 14:36:43 +0000 (22:36 +0800)]
CANN: Add ggml_set_rows (#14943)
Sigbjørn Skjæret [Tue, 29 Jul 2025 12:22:03 +0000 (14:22 +0200)]
cuda : add softcap fusion (#14907)
Johannes Gäßler [Tue, 29 Jul 2025 08:40:50 +0000 (10:40 +0200)]
server-bench: make seed choice configurable (#14929)
* server-bench: make seed choice configurable
* Update scripts/server-bench.py
Co-authored-by: Sigbjørn Skjæret <redacted>
* Update scripts/server-bench.py
Co-authored-by: Sigbjørn Skjæret <redacted>
* fix error formatting
* Update scripts/server-bench.py
Co-authored-by: Sigbjørn Skjæret <redacted>
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Aman Gupta [Tue, 29 Jul 2025 06:45:18 +0000 (14:45 +0800)]
CUDA: add roll (#14919)
* CUDA: add roll
* Make everything const, use __restrict__
lhez [Mon, 28 Jul 2025 16:50:17 +0000 (09:50 -0700)]
opencl : add ops docs (#14910)
Leonard Mosescu [Mon, 28 Jul 2025 16:04:27 +0000 (09:04 -0700)]
test-backend-ops : extend test case filtering (#14865)
* Extend test case filtering
1. Allow passing multiple (comma-separated?) ops to test-backend-ops. This can be convenient when working on a set of ops, when you'd want to test them together (but without having to run every single op). For example:
`test-backend-ops.exe test -o "ADD,RMS_NORM,ROPE,SILU,SOFT_MAX"`
2. Support full test-case variation string in addition to basic op names. This would make it easy to select a single variation, either for testing or for benchmarking. It can be particularly useful for profiling a particular variation (ex. a CUDA kernel), for example:
`test-backend-ops.exe perf -b CUDA0 -o "MUL_MAT(type_a=f16,type_b=f32,m=4096,n=512,k=14336,bs=[1,1],nr=[1,1],per=[0,1,2,3],v=2)"`
These two can be combined. As the current `-o`, this change doesn't try to detect/report an error if an filter doesn't name existing ops (ex. misspelled)
* Updating the usage help text
* Update tests/test-backend-ops.cpp
Radoslav Gerganov [Mon, 28 Jul 2025 15:59:04 +0000 (18:59 +0300)]
llama-bench : use local GPUs along with RPC servers (#14917)
Currently if RPC servers are specified with '--rpc' and there is a local
GPU available (e.g. CUDA), the benchmark will be performed only on the
RPC device(s) but the backend result column will say "CUDA,RPC" which is
incorrect. This patch is adding all local GPU devices and makes
llama-bench consistent with llama-cli.
xctan [Mon, 28 Jul 2025 15:40:24 +0000 (23:40 +0800)]
ggml-cpu : deduplicate scalar implementations (#14897)
* remove redundant code in riscv
* remove redundant code in arm
* remove redundant code in loongarch
* remove redundant code in ppc
* remove redundant code in s390
* remove redundant code in wasm
* remove redundant code in x86
* remove fallback headers
* fix x86 ggml_vec_dot_q8_0_q8_0
Akarshan Biswas [Mon, 28 Jul 2025 15:02:15 +0000 (20:32 +0530)]
SYCL: Add set_rows support for quantized types (#14883)
* SYCL: Add set_rows support for quantized types
This commit adds support for GGML_OP_SET_ROWS operation for various
quantized tensor types (Q8_0, Q5_1, Q5_0, Q4_1, Q4_0, IQ4_NL) and BF16
type in the SYCL backend.
The quantization/dequantization copy kernels were moved from cpy.cpp
to cpy.hpp to make them available for set_rows.cpp.
This addresses part of the TODOs mentioned in the code.
* Use get_global_linear_id() instead
ggml-ci
* Fix formatting
ggml-ci
* Use const for ne11 and size_t variables in set_rows_sycl_q
ggml-ci
* Increase block size for q kernel to 256
ggml-ci
* Cleanup imports
* Add float.h to cpy.hpp
Xuan-Son Nguyen [Mon, 28 Jul 2025 13:01:48 +0000 (15:01 +0200)]
mtmd : add support for Voxtral (#14862)
* mtmd : add support for Voxtral
* clean up
* fix python requirements
* add [BEGIN_AUDIO] token
* also support Devstral conversion
* add docs and tests
* fix regression for ultravox
* minor coding style improvement
* correct project activation fn
* Apply suggestions from code review
Co-authored-by: Sigbjørn Skjæret <redacted>
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Johannes Gäßler [Mon, 28 Jul 2025 12:30:22 +0000 (14:30 +0200)]
CUDA: fix pointer incrementation in FA (#14916)
Dongliang Wei [Mon, 28 Jul 2025 11:47:00 +0000 (19:47 +0800)]
model : add support for SmallThinker series (#14898)
* support smallthinker
* support 20b softmax, 4b no sliding window
* new build_moe_ffn_from_probs, and can run 4b
* fix 4b rope bug
* fix python type check
* remove is_moe judge
* remove set_dense_start_swa_pattern function and modify set_swa_pattern function
* trim trailing whitespace
* remove get_vocab_base of SmallThinkerModel in convert_hf_to_gguf.py
Co-authored-by: Sigbjørn Skjæret <redacted>
* better whitespace
Apply suggestions from code review
Co-authored-by: Sigbjørn Skjæret <redacted>
* use GGML_ASSERT for expert count validation
Co-authored-by: Sigbjørn Skjæret <redacted>
* Improve null pointer check for probs
Co-authored-by: Sigbjørn Skjæret <redacted>
* use template parameter for SWA attention logic
* better whitespace
Co-authored-by: Georgi Gerganov <redacted>
* move the creation of inp_out_ids before the layer loop
* remove redundant judge for probs
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Alberto Cabrera Pérez [Mon, 28 Jul 2025 10:05:53 +0000 (11:05 +0100)]
sycl: refactor quantization to q8_1 (#14815)
* sycl: quantization to q8_1 refactor
* Refactored src1 copy logic in op_mul_mat
Georgi Gerganov [Mon, 28 Jul 2025 08:01:03 +0000 (11:01 +0300)]
ops : update BLAS (#14914)
Georgi Gerganov [Mon, 28 Jul 2025 05:22:56 +0000 (08:22 +0300)]
ops : update Metal (#14912)
Georgi Gerganov [Mon, 28 Jul 2025 05:14:20 +0000 (08:14 +0300)]
sync : ggml
Kai Pastor [Thu, 24 Jul 2025 17:58:02 +0000 (19:58 +0200)]
cmake : Indent ggml-config.cmake (ggml/1310)
Ed Addario [Sun, 27 Jul 2025 21:31:11 +0000 (22:31 +0100)]
quantize : update README.md (#14905)
* Update README.md
* Fix trailing whitespace
* Update README.md
Co-authored-by: Sigbjørn Skjæret <redacted>
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Ruben Ortlam [Sun, 27 Jul 2025 13:33:08 +0000 (15:33 +0200)]
vulkan: add ops docs (#14900)
Akarshan Biswas [Sun, 27 Jul 2025 12:22:58 +0000 (17:52 +0530)]
SYCL: add ops doc (#14901)
Daniel Bevenius [Sun, 27 Jul 2025 10:10:51 +0000 (12:10 +0200)]
llama : clarify comment about pp and tg graphs [no ci] (#14895)
* llama : clarify comment about pp and tg graphs [no ci]
This commit clarifies the comment in `llama-context.cpp` regarding the
prefill prompt (pp), and token generation (tg) graphs.
The motivation for this is that I've struggled to remember these and had
to look them up more than once, so I thought it would be helpful to add
a comment that makes it clear what these stand for.
* squash! llama : clarify comment about pp and tg graphs [no ci]
Change "pp" to "prompt processing".
Erik Scholz [Sun, 27 Jul 2025 10:04:33 +0000 (12:04 +0200)]
vulkan : add fp16 support for the conv_2d kernel (#14872)
* add f16 to conv_2d testing
* weaken conv2d test error threshold
Jeff Bolz [Sun, 27 Jul 2025 09:05:34 +0000 (04:05 -0500)]
vulkan: skip empty set_rows to avoid invalid API usage (#14860)
Gabriel Larson [Sun, 27 Jul 2025 08:18:37 +0000 (03:18 -0500)]
model : make rope_yarn_log_mul optional for deepseek2 (#14896)
* make rope_yarn_log_mul optional for deepseek2
* default rope_yarn_log_mul = 0.0f
Shunta Saito [Sun, 27 Jul 2025 07:38:44 +0000 (16:38 +0900)]
llama : fix kq_scale for the attention layers of PLaMo2 (#14892)
* Fix dimensions for expand
* Change dimensions to copy states to cache
* Fix the default value for plamo2 conversion
* Fix scale given to build_attn
* Update src/llama-model.cpp
Co-authored-by: Sigbjørn Skjæret <redacted>
* Update src/llama-model.cpp
Co-authored-by: Sigbjørn Skjæret <redacted>
* Update src/llama-model.cpp
Co-authored-by: Sigbjørn Skjæret <redacted>
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
Aman Gupta [Sun, 27 Jul 2025 01:36:43 +0000 (09:36 +0800)]
Docs: add instructions for adding backends (#14889)
deepsek [Sat, 26 Jul 2025 22:28:14 +0000 (18:28 -0400)]
HIP: Enable Matrix cores for MMQ Kernels, Enable stream-K for CDNA 3 (#14624)
This commit adds support for MFMA instructions to MMQ. CDNA1/GFX908 CDNA2/GFX90a and CDNA3/GFX942 are supported by the MFMA-enabled code path added by this commit. The code path and stream-k is only enabled on CDNA3 for now as it fails to outperform blas in all cases on the other devices.
Blas is currently only consistently outperformed on CDNA3 due to issues in the amd-provided blas libraries.
This commit also improves the awareness of MMQ towards different warp sizes and as a side effect improves the performance of all quant formats besides q4_0 and q4_1, which regress slightly, on GCN gpus.
hipudding [Sat, 26 Jul 2025 09:56:18 +0000 (17:56 +0800)]
CANN: Implement GLU ops (#14884)
Implement REGLU, GEGLU, SWIGLU ops according to #14158
R0CKSTAR [Sat, 26 Jul 2025 02:36:02 +0000 (10:36 +0800)]
musa: fix build warnings (unused variable) (#14869)
Signed-off-by: Xiaodong Ye <redacted>
Aaron Teo [Fri, 25 Jul 2025 17:09:03 +0000 (01:09 +0800)]
ggml-cpu : disable GGML_NNPA by default due to instability (#14880)
* docs: update s390x document for sentencepiece
Signed-off-by: Aaron Teo <redacted>
(cherry picked from commit
e086c5e3a7ab3463d8e0906efcfa39352db0a48d )
* docs: update huggingface links + reword
Signed-off-by: Aaron Teo <redacted>
(cherry picked from commit
8410b085ea8c46e22be38266147a1e94757ef108 )
* ggml-cpu: disable ggml-nnpa compile flag by default
fixes #14877
Signed-off-by: Aaron Teo <redacted>
(cherry picked from commit
412f4c7c88894b8f55846b4719c76892a23cfe09 )
* docs: update s390x build docs to reflect nnpa disable
Signed-off-by: Aaron Teo <redacted>
(cherry picked from commit
c1eeae1d0c2edc74ab9fbeff2707b0d357cf0b4d )
---------
Signed-off-by: Aaron Teo <redacted>
Gabe Goodhart [Fri, 25 Jul 2025 16:47:39 +0000 (10:47 -0600)]
metal: SSM_SCAN performance (#14743)
* feat: Add s_off as a parameter in the args struct
This may not be necessary, but it more closely mirrors the CUDA kernel
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* perf: Parallelize mamba2 SSM_SCAN metal kernel over d_state
This is a first attempt at optimizing the metal kernel. The changes here
are:
- Launch the kernel with a thread group of size d_state
- Use simd groups and shared memory to do the summation for the y
computation
When tested with G4 tiny preview, this shows roughly a 3x speedup on
prefill and 15% speedup on decode.
Signed-off-by: Gabe Goodhart <redacted>
* fix: Update logic to correctly do the multi-layer parallel sum
Signed-off-by: Gabe Goodhart <redacted>
* fix: Correctly size the shared memory bufer and assert expected size relationships
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* refactor: Compute block offsets once rather than once per token
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* feat: Use local variable for state recursion
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* feat: Use a secondary simd_sum instead of a for loop
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* feat: Add assertion and comment about relationship between simd size and num simd groups
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* feat: Parallelize of d_state for mamba-1
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* feat: Parallel sum in SSM_CONV
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
* Revert "feat: Parallel sum in SSM_CONV"
After discussion with @compilade, the size of the parallelism here is
not worth the cost in complexity or overhead of the parallel for.
https://github.com/ggml-org/llama.cpp/pull/14743#discussion_r2223395357
This reverts commit
16bc059660c1c59e566628201c0ca2c20c9f4bc3 .
Signed-off-by: Gabe Goodhart <redacted>
* refactor: Simplify shared memory sizing
Branch: GraniteFourPerf
Signed-off-by: Gabe Goodhart <redacted>
Co-Authored-By: Georgi Gerganov <redacted>
---------
Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
lhez [Fri, 25 Jul 2025 15:12:13 +0000 (08:12 -0700)]
opencl: add fused `rms_norm_mul` (#14841)
* opencl: add fused `rms_norm` + `mul`
* opencl: improve workgroup size for `rms_norm_mul`
wooksong [Fri, 25 Jul 2025 14:25:05 +0000 (23:25 +0900)]
docs : update HOWTO‑add‑model.md for ModelBase and new model classes (#14874)
This patch updates the example in docs/development/HOWTO-add-model.md to
reflect recent changes after `TextModel` and `MmprojModel` were introduced.
It replaces the outdated `Model` base class with `TextModel` or `MmprojModel`
and updates the registration example accordingly.
Signed-off-by: Wook Song <redacted>
Oliver Simons [Fri, 25 Jul 2025 11:29:57 +0000 (13:29 +0200)]
ggml : remove invalid portPos specifiers from dot files (#14838)
Neither "g" nor "x" are valid portPos specifiers per the official
[graphviz documents](https://graphviz.org/docs/attr-types/portPos/):
> If a compass point is used, it must have the form "n","ne","e","se","s","sw","w","nw","c","_".
I tested locally for it to fall back to default portPos specifier if an
invalid portPos is specified. As a consequence, we can remove associated
code.
Georgi Gerganov [Fri, 25 Jul 2025 11:28:06 +0000 (14:28 +0300)]
context : restore preemptive sched reset when LLAMA_SET_ROWS=0 (#14870)
ggml-ci
kiwi [Fri, 25 Jul 2025 11:08:04 +0000 (19:08 +0800)]
mtmd : fix 32-bit narrowing issue in export-lora and mtmd clip (#14503)
* [fix] Fix 32-bit narrowing issue in export-lora and mtmd clip
* Update export-lora.cpp
* Update clip.cpp
* Update export-lora.cpp
* format: use space to replace tab
Chris Rohlf [Fri, 25 Jul 2025 10:17:02 +0000 (06:17 -0400)]
rpc : check for null buffers in get/set/copy tensor endpoints (#14868)
Diego Devesa [Fri, 25 Jul 2025 08:07:26 +0000 (01:07 -0700)]
sched : fix multiple evaluations of the same graph with pipeline parallelism (#14855)
ggml-ci
R0CKSTAR [Thu, 24 Jul 2025 19:05:37 +0000 (03:05 +0800)]
musa: upgrade musa sdk to rc4.2.0 (#14498)
* musa: apply mublas API changes
Signed-off-by: Xiaodong Ye <redacted>
* musa: update musa version to 4.2.0
Signed-off-by: Xiaodong Ye <redacted>
* musa: restore MUSA graph settings in CMakeLists.txt
Signed-off-by: Xiaodong Ye <redacted>
* musa: disable mudnnMemcpyAsync by default
Signed-off-by: Xiaodong Ye <redacted>
* musa: switch back to non-mudnn images
Signed-off-by: Xiaodong Ye <redacted>
* minor changes
Signed-off-by: Xiaodong Ye <redacted>
* musa: restore rc in docker image tag
Signed-off-by: Xiaodong Ye <redacted>
---------
Signed-off-by: Xiaodong Ye <redacted>
Georgi Gerganov [Thu, 24 Jul 2025 15:30:33 +0000 (18:30 +0300)]
sync : ggml
ggml-ci
Kai Pastor [Tue, 22 Jul 2025 18:13:21 +0000 (20:13 +0200)]
cmake : fix usage issues (ggml/1257)
* CMake config: Create target only once
Fix error on repeated find_package(ggml).
For simplicity, check only for the top-level ggml::ggml.
* CMake config: Add CUDA link libs
* CMake config: Add OpenCL link libs
* CMake config: Use canonical find_dependency
Use set and append to control link lib variables.
Apply more $<LINK_ONLY...>.
* CMake config: Wire OpenMP dependency
Daniel Bevenius [Mon, 21 Jul 2025 13:53:12 +0000 (15:53 +0200)]
ggml-cpu : remove stdlib include from repack.cpp (ggml/1276)
This commit removes the inclusion of `<cstdlib>`.
The motivation for this change is that this source file does not seem to
use any functions from this header and the comment about `qsort` is a
little misleading/confusing.
Georgi Gerganov [Thu, 24 Jul 2025 13:31:48 +0000 (16:31 +0300)]
context : perform output reorder lazily upon access after sync (#14853)
* context : perform output reorder after lazily upon access after sync
ggml-ci
* cont : add TODO
Xuan-Son Nguyen [Thu, 24 Jul 2025 11:59:56 +0000 (13:59 +0200)]
chat : fix kimi-k2 chat template (#14852)
Alberto Cabrera Pérez [Thu, 24 Jul 2025 10:09:57 +0000 (11:09 +0100)]
sycl: fixed semantics of block offset calculation (#14814)
yummy [Thu, 24 Jul 2025 09:50:51 +0000 (17:50 +0800)]
llama : fix MiniCPM inference after Granite Four changes (#14850)
MiniCPM models use the llm_build_granite constructor which was changed
in the Granite Four PR to use hparams.rope_finetuned instead of a
use_rope parameter. MiniCPM models need rope enabled by default.
Fixes inference from gibberish to correct responses.
Pouya [Thu, 24 Jul 2025 09:26:44 +0000 (12:26 +0300)]
docs: add libcurl-dev install hint for Linux distros (#14801)
* docs: add libcurl-dev install hint for Linux distros
Signed-off-by: PouyaGhahramanian <redacted>
* Update docs/build.md
---------
Signed-off-by: PouyaGhahramanian <redacted>
Co-authored-by: Xuan-Son Nguyen <redacted>
Georgi Gerganov [Thu, 24 Jul 2025 07:24:05 +0000 (10:24 +0300)]
metal : fix fusion across different encoders (#14849)
* metal : fix fusion across different encoders
ggml-ci
* cont : add assertion
ggml-ci
Donghyeon Jeong [Thu, 24 Jul 2025 04:50:41 +0000 (13:50 +0900)]
sycl: fix undefined variable in work group size check (#14843)
jacekpoplawski [Wed, 23 Jul 2025 21:23:57 +0000 (23:23 +0200)]
convert : text-only support for GLM-4.1V-9B-Thinking (#14823)
* use language_model part only, ignore visual layers
* fix rope_dim calculation
Johannes Gäßler [Wed, 23 Jul 2025 19:43:25 +0000 (21:43 +0200)]
CUDA: fix overflow in FA, tune performance (#14840)
Johannes Gäßler [Wed, 23 Jul 2025 16:22:30 +0000 (18:22 +0200)]
CUDA: fix compilation with GGML_CUDA_F16 (#14837)
Sigbjørn Skjæret [Wed, 23 Jul 2025 12:27:54 +0000 (14:27 +0200)]
ci : correct label refactor->refactoring (#14832)
Johannes Gäßler [Wed, 23 Jul 2025 10:35:53 +0000 (12:35 +0200)]
CUDA: fix quantized KV cache + multiple sequences (#14822)
* CUDA: fix quantized KV cache + multiple sequences
* Update ggml/src/ggml-cuda/fattn-common.cuh
Co-authored-by: Georgi Gerganov <redacted>
---------
Co-authored-by: Georgi Gerganov <redacted>
Georgi Gerganov [Fri, 18 Jul 2025 10:36:27 +0000 (13:36 +0300)]
tests : add non-cont K,V FA tests
ggml-ci
l3utterfly [Wed, 23 Jul 2025 08:16:41 +0000 (16:16 +0800)]
memory : handle saving/loading null layers in recurrent memory (#14675)
* Update llama-memory-recurrent.cpp
handle saving/loading null layers in recurrent memory
* fixed styling issues and updated comments
* fix styling issue
Co-authored-by: Sigbjørn Skjæret <redacted>
---------
Co-authored-by: Sigbjørn Skjæret <redacted>
lixing-star [Wed, 23 Jul 2025 06:39:51 +0000 (14:39 +0800)]
ggml: fix loongarch quantize_row_q8_1 error (#14827)
chen fan [Wed, 23 Jul 2025 03:58:00 +0000 (11:58 +0800)]
CANN: weight format to NZ for Ascend310P3 (#14407)
* weight format to nz for 310p
* remove quant weight format to nz
* clean code
* fix
* make the conditions for converting weights to NZ format consistent
* clean code
Aman Gupta [Wed, 23 Jul 2025 01:25:42 +0000 (09:25 +0800)]
CUDA: add fused rms norm (#14800)
Csaba Kecskemeti [Tue, 22 Jul 2025 16:29:43 +0000 (09:29 -0700)]
ggml : model card yaml tab->2xspace (#14819)
Jeff Bolz [Tue, 22 Jul 2025 15:35:21 +0000 (10:35 -0500)]
vulkan: fix rms_norm_mul to handle broadcasting dim0 (#14817)
Molly Sophia [Tue, 22 Jul 2025 15:01:29 +0000 (23:01 +0800)]
llama : add model type detection for rwkv7 7B&14B (#14816)
Signed-off-by: Molly Sophia <redacted>
Ed Addario [Tue, 22 Jul 2025 12:33:37 +0000 (13:33 +0100)]
imatrix: add option to display importance score statistics for a given imatrix file (#12718)
* Add --show-statistics option
* Add --show-statistics logic
* Add tensor name parsing
* Tidy output format
* Fix typo in title
* Improve tensor influence ranking
* Add better statistics
* Change statistics' sort order
* Add Cosine Similarity
* Add header search path
* Change header search path to private
* Add weighted statistics per layer
* Update report title
* Refactor compute_statistics out of main
* Refactor compute_cossim out of load_imatrix
* Refactor compute_statistics out of load_imatrix
* Move imatrix statistics calculation into its own functions
* Add checks and validations
* Remove unnecessary include directory
* Rename labels
* Add m_stats getter and refactor compute_statistics out of load_imatrix
* Refactor variable names
* Minor cosmetic change
* Retrigger checks (empty commit)
* Rerun checks (empty commit)
* Fix unnecessary type promotion
Co-authored-by: compilade <redacted>
* Reverting change to improve code readability
* Rerun checks (empty commit)
* Rerun checks (empty commit)
* Rerun checks - third time's the Charm 🤞 (empty commit)
* Minor cosmetic change
* Update README
* Fix typo
* Update README
* Rerun checks (empty commit)
* Re-implement changes on top of #9400
* Update README.md
* Update README
* Update README.md
Co-authored-by: compilade <redacted>
* Update README.md
Co-authored-by: compilade <redacted>
* Update README.md
* Remove duplicate option in print_usage()
* Update README.md
* Update README.md
Co-authored-by: compilade <redacted>
* Update README.md
Co-authored-by: compilade <redacted>
* Remove input check
* Remove commented out code
---------
Co-authored-by: compilade <redacted>
stduhpf [Tue, 22 Jul 2025 10:51:03 +0000 (12:51 +0200)]
Mtmd: add a way to select device for vision encoder (#14236)
* Mtmd: add a way to select device for vision encoder
* simplify
* format
* Warn user if manual device selection failed
* initialize backend to nullptr
Sigbjørn Skjæret [Tue, 22 Jul 2025 10:33:10 +0000 (12:33 +0200)]
cuda : implement bf16 cpy ops and enable bf16 cont (#14763)
* implement bf16 cpy ops and enable bf16 cont
* deduplicate copy functions
* deduplicate checks
lhez [Tue, 22 Jul 2025 06:53:30 +0000 (23:53 -0700)]
opencl: remove unreachable `return` (#14806)
Molly Sophia [Tue, 22 Jul 2025 01:24:22 +0000 (09:24 +0800)]
server : allow setting `--reverse-prompt` arg (#14799)
Signed-off-by: Molly Sophia <redacted>
R0CKSTAR [Mon, 21 Jul 2025 23:45:26 +0000 (07:45 +0800)]
cuda: remove linking to cublasLt (#14790)
Signed-off-by: Xiaodong Ye <redacted>
Sigbjørn Skjæret [Mon, 21 Jul 2025 20:55:10 +0000 (22:55 +0200)]
opencl: fix `im2col` when `KW!=KH` (#14803)
rmatif [Mon, 21 Jul 2025 17:03:19 +0000 (19:03 +0200)]
opencl: add conv2d kernel (#14403)
* add conv2d kernel
* fix trailing whitespace
* whitespace fixe
* handle f16 input and f16 kernel, more opt
* resolve conflicts
* use enqueue_ndrange_kernel