Encode tokens into embeddings and outputs. :param tokens: list of token tensors for each TextModel :return: list of output embeddings for each architecture
(
self, tokenize_strategy: TokenizeStrategy, models: List[Any], tokens: List[torch.Tensor]
)
| 296 | return cls._strategy |
| 297 | |
| 298 | def encode_tokens( |
| 299 | self, tokenize_strategy: TokenizeStrategy, models: List[Any], tokens: List[torch.Tensor] |
| 300 | ) -> List[torch.Tensor]: |
| 301 | """ |
| 302 | Encode tokens into embeddings and outputs. |
| 303 | :param tokens: list of token tensors for each TextModel |
| 304 | :return: list of output embeddings for each architecture |
| 305 | """ |
| 306 | raise NotImplementedError |
| 307 | |
| 308 | def encode_tokens_with_weights( |
| 309 | self, tokenize_strategy: TokenizeStrategy, models: List[Any], tokens: List[torch.Tensor], weights: List[torch.Tensor] |
no outgoing calls
no test coverage detected