(self, texts, device)
| 526 | name=tokenizer_path, seq_len=text_len, clean='whitespace') |
| 527 | |
| 528 | def __call__(self, texts, device): |
| 529 | ids, mask = self.tokenizer( |
| 530 | texts, return_mask=True, add_special_tokens=True) |
| 531 | ids = ids.to(device) |
| 532 | mask = mask.to(device) |
| 533 | seq_lens = mask.gt(0).sum(dim=1).long() |
| 534 | context = self.model(ids, mask) |
| 535 | return [u[:v] for u, v in zip(context, seq_lens)] |
nothing calls this directly
no outgoing calls
no test coverage detected