(self, d_model, d_ff, dropout=0.0)
| 563 | |
| 564 | class MappingFeedForwardBlock(nn.Module): |
| 565 | def __init__(self, d_model, d_ff, dropout=0.0): |
| 566 | super().__init__() |
| 567 | self.norm = RMSNorm(d_model) |
| 568 | self.up_proj = apply_wd(LinearGEGLU(d_model, d_ff, bias=False)) |
| 569 | self.dropout = nn.Dropout(dropout) |
| 570 | self.down_proj = apply_wd(zero_init(Linear(d_ff, d_model, bias=False))) |
| 571 | |
| 572 | def forward(self, x): |
| 573 | skip = x |