class_docstr: Inference model implementation for Mixtral models.
class_docstr_tok: ["Inference","model","implementation","for","Mixtral","models","."]
docstr: Base implementation for initialization. By default, this will initialize
  the traditional components of a transformer model:
      - Embedding
      - QKV projection
      - Self attention
      - Attention output projection
      - Feed forward network
      - Normalization
      - Unembedding
  
  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: ["Base","implementation","for","initialization",".","By","default",",","this","will","initialize","the","traditional","components","of","a","transformer","model",":","-","Embedding","-","QKV","projection","-","Self","attention","-","Attention","output","projection","-","Feed","forward","network","-","Normalization","-","Unembedding","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:
      """
      Base implementation for initialization. By default, this will initialize
      the traditional components of a transformer model:
          - Embedding
          - QKV projection
          - Self attention
          - Attention output projection
          - Feed forward network
          - Normalization
          - Unembedding
  
      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__(config, engine_config, base_mp_group)
  
      self.make_norm_layer()
      self.make_qkv_layer()
      self.make_attn_layer()
      self.make_attn_out_layer()
      self.make_moe_layer()
      self.make_embedding_layer()
      self.make_unembedding_layer()
      self._kv_cache_config = None
  
imports: from typing import Iterable, Optional, Tuple
  import torch
  import deepspeed.comm
  from ...allocator import empty_from
  from ...config_v2 import RaggedInferenceEngineConfig
  from ...inference_utils import ActivationType, DtypeEnum
  from ...model_implementations import *
  from ...modules.configs import *
  from ...modules.interfaces import *
  from ...modules import heuristics
  from ...ragged import RaggedBatchWrapper
  from ..inference_model_base import DSModelImplementationConfig, MPType
  from .container import MixtralNonTransformerContainer, MixtralTransformerContainer
label_desc: Use image node_id 16 to create a new MixtralInferenceModel object from inherited base classes: DSMoETransformerModelBase with example: obj = MixtralInferenceModel(config, engine_config, base_mp_group)