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

Method __init__

tensorrt_llm/models/mpt/model.py:114–126  ·  view source on GitHub ↗
(self, config: PretrainedConfig)

Source from the content-addressed store, hash-verified

112class MPTModel(Module):
113
114 def __init__(self, config: PretrainedConfig):
115 super().__init__()
116 self.config = config
117
118 if config.mapping.is_first_pp_rank():
119 self.vocab_embedding = Embedding(config.vocab_size,
120 config.hidden_size,
121 dtype=config.dtype)
122 self.layers = DecoderLayerList(MPTDecoderLayer, config)
123 if config.mapping.is_last_pp_rank():
124 self.ln_f = LayerNorm(normalized_shape=config.hidden_size,
125 bias=False,
126 dtype=config.dtype)
127
128 def forward(self,
129 input_ids,

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 5

DecoderLayerListClass · 0.85
EmbeddingClass · 0.50
LayerNormClass · 0.50
is_first_pp_rankMethod · 0.45
is_last_pp_rankMethod · 0.45

Tested by

no test coverage detected