Skip to content

Conversation

@BenjaminBossan
Copy link
Member

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:

#761 (comment)

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.

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:

huggingface#761 (comment)

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.
@HuggingFaceDocBuilderDev

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.

@BenjaminBossan BenjaminBossan merged commit eb5e9bc into huggingface:main May 5, 2025
14 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-multihead-attention-forward-arg-name branch May 5, 2025 13:42
efraimdahl pushed a commit to efraimdahl/peft that referenced this pull request Jul 12, 2025
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:

huggingface#761 (comment)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants