[GH-ISSUE #104] ViT self-attention has no Q,K,V weights #96

Closed
opened 2026-10-31 21:11:03 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @drjinying on GitHub (May 7, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/104

Just to make sure, is it intended that the ViT's MultiHeadAttention layer has no Q, K and V matrixes?
In the code, x value is used for q, k and v. The paper didn't mention this. Could you please share any insights?


I figured this out. The nn.MultiheadAttention built wq, wk, wv inside. Thanks!

Originally created by @drjinying on GitHub (May 7, 2021). Original GitHub issue: https://github.com/openai/CLIP/issues/104 Just to make sure, is it intended that the ViT's MultiHeadAttention layer has no Q, K and V matrixes? In the code, x value is used for q, k and v. The paper didn't mention this. Could you please share any insights? --- I figured this out. The nn.MultiheadAttention built wq, wk, wv inside. Thanks!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#96
No description provided.