Run a forward pass for each of the models and return the respective embeddings.
(self, query_tokens, query_attention_mask, block_tokens, block_attention_mask)
| 64 | self._block_key = 'context_model' |
| 65 | |
| 66 | def forward(self, query_tokens, query_attention_mask, block_tokens, block_attention_mask): |
| 67 | """Run a forward pass for each of the models and return the respective embeddings.""" |
| 68 | query_logits = self.embed_query(query_tokens, query_attention_mask) |
| 69 | block_logits = self.embed_block(block_tokens, block_attention_mask) |
| 70 | return query_logits, block_logits |
| 71 | |
| 72 | def embed_query(self, query_tokens, query_attention_mask): |
| 73 | """Embed a batch of tokens using the query model""" |
no test coverage detected