noether.modeling.modules.attention.anchor_attention.joint¶
Classes¶
Configuration for Joint Anchor Attention module. |
|
Anchor attention within and across branches: all tokens attend to anchors from all configured branches. |
Module Contents¶
- class noether.modeling.modules.attention.anchor_attention.joint.JointAnchorAttentionConfig(/, **data)¶
Bases:
noether.modeling.modules.attention.anchor_attention.multi_branch.MultiBranchAnchorAttentionConfigConfiguration for Joint Anchor Attention module.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class noether.modeling.modules.attention.anchor_attention.joint.JointAnchorAttention(config)¶
Bases:
noether.modeling.modules.attention.anchor_attention.multi_branch.MultiBranchAnchorAttentionAnchor attention within and across branches: all tokens attend to anchors from all configured branches.
For a list of branches (e.g., A, B, C), this creates a pattern where all tokens (A_anchors, A_queries, B_anchors, B_queries, C_anchors, C_queries) attend to (A_anchors + B_anchors + C_anchors). It requires at least one anchor token to be present in the input.
Example: all tokens attend to (surface_anchors, volume_anchors). This is achieved via the following attention pattern:
AttentionPattern( query_tokens=["surface_anchors", "surface_queries", "volume_anchors", "volume_queries"], key_value_tokens=["surface_anchors", "volume_anchors"], )
- Parameters:
config (JointAnchorAttentionConfig)