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

Method __init__

tensorrt_llm/models/dbrx/model.py:117–132  ·  view source on GitHub ↗
(self, config: DbrxConfig)

Source from the content-addressed store, hash-verified

115class DbrxModel(Module):
116
117 def __init__(self, config: DbrxConfig):
118 super().__init__()
119 self.config = config
120
121 if config.mapping.is_first_pp_rank():
122 self.vocab_embedding = Embedding(config.vocab_size,
123 config.hidden_size,
124 dtype=config.dtype)
125
126 self.layers = DecoderLayerList(DbrxDecoderLayer, config)
127
128 if config.mapping.is_last_pp_rank():
129 self.ln_f = LayerNorm(normalized_shape=config.hidden_size,
130 eps=config.norm_epsilon,
131 bias=False,
132 dtype=config.dtype)
133
134 def forward(self,
135 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