Revert "[MoE Refactor] Migrate MoeWNA16Method quantization to MK orac… (#44033)

Signed-off-by: Bill Nell <bnell@redhat.com>
This commit is contained in:
bnellnm
2026-05-29 16:45:29 -07:00
committed by GitHub
parent 8fad266507
commit 187457a952
8 changed files with 98 additions and 333 deletions
@@ -3,7 +3,7 @@
from collections.abc import Mapping
from copy import deepcopy
from types import MappingProxyType
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING
import regex as re
import torch
@@ -69,20 +69,6 @@ def get_dynamic_override(
return default_value
def flatten_list(lst: list[Any]) -> list[Any]:
output = []
def _flatten(lst: list[Any]):
for i in lst:
if isinstance(i, list):
_flatten(i)
else:
output.append(i)
_flatten(lst)
return output
def is_layer_gptq_quantized(
prefix: str,
quantized_layers: list[str],
@@ -97,8 +83,6 @@ def is_layer_gptq_quantized(
proj_name = prefix.split(".")[-1]
quantized_layers = flatten_list(quantized_layers)
# Fused layers like gate_up_proj or qkv_proj will not be fused
# in the safetensors checkpoint. So, we convert the name
# from the fused version to unfused + check to make sure that