(self, layer_id: int, args)
| 233 | |
| 234 | class MPTBlock(nn.Module): |
| 235 | def __init__(self, layer_id: int, args): |
| 236 | super().__init__() |
| 237 | self.n_heads = args.n_heads |
| 238 | self.dim = args.d_model |
| 239 | self.head_dim = args.d_model // args.n_heads |
| 240 | self.attn = MPTAttentionFused(args) |
| 241 | self.ffn = MPTMLP(d_model=args.d_model, expansion_ratio=4) |
| 242 | self.layer_id = layer_id |
| 243 | self.norm_1 = LPLayerNorm(args.d_model, eps=1e-6) |
| 244 | self.norm_2 = LPLayerNorm(args.d_model, eps=1e-6) |
| 245 | |
| 246 | def forward( |
| 247 | self, |
nothing calls this directly
no test coverage detected