Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeysValuesPairs ¶
type KeysValuesPairs struct { // SelfAttKeyValues contains the keys and values used by self-attention. SelfAttKeyValues multiheadattention.KeysValuesPairs // CrossAttKeyValues contains the keys and values used by cross-attention. CrossAttKeyValues multiheadattention.KeysValuesPairs }
KeysValuesPairs contains the keys and values used by the self-attention and cross-attention blocks.
type Layer ¶
type Layer struct { nn.BaseModel Config config.Config SelfAttention *multiheadattention.Model SelfAttentionLayerNorm *layernorm.Model EncoderAttention *multiheadattention.Model EncoderAttentionLayerNorm *layernorm.Model FFN *stack.Model LayerNorm *layernorm.Model }
Layer implements a BART decoder layer.
Click to show internal directories.
Click to hide internal directories.