[Dependency] Update Humming and remove NVFP4 scale workaround (#61556)
Signed-off-by: jinzhen.ljz <jinzhen.ljz@antgroup.com> Co-authored-by: Codex <codex@openai.com> Co-authored-by: Misha Goin <mgoin64@gmail.com> Co-authored-by: Kevin H. Luu <khluu000@gmail.com>
This commit is contained in:
co-authored by
Codex
Misha Goin
Kevin H. Luu
parent
2e8a5930f6
commit
fe98d90a9d
+22
-4
@@ -11,6 +11,10 @@ symbols to both the ``TYPE_CHECKING`` imports and ``_EXPORTS``, using
|
||||
import importlib
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import torch
|
||||
|
||||
from vllm.utils.platform_utils import num_compute_units
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from humming import dtypes as dtypes
|
||||
from humming.config import GemmType as GemmType
|
||||
@@ -50,8 +54,9 @@ if TYPE_CHECKING:
|
||||
from humming.schema.modelopt import (
|
||||
ModeloptNvfp4WeightSchema as ModeloptNvfp4WeightSchema,
|
||||
)
|
||||
from humming.transform import prepare_layer_config as prepare_layer_config
|
||||
from humming.transform import transform_humming_tensors as transform_humming_tensors
|
||||
from humming.transform import (
|
||||
prepare_and_transform_humming_tensors as prepare_and_transform_humming_tensors,
|
||||
)
|
||||
from humming.tune import get_heuristics_config as get_heuristics_config
|
||||
from humming.utils.weight import quantize_weight as quantize_weight
|
||||
|
||||
@@ -68,8 +73,9 @@ _EXPORTS: dict[str, str] = {
|
||||
"may_process_input": "humming.forward:may_process_input",
|
||||
"process_input": "humming.ops:process_input",
|
||||
"may_quant_input": "humming.forward:may_quant_input",
|
||||
"prepare_layer_config": "humming.transform:prepare_layer_config",
|
||||
"transform_humming_tensors": "humming.transform:transform_humming_tensors",
|
||||
"prepare_and_transform_humming_tensors": (
|
||||
"humming.transform:prepare_and_transform_humming_tensors"
|
||||
),
|
||||
"get_heuristics_config": "humming.tune:get_heuristics_config",
|
||||
"BaseInputSchema": "humming.schema:BaseInputSchema",
|
||||
"BaseWeightSchema": "humming.schema:BaseWeightSchema",
|
||||
@@ -91,6 +97,18 @@ _EXPORTS: dict[str, str] = {
|
||||
}
|
||||
|
||||
|
||||
def create_humming_locks(device: torch.device | str) -> torch.Tensor:
|
||||
device = torch.device(device)
|
||||
device_index = device.index
|
||||
if device_index is None:
|
||||
device_index = torch.accelerator.current_device_index()
|
||||
return torch.zeros(
|
||||
num_compute_units(device_index) * 8,
|
||||
dtype=torch.int32,
|
||||
device=device,
|
||||
)
|
||||
|
||||
|
||||
def __getattr__(name: str) -> Any:
|
||||
spec = _EXPORTS.get(name)
|
||||
if spec is None:
|
||||
|
||||
Reference in New Issue
Block a user