(self, layer_idx: int, lora_module: str)
| 161 | partial_lora_mask=self.partial_lora_mask) |
| 162 | |
| 163 | def get_runtime_params(self, layer_idx: int, lora_module: str): |
| 164 | if f"{lora_module}_lora_ranks" in self.lora_ranks[layer_idx]: |
| 165 | return LoraRuntimeParams( |
| 166 | lora_ranks=[ |
| 167 | self.lora_ranks[layer_idx][f"{lora_module}_lora_ranks"] |
| 168 | ], |
| 169 | lora_weights_pointers=[ |
| 170 | self.lora_weights_pointers[layer_idx] |
| 171 | [f"{lora_module}_lora_weights_pointers"] |
| 172 | ], |
| 173 | host_context_lengths=self.host_context_lengths, |
| 174 | max_encoder_context_length=self.max_encoder_context_length, |
| 175 | host_request_types=self.host_request_types, |
| 176 | host_encoder_input_lengths=self.host_encoder_input_lengths, |
| 177 | weight_index=self.weight_index, |
| 178 | partial_lora_mask=self.partial_lora_mask, |
| 179 | ) |
| 180 | else: |
| 181 | return None |
no test coverage detected