10000 Add top_n_sigma and grammar_lazy samplers; Add reset and get_seed methods to LlamaSampler by nhaghighat · Pull Request #672 · utilityai/llama-cpp-rs · GitHub
[go: up one dir, main page]

Skip to content

Add top_n_sigma and grammar_lazy samplers; Add reset and get_seed methods to LlamaSampler #672

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

Conversation

nhaghighat
Copy link
Contributor

Changes

  • Added new sampler types:
    • top_n_sigma sampler for statistical sampling based on standard deviations
    • grammar_lazy sampler with trigger words and tokens
  • Added lifecycle methods to LlamaSampler:
    • get_seed() - retrieve the current sampler seed
    • reset() - reset internal sampler state

Copy link
Contributor
@MarcusDunn MarcusDunn left a comment

Choose a reason for hiding this comment

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

wonderful, good docs and doc tests.

@nhaghighat
Copy link
Contributor Author

Thanks. I appreciate the review and feedback.

@MarcusDunn MarcusDunn merged commit d5a5645 into utilityai:main Feb 24, 2025
2 of 5 checks passed
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.

2 participants
0