MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / forward

Method forward

tensorrt_llm/quantization/layers.py:284–295  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

282 self.register_parameter('scale_to_int', None)
283
284 def forward(self, x):
285 weight = None if self.weight is None else self.weight.value
286 bias = None if self.bias is None else self.bias.value
287 scale = None if self.scale_to_int is None else self.scale_to_int.value
288 return smooth_quant_layer_norm(
289 x,
290 self.normalized_shape,
291 weight,
292 bias,
293 scale,
294 self.eps,
295 dynamic_act_scaling=self.quant_mode.has_per_token_dynamic_scaling())
296
297
298class SmoothQuantRmsNorm(Module):

Callers 1

Calls 2

smooth_quant_layer_normFunction · 0.85

Tested by 1