Fix Transformers backend FP8 MoE and remove some boilerplate (#46820)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -68,7 +68,7 @@ from vllm.model_executor.model_loader.weight_utils import (
|
||||
from vllm.sequence import IntermediateTensors
|
||||
from vllm.transformers_utils.configs.hy_v3 import HYV3Config
|
||||
|
||||
from .interfaces import SupportsLoRA, SupportsPP
|
||||
from .interfaces import MixtureOfExperts, SupportsLoRA, SupportsPP
|
||||
from .utils import (
|
||||
AutoWeightsLoader,
|
||||
PPMissingLayer,
|
||||
@@ -392,7 +392,7 @@ class HYV3DecoderLayer(nn.Module):
|
||||
|
||||
|
||||
@support_torch_compile
|
||||
class HYV3Model(nn.Module):
|
||||
class HYV3Model(nn.Module, MixtureOfExperts):
|
||||
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
||||
super().__init__()
|
||||
|
||||
@@ -429,7 +429,6 @@ class HYV3Model(nn.Module):
|
||||
)
|
||||
|
||||
# Set MoE hyperparameters
|
||||
self.expert_weights = []
|
||||
self.num_expert_groups = 1
|
||||
self.moe_layers = []
|
||||
example_layer = None
|
||||
|
||||
Reference in New Issue
Block a user