torch.nn.attention.bias.CausalBias
- class torch.nn.attention.bias.CausalBias(variant, seq_len_q, seq_len_kv)
A bias representing causal attention patterns. For an overview of the bias structure, see the
CausalVariantenum.This class is used for defining causal (triangular) attention biases. For constructing the bias, there exist two factory functions: and .