update callable

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
yewentao256
2026-07-23 17:15:12 +00:00
parent 36279d33ad
commit ef83fbb6d8
2 changed files with 8 additions and 6 deletions
@@ -1,8 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import copy
from collections.abc import Iterable
from typing import Any
from collections.abc import Callable, Iterable
import torch
import torch.nn as nn
@@ -618,7 +617,9 @@ class BailingMoeV25Model(nn.Module):
return False
param = params_dict[name]
weight_loader: Any = getattr(param, "weight_loader", default_weight_loader)
weight_loader: Callable[..., None] = getattr(
param, "weight_loader", default_weight_loader
)
if shard_id is None:
weight_loader(param, tensor)
@@ -2,8 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Inference-only Bailing MoE v2.5 MTP model."""
from collections.abc import Iterable
from typing import Any
from collections.abc import Callable, Iterable
import torch
import torch.nn as nn
@@ -277,7 +276,9 @@ class BailingMoeV25MTPModel(nn.Module):
return False
param = params_dict[name]
weight_loader: Any = getattr(param, "weight_loader", default_weight_loader)
weight_loader: Callable[..., None] = getattr(
param, "weight_loader", default_weight_loader
)
if shard_id is None:
weight_loader(param, loaded_weight)
elif isinstance(shard_id, int):