MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / __init__

Method __init__

inference/models/mpt.py:290–297  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

288
289class 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):

Callers

nothing calls this directly

Calls 2

TransformerClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected