(self, prefix: torch.Tensor)
| 82 | config.num_layers * config.kv_channels * config.multi_query_group_num * 2) |
| 83 | |
| 84 | def forward(self, prefix: torch.Tensor): |
| 85 | if self.prefix_projection: |
| 86 | prefix_tokens = self.embedding(prefix) |
| 87 | past_key_values = self.trans(prefix_tokens) |
| 88 | else: |
| 89 | past_key_values = self.embedding(prefix) |
| 90 | return past_key_values |
| 91 | |
| 92 | |
| 93 | def split_tensor_along_last_dim( |
nothing calls this directly
no outgoing calls
no test coverage detected