MCPcopy Create free account
hub / github.com/NineAbyss/ZeroG / forward

Method forward

code/model.py:306–313  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

304
305
306 def forward(self, input):
307 inputs = self.tokenizer(input, return_tensors='pt', truncation=True, padding=True).to(self.textmodel.device)
308
309 with torch.no_grad():
310 outputs = self.textmodel(**inputs)
311
312 text_embedding = outputs[0][:,0,:].squeeze()
313 return text_embedding

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected