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

Method forward

distributed/tensor_parallelism/llama2_model.py:266–267  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

264 self.w3 = nn.Linear(dim, hidden_dim, bias=False)
265
266 def forward(self, x):
267 return self.w2(F.silu(self.w1(x)) * self.w3(x))
268
269 def init_weights(self, init_std: float):
270 nn.init.trunc_normal_(self.w1.weight, mean=0.0, std=0.02)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected