class_docstr: Dimensioning properties
class_docstr_tok: ["Dimensioning","properties"]
docstr: Number of local heads post sharding.
docstr_tok: ["Number","of","local","heads","post","sharding","."]
code: def n_heads_q_local(self) -> int:
      """
      Number of local heads post sharding.
      """
      return get_local_heads(
          self.tp_rank, self.tp_size, self.n_heads_q, self.n_heads_kv
      )[0]
  
imports: from abc import abstractmethod
  from typing import Optional
  import torch
  from deepspeed.accelerator import get_accelerator
  from ..config_v2 import RaggedInferenceEngineConfig
  from ..inference_utils import ActivationType, ceil_div, is_gated
  from ..model_implementations import *
  from ..model_implementations.sharding import *
  from ..modules.configs import DSEmbeddingsConfig, DSLinearConfig, DSMoEConfig, DSNormConfig, DSSelfAttentionConfig, DSUnembedConfig, NormTypeEnum, PositionalEmbeddingType
  from ..modules import heuristics
  from ..ragged import DSSequenceDescriptor, KVCacheConfig, RaggedBatchWrapper
  from .inference_model_base import DSInferenceModelBase, DSModelImplementationConfig, MPType
  from ..inference_parameter import InferenceParameter
label_desc: Use image node_id 13 for calling the DSTransformerModelBase obj's underlying member method code with example usage: obj.n_heads_q_local() and returns: get_local_heads