class_docstr: Constructs instances of :class:`CausalAttentionMask`.
class_docstr_tok: ["Constructs","instances","of",":","class",":","`","CausalAttentionMask","`","."]
docstr: :param attn_window_len:
      The attention window length as described in Section 3.1 of
      :cite:t:`https://doi.org/10.48550/arxiv.2004.05150`. If ``None``,
      constructs a full causal attention mask.
docstr_tok: [":","param","attn_window_len",":","The","attention","window","length","as","described","in","Section","3.1","of",":","cite",":","t",":","`","https",":","\/\/doi.org\/10.48550\/arxiv.2004.05150","`",".","If","``","None","``",",","constructs","a","full","causal","attention","mask","."]
code: def __init__(self, *, attn_window_len: Optional[int] = None) -> None:
      """
      :param attn_window_len:
          The attention window length as described in Section 3.1 of
          :cite:t:`https://doi.org/10.48550/arxiv.2004.05150`. If ``None``,
          constructs a full causal attention mask.
      """
      self.attn_window_len = attn_window_len
  
imports: from abc import ABC, abstractmethod
  from typing import Optional, Protocol, final
  import torch
  from torch import Tensor
  from fairseq2.nn.incremental_state import IncrementalStateBag
  from fairseq2.typing import DataType, Device, finaloverride
label_desc: Use image node_id 1 to create a new CausalAttentionMaskFactory object  with example: obj = CausalAttentionMaskFactory()