torch.nn.functional.ScaledDotProductAttentionFunctionalOptions
export interface ScaledDotProductAttentionFunctionalOptions {
/** Optional attention mask; if provided, it is added to the scaled dot product before softmax. */
attn_mask?: Tensor;
/** Dropout probability; if greater than 0.0, dropout is applied to the attention weights. (default: 0.0) */
dropout_p?: number;
/** If true, applies causal masking (prevents attending to future positions). (default: false) */
is_causal?: boolean;
/** Scaling factor for the dot product. (default: 1 / sqrt(head_dim)) */
scale?: number;
}attn_mask(Tensor)optional- – Optional attention mask; if provided, it is added to the scaled dot product before softmax.
dropout_p(number)optional- – Dropout probability; if greater than 0.0, dropout is applied to the attention weights. (default: 0.0)
is_causal(boolean)optional- – If true, applies causal masking (prevents attending to future positions). (default: false)
scale(number)optional- – Scaling factor for the dot product. (default: 1 / sqrt(head_dim))
Options for scaled_dot_product_attention functional operation.