Skip to content

Commit 4d5a6d9

Browse files
fix fdrop
1 parent aac281d commit 4d5a6d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/attention.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function dot_product_attention(q::AA{N}, k::AA{N}, v::AA{N}; nheads=1, kws...) w
4848
end
4949

5050
function _dot_product_attention(q::AA4, k::AA4, v::AA4;
51-
fdrop=nothing, bias=nothing, mask=nothing)
51+
fdrop=identity, bias=nothing, mask=nothing)
5252

5353
α = dot_product_attention_scores(q, k; fdrop, bias, mask)
5454
# [α] = [kv_len, q_len, nheads, batch_size]
@@ -68,7 +68,6 @@ end
6868
Return the attention scores for the [`dot_product_attention`](@ref).
6969
7070
Input arrays must have dimensions `(num_features ÷ nheads, nheads, sequence_length, batch_size)`.
71-
7271
"""
7372
function dot_product_attention_scores(q::AA4{T}, k::AA4{T};
7473
fdrop=identity, mask=nothing, bias=nothing) where T

0 commit comments

Comments
 (0)