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