MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / get_runtime_params

Method get_runtime_params

tensorrt_llm/layers/lora.py:163–181  ·  view source on GitHub ↗
(self, layer_idx: int, lora_module: str)

Source from the content-addressed store, hash-verified

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

Callers 13

_moe_pluginFunction · 0.80
forwardMethod · 0.80
get_paramsMethod · 0.80
forward_expertsMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
fc_gate_loraFunction · 0.80
fc_gate_doraFunction · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
fc_gate_pluginMethod · 0.80

Calls 1

LoraRuntimeParamsClass · 0.85

Tested by

no test coverage detected