MCPcopy Create free account
hub / github.com/pytorch/examples / forward

Method forward

distributed/minGPT-ddp/mingpt/model.py:75–78  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

73 )
74
75 def forward(self, x):
76 x = x + self.attn(self.ln1(x))
77 x = x + self.mlp(self.ln2(x))
78 return x
79
80class EmbeddingStem(nn.Module):
81 def __init__(self, config: GPTConfig, device="cpu", dtype=torch.float32):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected