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

improving performance of create-icl-prompt #7

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

chanind
Copy link
Contributor

@chanind chanind commented Jul 17, 2024

This PR improves performance of the create_icl_prompt() helper by not first copying the vocab at the start of the function. This now only happens if we actually want to use the entire vocab as a single ICL prompt, which in practice won't be done except with very small vocab sizes.

Copy link
Contributor

@hrdkbhatnagar hrdkbhatnagar left a comment

Choose a reason for hiding this comment

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

amazing, this fixes a major slowdown. Thanks!

@chanind chanind merged commit 215c124 into main Jul 17, 2024
1 check passed
@chanind chanind deleted the improve-create-icl-prompt-perf branch July 17, 2024 15:57
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