(self, params)
| 288 | |
| 289 | class MPTForCausalLM(nn.Module): |
| 290 | def __init__(self, params): |
| 291 | super().__init__() |
| 292 | self.config = params |
| 293 | self.transformer = Transformer(params) |
| 294 | if params.no_bias: |
| 295 | for module in self.modules(): |
| 296 | if hasattr(module, "bias") and isinstance(module.bias, nn.Parameter): |
| 297 | module.register_parameter("bias", None) |
| 298 | |
| 299 | @torch.inference_mode() |
| 300 | def forward(self, tokens: torch.Tensor, start_pos: int): |
nothing calls this directly
no test coverage detected