]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
sampling : optimize samplers by reusing bucket sort (#15665)
authorGeorgi Gerganov <redacted>
Sun, 31 Aug 2025 17:41:02 +0000 (20:41 +0300)
committerGitHub <redacted>
Sun, 31 Aug 2025 17:41:02 +0000 (20:41 +0300)
commite92d53b29e393fc4c0f9f1f7c3fe651be8d36faa
treec0292f4f00835cd333b9af4b01d3b15b93f5cbe6
parent0d161f021aa33ec0e90cce96f5d1a88925557327
sampling : optimize samplers by reusing bucket sort (#15665)

* sampling : optimize sorting using bucket sort in more places

ggml-ci

* sampling : do not sort in dist sampler

ggml-ci

* sampling : avoid heap allocations for sort buffers

ggml-ci

* common : add option to sort sampling candidates by probability

ggml-ci

* sampling : revert the change for preserving sort buffers

* sampling : use std::copy instead of memcpy

* sampling : clarify purpose of partial sort helpers

ggml-ci

* cont : remove wrong comment [no ci]

* common : update comment

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

Co-authored-by: Johannes Gäßler <redacted>
common/sampling.cpp
common/sampling.h
common/speculative.cpp
examples/speculative/speculative.cpp
include/llama.h
src/llama-sampling.cpp
tests/test-sampling.cpp
tools/server/server.cpp
tools/tts/tts.cpp