MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / num_layers

Method num_layers

tensorrt_llm/runtime/generation.py:1175–1178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1173
1174 @property
1175 def num_layers(self):
1176 assert self._model_config.num_layers % self.mapping.pp_size == 0, \
1177 f"num_layers {self._model_config.num_layers} must be a multiple of pipeline parallelism size {self.mapping.pp_size}"
1178 return self._model_config.num_layers // self.mapping.pp_size
1179
1180 @property
1181 def first_layer(self):

Callers 1

from_model_config_cppMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected