oa::ml::matrix::scaled_dot_product_attention_causal
Apply multi-head causal scaled dot-product attention to packed [B*S, D] values. Errors Returns an error unless Q, K, and V are equal nonempty same-engine F32 matrices, their row count is divisible by sequence_length, their width is divisible by num_heads, or runtime recording fails.
Function Documentation
Apply multi-head causal scaled dot-product attention to packed [B*S, D] values. Errors Returns an error unless Q, K, and V are equal nonempty same-engine F32 matrices, their row count is divisible by sequence_length, their width is divisible by num_heads, or runtime recording fails.