MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / _get_weights

Method _get_weights

tensorrt_llm/parameter.py:255–263  ·  view source on GitHub ↗
(self, network)

Source from the content-addressed store, hash-verified

253 self._get_weights(network), name)
254
255 def _get_weights(self, network) -> trt.Weights | Tensor | None:
256 tensor = network.get_parameter_tensor(self)
257 if self.is_managed(network):
258 return tensor
259 elif tensor is not None:
260 tensor.producer.__class__ = trt.IConstantLayer
261 return tensor.producer.weights
262 else:
263 return None
264
265 def _regularize_value(self, value):
266 if isinstance(value, np.ndarray):

Callers 3

set_nameMethod · 0.95
refit_engineMethod · 0.80
build_engineMethod · 0.80

Calls 2

is_managedMethod · 0.95
get_parameter_tensorMethod · 0.80

Tested by

no test coverage detected