Skip to content

Conversation

@Kaffaljidhmah2
Copy link

The prepare_inputs_for_generation() method is used at each decoding step for auto-regressive generation. The default name for the keyword argument of key-value caches is past_key_values instead of past. Renaming past to past_key_values fits the Huggingface Transformer interface and enables the key-value cache for the generation.

Please refer to https://github.com/huggingface/transformers/blob/main/src/transformers/generation/utils.py#L751.

@salesforce-cla
Copy link

salesforce-cla bot commented Aug 4, 2023

Thanks for the contribution! Before we can merge this, we need @Kaffaljidhmah2 to sign the Salesforce Inc. Contributor License Agreement.

@Kaffaljidhmah2
Copy link
Author

I've signed the CLA. Please take a look if is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant