[Rebase] Rebase to vllm 0.28.0 (#6606)
Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
da4a08b65b
commit
651b03225b
42 files changed
+931
-121
No files matched your search
@@ -1,3 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import torch
|
||||
@@ -91,6 +94,21 @@ class MoTQKVParallelLinear(QKVParallelLinear):
|
||||
# boilerplate Module subclass just for the VAE pathway.
|
||||
self.gen_exp = torch.nn.Module()
|
||||
|
||||
# ``gen_exp`` participates in the same tensor-parallel layout as this
|
||||
# layer. vLLM's online quantizers inspect these attributes while
|
||||
# processing weights (for example, FP8 uses them to share scales across
|
||||
# TP ranks), so the lightweight container must expose the parallel
|
||||
# linear metadata rather than only holding parameters.
|
||||
for attr in (
|
||||
"tp_rank",
|
||||
"tp_size",
|
||||
"input_size",
|
||||
"input_size_per_partition",
|
||||
"output_size",
|
||||
"output_size_per_partition",
|
||||
):
|
||||
setattr(self.gen_exp, attr, getattr(self, attr))
|
||||
|
||||
# Use the same weight_loader as text
|
||||
vae_weight_loader = (
|
||||
self.weight_loader_v2
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import torch
|
||||
@@ -84,6 +87,21 @@ class MoTRowParallelLinear(RowParallelLinear):
|
||||
# boilerplate Module subclass just for the VAE pathway.
|
||||
self.gen_exp = torch.nn.Module()
|
||||
|
||||
# ``gen_exp`` participates in the same tensor-parallel layout as this
|
||||
# layer. vLLM's online quantizers inspect these attributes while
|
||||
# processing weights (for example, FP8 uses them to share scales across
|
||||
# TP ranks), so the lightweight container must expose the parallel
|
||||
# linear metadata rather than only holding parameters.
|
||||
for attr in (
|
||||
"tp_rank",
|
||||
"tp_size",
|
||||
"input_size",
|
||||
"input_size_per_partition",
|
||||
"output_size",
|
||||
"output_size_per_partition",
|
||||
):
|
||||
setattr(self.gen_exp, attr, getattr(self, attr))
|
||||
|
||||
# Select weight_loader consistent with text
|
||||
vae_weight_loader = (
|
||||
self.weight_loader_v2
|
||||
|
||||
Reference in new issue
Block a user