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

Add temperature, top-k and top-p logits processors #335

Closed
SimJeg opened this issue Nov 6, 2023 · 5 comments
Closed

Add temperature, top-k and top-p logits processors #335

SimJeg opened this issue Nov 6, 2023 · 5 comments
Labels

Comments

@SimJeg
Copy link

SimJeg commented Nov 6, 2023

Hello,

In outlines.text.generate.sample, only greedy and multinomial methods are available. Would it be possible to implement some classical features in the multinomial function such as top_k, top_p or temperature ?

Thanks for your work,
Simon

@brandonwillard
Copy link
Member

Yes, definitely!

@rlouf rlouf changed the title More sampling methods Add temperature, top-k and top-p logits processors Nov 6, 2023
@brandonwillard
Copy link
Member

Also, we need to add beam search.

@rlouf
Copy link
Member

rlouf commented Nov 6, 2023

Also, we need to add beam search.

Tracked by #258

@rlouf
Copy link
Member

rlouf commented Jan 23, 2024

#533 introduces a small refactor of the samplers that would allow to pass the top_k and top_p arguments to the multinomial sampler. We could pass the temperature using the same mechanism as well

@rlouf rlouf added API models transformers Linked to the `transformers` integration labels Jan 26, 2024
@rlouf
Copy link
Member

rlouf commented Feb 12, 2024

top-k was added in #642, and I opened separate issues for the other requests: #645 and #643.

@rlouf rlouf added the samplers label Feb 12, 2024
@rlouf rlouf closed this as completed Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants