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

investigate how to pass past_key_values to generate() #53

Open
jemmyshin opened this issue Jun 29, 2023 · 1 comment
Open

investigate how to pass past_key_values to generate() #53

jemmyshin opened this issue Jun 29, 2023 · 1 comment
Assignees

Comments

@jemmyshin
Copy link
Contributor

jemmyshin commented Jun 29, 2023

We already implemented passing past_key_values to step_generate() to enable cache in LLM.

generate() also support this but should have a different method to implement this since generate() will truncate the input_ids if past_key_values is provided.

@jemmyshin
Copy link
Contributor Author

conclusion for now:

We can pass past_key_values to generate(), however, it's not possible to return the updated past_key_values from generate(). We can modify the utils in huggingface package to enable this but it's a hacky way, so we decide now to implement this feature now.

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

No branches or pull requests

1 participant