class_docstr: Implementation of a model for inference composable with ragged batching.
class_docstr_tok: ["Implementation","of","a","model","for","inference","composable","with","ragged","batching","."]
docstr: Minimal initialization of the model.
  
  Arguments:
      config (DSModelImplementationConfig): Model-specific configuration. No assumptions
          should be made about this config that are not closely tied to the specific
          model implementation.
      engine_config (RaggedInferenceEngineConfig): Engine configuration.
      base_mp_group (MPType): Base communication group for Tensor-parallel inference.
docstr_tok: ["Minimal","initialization","of","the","model",".","Arguments",":","config","(","DSModelImplementationConfig",")",":","Model-specific","configuration",".","No","assumptions","should","be","made","about","this","config","that","are","not","closely","tied","to","the","specific","model","implementation",".","engine_config","(","RaggedInferenceEngineConfig",")",":","Engine","configuration",".","base_mp_group","(","MPType",")",":","Base","communication","group","for","Tensor-parallel","inference","."]
code: def __init__(
      self,
      config: DSModelImplementationConfig,
      engine_config: RaggedInferenceEngineConfig,
      base_mp_group: MPType,
  ) -> None:
      """
      Minimal initialization of the model.
  
      Arguments:
          config (DSModelImplementationConfig): Model-specific configuration. No assumptions
              should be made about this config that are not closely tied to the specific
              model implementation.
          engine_config (RaggedInferenceEngineConfig): Engine configuration.
          base_mp_group (MPType): Base communication group for Tensor-parallel inference.
      """
      super().__init__()
      self._config = config
      self._engine_config = engine_config
      self._base_mp_group = base_mp_group
  
      # Set to None until the Policy sets the model parameters
      self._non_transformer = None
      self._transformer = None
      self._flattened_param_buffer = None
      self._flattened_param_metadata = None
  
imports: from abc import ABC, abstractmethod
  from typing import Iterable, Optional, Tuple, Type
  import torch
  import deepspeed.comm
  from ..ragged import DSStateManager, RaggedBatchWrapper
  from ..ragged.manager_configs import KVCacheConfig
  from ..ragged import DSSequenceDescriptor
  from ..model_implementations.layer_container_base import LayerContainer
  from ..config_v2 import RaggedInferenceEngineConfig
  from .flat_model_helpers import ModelMetadata
label_desc: Use image node_id 1 to create a new DSInferenceModelBase object from inherited base classes: torch.nn, ABC with example: obj = DSInferenceModelBase(config, engine_config, base_mp_group)