MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / forward

Method forward

inference/models/mpt.py:89–92  ·  view source on GitHub ↗
(self, input: torch.Tensor, unembed: bool = False)

Source from the content-addressed store, hash-verified

87
88class SharedEmbedding(nn.Embedding):
89 def forward(self, input: torch.Tensor, unembed: bool = False) -> torch.Tensor:
90 if unembed:
91 return F.linear(input, self.weight)
92 return super().forward(input)
93
94
95class MPTAttentionFused(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected