(self, x: Tensor, *args, **kwargs)
| 80 | self.norm = nn.LayerNorm(dim) |
| 81 | |
| 82 | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: |
| 83 | skip = x |
| 84 | for attn, ffn in zip(self.layers, self.ffn_layers): |
| 85 | x, _ = attn(x, x, x, is_causal=True, *args, **kwargs) |
| 86 | x = self.norm(x + skip) |
| 87 | x = ffn(x) + x |
| 88 | return x |
| 89 | |
| 90 | |
| 91 | # [MAIN MODEL] BitNetTransformer |
nothing calls this directly
no outgoing calls
no test coverage detected