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 batched_generate_fn() #1702

Merged
merged 26 commits into from
Sep 5, 2024
Merged

Add batched_generate_fn() #1702

merged 26 commits into from
Sep 5, 2024

Conversation

apaz-cli
Copy link
Collaborator

@apaz-cli apaz-cli commented Aug 30, 2024

Still a bit rough around the edges. Debug prints are commented out. But it does the thing, so putting it up for review and feedback. Writing tests and cleaning it up.

  • Does handle:
    • Stop sequences (supports all litgpt models)
  • Does not yet handle:
    • Batched input_pos
    • Padding to the left
    • include_eos

Once include_eos works, I'd like to rewrite generate_fn() in terms of batched_generate_fn().

Also we're going to have to re-benchmark everything of course.

litgpt/generate/base.py Outdated Show resolved Hide resolved
litgpt/generate/base.py Outdated Show resolved Hide resolved
litgpt/generate/base.py Outdated Show resolved Hide resolved
@apaz-cli apaz-cli merged commit 1d37f9a into main Sep 5, 2024
9 checks passed
@apaz-cli apaz-cli deleted the ap/batched_generate branch September 5, 2024 16:15
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