[Performance][Model] Avoid transient Inkling result allocations (performance, and OOM prevention on smaller memory configurations) (#49487)
Signed-off-by: Michael Gschwind <mgschwind@nvidia.com> Co-authored-by: Michael Gschwind <mgschwind@nvidia.com> Co-authored-by: OpenAI Codex <codex@openai.com>
Mike G committed
Jul 22, 2026 at 22:03 UTC
9a698f3255a7cc82759f8c623c9ecda50b1e4858
2 files changed
+2
-2
vllm/models/inkling/nvidia/mlp.py
+1
-1
@@ -58,6 +58,6 @@ class InklingDenseMLP(nn.Module):
58
x = silu_and_mul_triton(gate_up)
59
x, _ = self.down_proj(x)
60
if self.global_scale is not None:
61
- x = x * self.global_scale
61
+ x.mul_(self.global_scale)
62
# TP-partial output: the layer's reduce-scatter fallback consumes it.
63
return x
vllm/models/inkling/nvidia/moe.py
+1
-1
@@ -528,7 +528,7 @@ class InklingMoE(nn.Module):
528
)
529
self._routed_sel = None
530
531
- return out + sink_out
531
+ return out.add_(sink_out)
532
533
# -- weight loading ----------------------------------------------------
534