MCPcopy Create free account
hub / github.com/AMAP-ML/Eevee / forward

Method forward

models/text_encoder.py:245–254  ·  view source on GitHub ↗
(self, ids, mask=None)

Source from the content-addressed store, hash-verified

243 self.apply(init_weights)
244
245 def forward(self, ids, mask=None):
246 x = self.token_embedding(ids)
247 x = self.dropout(x)
248 e = self.pos_embedding(x.size(1),
249 x.size(1)) if self.shared_pos else None
250 for block in self.blocks:
251 x = block(x, mask, pos_bias=e)
252 x = self.norm(x)
253 x = self.dropout(x)
254 return x
255
256 @staticmethod
257 def state_dict_converter():

Callers

nothing calls this directly

Calls 1

normMethod · 0.80

Tested by

no test coverage detected