huggingface / peft

🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.
https://huggingface.co/docs/peft
Apache License 2.0
16.46k stars 1.62k forks source link

FIX Don't assume past_key_valus for encoder models #2149

Closed BenjaminBossan closed 1 month ago

BenjaminBossan commented 1 month ago

Don't assume that past_key_values is part of the model_kwargs.

This fix is similar to #2140 but for encoder-decoder models. It became necessary after https://github.com/huggingface/transformers/pull/34048 was merged into transformers.

Fixes the currently failing CI.