(self, x: torch.Tensor)
| 79 | self.mlp = MLP(n_embd, dropout) |
| 80 | |
| 81 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 82 | x = x + self.attn(self.ln_1(x)) |
| 83 | x = x + self.mlp(self.ln_2(x)) |
| 84 | return x |
| 85 | |
| 86 | |
| 87 | class GPT2(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected