(self, config: DbrxConfig)
| 115 | class 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, |
no test coverage detected