class_docstr: Base mixin for all attention modules. The interface represented by this module
  is broadly:
  
  output = attention(query_key_value,
                     Optional[kv_cache],
                     Optional[attention_mask],
                     Optional[attention_bias])
class_docstr_tok: ["Base","mixin","for","all","attention","modules",".","The","interface","represented","by","this","module","is","broadly",":","output","=","attention","(","query_key_value",",","Optional","[","kv_cache","]",",","Optional","[","attention_mask","]",",","Optional","[","attention_bias","]",")"]
code: def __init__(
      self,
      config: DSSelfAttentionConfig,
      implementation_config: Dict[str, Any],
  ) -> None:
      super().__init__(config, implementation_config)
  
file_path: DeepSpeed/deepspeed/inference/v2/modules/interfaces/attention_base.py
imports: from typing import Any, Dict, Optional, Tuple, Type
  import torch
  from ...ragged import RaggedBatchWrapper
  from deepspeed.runtime.config_utils import DeepSpeedConfigModel
  from ..ds_module import DSModuleBase
  from ..module_registry import DSModuleRegistryBase
  from ..configs import DSSelfAttentionConfig
label_desc: Use image node_id 2 to create a new DSSelfAttentionBase object from inherited base classes: DSModuleBase with example: obj = DSSelfAttentionBase(config, implementation_config)