std :: ml::attention
Function std::attention_forward_mask
&FloatTensor attention_forward_mask(
const &FloatTensor Q,
const &FloatTensor K,
const &FloatTensor V,
int causal,
unsigned long window,
)The two with a mask (causal 0/1, window 0 for none; see above).