Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama : refactor samplers internal implementation #9370

Merged
merged 3 commits into from
Sep 8, 2024
Merged

Conversation

slaren
Copy link
Collaborator

@slaren slaren commented Sep 8, 2024

  • Remove lambdas
  • Remove some of the _impl functions
  • Fix penalties sampler and test

I plan to do more changes, but it may be worth merging this now to fix the penalties sampler.

@github-actions github-actions bot added the testing Everything test related label Sep 8, 2024
Comment on lines 398 to 402
static void llama_sampler_dist_reset(struct llama_sampler * smpl) {
// is this correct?
auto * ctx = (llama_sampler_dist *) smpl->ctx;
ctx->rng = std::mt19937(ctx->seed);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've missed to implement it.

@slaren slaren merged commit 19f4a7b into master Sep 8, 2024
52 checks passed
@slaren slaren deleted the sl/sampling-re branch September 8, 2024 13:52
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Everything test related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants