[fix] qwen3.5 fuse_moe_triton_tune bug (#20232)
This commit is contained in:
@@ -37,11 +37,7 @@ def get_model_config(
|
|||||||
topk_ids_dir: str = None,
|
topk_ids_dir: str = None,
|
||||||
) -> Dict:
|
) -> Dict:
|
||||||
config = get_config(model_name, trust_remote_code=True)
|
config = get_config(model_name, trust_remote_code=True)
|
||||||
|
architecture = config.architectures[0]
|
||||||
# Replace config with text_config for encoder-decoder models after getting block_shape and architecture
|
|
||||||
if hasattr(config, "text_config"):
|
|
||||||
config = config.get_text_config()
|
|
||||||
|
|
||||||
block_shape = None
|
block_shape = None
|
||||||
if (
|
if (
|
||||||
hasattr(config, "quantization_config")
|
hasattr(config, "quantization_config")
|
||||||
@@ -61,8 +57,9 @@ def get_model_config(
|
|||||||
group_size = weights_config.get("group_size")
|
group_size = weights_config.get("group_size")
|
||||||
block_shape = [0, group_size]
|
block_shape = [0, group_size]
|
||||||
assert len(block_shape) == 2
|
assert len(block_shape) == 2
|
||||||
|
# Replace config with text_config for encoder-decoder models after getting block_shape and architecture
|
||||||
architecture = config.architectures[0]
|
if hasattr(config, "text_config"):
|
||||||
|
config = config.get_text_config()
|
||||||
|
|
||||||
hidden_size = config.hidden_size
|
hidden_size = config.hidden_size
|
||||||
if architecture == "DbrxForCausalLM":
|
if architecture == "DbrxForCausalLM":
|
||||||
|
|||||||
Reference in New Issue
Block a user