You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this transformers documentation, there are many kv cache methods available. However, I find it inconvenient to set past_key_values in the generation_kwargs of a task, for example, when using SinkCache. My proposed solution is to build a subclass of Task to implement setting past_key_values in the generation_kwargs. Is there a better way?
The text was updated successfully, but these errors were encountered:
Hi! you can pass it on to the command for ex. --gen_kwargs cache_implentation=....,<other kwargs to model.generate>
Thank you for your reply, but something like SinkCache cannot use parameters directly because it needs to be initialized in advance and passed to model.generate through past_key_values.
In this transformers documentation, there are many kv cache methods available. However, I find it inconvenient to set
past_key_values
in thegeneration_kwargs
of atask
, for example, when usingSinkCache
. My proposed solution is to build a subclass ofTask
to implement settingpast_key_values
in thegeneration_kwargs
. Is there a better way?The text was updated successfully, but these errors were encountered: