[Model] Support DeepSeek-V4.1-Flash (#56214)
Signed-off-by: Yongye Zhu <zyy1102000@gmail.com> Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai> Signed-off-by: andyluo7 <andy.luo@amd.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Jee Jee Li <jeejeelee@inferact.ai> Co-authored-by: andyluo7 <andy.luo@amd.com> Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Jee Jee Li
andyluo7
OpenAI Codex
zjy0516
Claude Opus 5
parent
e6821ceac9
commit
e77daef89e
@@ -8,7 +8,7 @@ expose_input_quant_key; the kernel validates and reads the activation via
|
||||
as_quantized_activation.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, replace
|
||||
|
||||
import torch
|
||||
|
||||
@@ -34,6 +34,16 @@ class QuantizedActivation:
|
||||
orig_shape: torch.Size
|
||||
quant_key: QuantKey
|
||||
|
||||
def weak_ref(self) -> "QuantizedActivation":
|
||||
"""Return a copy with non-owning tensor references for CUDA graph replay."""
|
||||
from vllm.utils.torch_utils import weak_ref_tensor
|
||||
|
||||
return replace(
|
||||
self,
|
||||
data=weak_ref_tensor(self.data),
|
||||
scale=weak_ref_tensor(self.scale),
|
||||
)
|
||||
|
||||
|
||||
def expose_input_quant_key(layer: torch.nn.Module, kernel) -> None:
|
||||
"""Advertise the kernel's pre-quantized input key on the layer, if any.
|
||||
|
||||
Reference in New Issue
Block a user