(
self,
input_ids,
position_ids,
attention_mask,
layer_past=None,
get_key_value=False,
prompt_length=None,
context_length=None,
)
| 866 | self._transformer_key = 'transformer' |
| 867 | |
| 868 | def forward( |
| 869 | self, |
| 870 | input_ids, |
| 871 | position_ids, |
| 872 | attention_mask, |
| 873 | layer_past=None, |
| 874 | get_key_value=False, |
| 875 | prompt_length=None, |
| 876 | context_length=None, |
| 877 | ): |
| 878 | |
| 879 | # Embeddings. |
| 880 | embedding_output = self.embedding(input_ids, position_ids) |
| 881 | query_position_ids = position_ids |
| 882 | queryEmbedding_out = self.topQueryEmbedding(query_position_ids) |
| 883 | |
| 884 | # Transformer. |
| 885 | transformer_output = self.transformer(embedding_output, |
| 886 | queryEmbedding_out, |
| 887 | attention_mask, |
| 888 | layer_past=layer_past, |
| 889 | get_key_value=get_key_value, |
| 890 | prompt_length=prompt_length, |
| 891 | context_length=context_length) |
| 892 | |
| 893 | return transformer_output |
| 894 | |
| 895 | def state_dict_for_save_checkpoint(self, destination=None, prefix='', |
| 896 | keep_vars=False): |
nothing calls this directly
no outgoing calls
no test coverage detected