HuggingFace API for text generation: setting “num_beams” and using “past_key_values” when calling the method generate()
I have a piece of code to accelerate text generation using past_key_values
. The simplified version is as follows:
I have a piece of code to accelerate text generation using past_key_values
. The simplified version is as follows: