peft icon indicating copy to clipboard operation
peft copied to clipboard

FIX: Use correct argument name in MultiheadAttention forward

Open BenjaminBossan opened this issue 8 months ago • 1 comments

The arguments of the forward method of MultiheadAttention are called query etc. PEFT used x. Therefore, if a caller uses keywords only, the argument is not assigned, resulting in an error.

This was initially reported here:

https://github.com/huggingface/peft/issues/761#issuecomment-2818029500

Note: Other layers' forward method (like Linear) also uses incorrect names, like x instead of input, but so far no issues were reported, so I'll leave it as is for now.

BenjaminBossan avatar Apr 23 '25 09:04 BenjaminBossan

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.