oa::MultiHeadAttention
MultiHeadAttention: Multi-head scaled dot-product self-attention with explicit causal/bidirectional visibility and interchangeable standard/fused causal Flash backends.
Inheritance
public Module
Public Methods
Constructor & Destructor Documentation
No public source comment is attached to this declaration.
Parameters
inDModeloa::I32—
inNumHeadsoa::I32—
inDropoutPoa::F32Default: 0.0f
inBiasboolDefault: true
inBackendoa::AttentionBackendDefault: oa::AttentionBackend::Auto
inModeoa::AttentionModeDefault: oa::AttentionMode::Causal
Public Method Documentation
No public source comment is attached to this declaration.
Returns
oa::AttentionBackendThe declared return value.
No public source comment is attached to this declaration.
Parameters
inInputconst Matrix &—
Returns
MatrixThe declared return value.
No public source comment is attached to this declaration.
Parameters
inInputconst oa::Matrix &—
inAdditiveMaskconst oa::Matrix &—
Returns
oa::MatrixThe declared return value.
No public source comment is attached to this declaration.
Returns
oa::I32The declared return value.
No public source comment is attached to this declaration.
Returns
oa::AttentionBackendThe declared return value.
No public source comment is attached to this declaration.
Returns
oa::AttentionModeThe declared return value.
No public source comment is attached to this declaration.
Returns
oa::I32The declared return value.
No public source comment is attached to this declaration.
Parameters
inBackendoa::AttentionBackend—
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Parameters
inModeoa::AttentionMode—
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Parameters
inSeqLenoa::I32—
Returns
voidThe declared return value.