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

Method __init__

tensorrt_llm/models/falcon/model.py:157–168  ·  view source on GitHub ↗
(self, config: FalconConfig)

Source from the content-addressed store, hash-verified

155class FalconModel(Module):
156
157 def __init__(self, config: FalconConfig):
158 super().__init__()
159 self.config = config
160 if config.mapping.is_first_pp_rank():
161 self.vocab_embedding = Embedding(config.vocab_size,
162 config.hidden_size,
163 dtype=config.dtype)
164
165 self.layers = DecoderLayerList(FalconDecoderLayer, config)
166 if config.mapping.is_last_pp_rank():
167 self.ln_f = LayerNorm(normalized_shape=config.hidden_size,
168 dtype=config.dtype)
169
170 def forward(self,
171 input_ids: Tensor,

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