PeftModelForCausalLM.generate
ignores prompt tuning parameters unless use_cache=False
#2123
Open
2 of 4 tasks
PeftModelForCausalLM.generate
ignores prompt tuning parameters unless use_cache=False
#2123
System Info
Python 3.9.18
Who can help?
No response
Information
Tasks
examples
folderReproduction
When using prompt tuning, the generate method of the PEFT model produces the same output as the base model unless
use_cache=False
:I didn't observe this unexpected behavior when using
Write/palmyra-small
(which usesGPT2LMHeadModel
), so it doesn't seem to affect all architectures. I haven't tested other prompt learning methods, but I suspect they might be affected as well.Expected behavior
PEFT models should respect prompt tuning parameters when generating regardless of
use_cache
setting.The text was updated successfully, but these errors were encountered: