Skip to content

sampling: remove duplicated code for probability distribution access - #6240

Merged
ggerganov merged 5 commits into
ggml-org:masterfrom
mscheong01:sampling-remove-duplicated-code-for-probability-distribution-access
Mar 24, 2024
Merged

ggerganov merged 5 commits into
ggml-org:masterfrom
mscheong01:sampling-remove-duplicated-code-for-probability-distribution-access

Conversation

@mscheong01

Copy link
Copy Markdown
Collaborator

since #5625, function llama_sampling_probability_distribution with duplicated code of llama_sampling_sample was added to access the probability distribution used for sampling.
This PR is an attempt to remove such code.

Comment thread common/sampling.cpp Outdated
Comment thread common/sampling.cpp Outdated
Comment thread common/sampling.cpp Outdated
Comment thread common/sampling.cpp Outdated
Comment thread common/sampling.h Outdated
@ggerganov
ggerganov merged commit 586e7bc into ggml-org:master Mar 24, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 3, 2024
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
…l-org#6240)

* sampling: remove duplicated code for probability distribution access

* free original_logits

* fix original_logits allocation

* fixes based on review @cebtenzzre

* change function name to `llama_sampling_prepare`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants