def from_config(
      cls,
      mask_tag: Any,
      masked_out_value: jax.typing.ArrayLike = -2.3819763e38,
  ) -> ApplyAttentionMask:
    """Creates an ``ApplyAttentionMask`` layer from a tag and a mask value.

    Args:
      mask_tag: Side input tag for the mask side input. This should be used to
        identify the sdie inputs that correspond to the same attention mask
        throughout the model.
      masked_out_value: The value to replace masked out values with. This is
        usually a large (but finite) negative value, so that it maps to a
        negligible attention weight in a numerically stable way.

    Returns:
      A new ``ApplyAttentionMask`` layer with the given configuration.
    """
    return cls(
        mask=side_input.SideInputRequest(tag=mask_tag),
        masked_out_value=masked_out_value,
    )
Creates an ``ApplyAttentionMask`` layer from a tag and a mask value.

    Args:
      mask_tag: Side input tag for the mask side input. This should be used to
        identify the sdie inputs that correspond to the same attention mask
        throughout the model.
      masked_out_value: The value to replace masked out values with. This is
        usually a large (but finite) negative value, so that it maps to a
        negligible attention weight in a numerically stable way.

    Returns:
      A new ``ApplyAttentionMask`` layer with the given configuration.
    
penzai/deprecated/v1/nn/attention.py