MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __call__

Method __call__

t5/t5.py:213–220  ·  view source on GitHub ↗
(self, x, mask)

Source from the content-addressed store, hash-verified

211 self.dense = DenseActivation(config)
212
213 def __call__(self, x, mask):
214 y = self.ln1(x)
215 y, _ = self.attention(y, y, y, mask=mask)
216 x = x + y
217
218 y = self.ln2(x)
219 y = self.dense(y)
220 return x + y
221
222
223class TransformerEncoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected