codellama icon indicating copy to clipboard operation
codellama copied to clipboard

Where is the attribute `past_key_values`

Open XinyuShe opened this issue 1 year ago • 1 comments

I hope to use past_key_values for inferring longer texts, but even though I have set use_cache=True, I still cannot find it in the generated_tokens's attributes.

generated_tokens = model.generate(
                **model_input, 
                max_new_tokens=1600,
                use_cache=True
                )

XinyuShe avatar Feb 24 '24 10:02 XinyuShe

Hi @XinyuShe, I'm not sure what you're referring to since the repo doesn't feature a generate() function like the one you're describing.

jgehring avatar Feb 28 '24 07:02 jgehring