(self, prefix: torch.Tensor)
| 340 | config.num_layers * config.kv_channels * config.multi_query_group_num * 2) |
| 341 | |
| 342 | def forward(self, prefix: torch.Tensor): |
| 343 | if self.prefix_projection: |
| 344 | prefix_tokens = self.embedding(prefix) |
| 345 | past_key_values = self.trans(prefix_tokens) |
| 346 | else: |
| 347 | past_key_values = self.embedding(prefix) |
| 348 | return past_key_values |
| 349 | |
| 350 | |
| 351 | def split_tensor_along_last_dim( |
nothing calls this directly
no outgoing calls
no test coverage detected