PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
fix CI for transformers==5.4.0 (#1627)
Xin He5a38a3946c55
diff --git a/test/helpers.py b/test/helpers.pyindex 045a7eeb9..f7beaf51f 100644--- a/test/helpers.py+++ b/test/helpers.py@@ -222,6 +222,10 @@ def get_tiny_model(model_name_or_path, num_layers=2, num_experts=None, is_mllm=F# ---- lightweight path: config-only, random weights ----trust_remote_code = kwargs.pop("trust_remote_code", True)config = transformers.AutoConfig.from_pretrained(model_name_or_path, trust_remote_code=trust_remote_code)+ # Special cases+ if config.model_type == "qwen3_omni_moe":+ config.initializer_range = 0.02 # Default initializer range for weight initialization+_reduce_config_layers(config, num_layers, num_experts)# Pick the right model classdiff --git a/test/test_cpu/models/test_omni_model.py b/test/test_cpu/models/test_omni_model.pyindex f69899a12..2c7968752 100644--- a/test/test_cpu/models/test_omni_model.py+++ b/test/test_cpu/models/test_omni_model.py@@ -76,6 +76,7 @@ def _make_tiny_qwen3_omni_moe_config():config.code2wav_config.num_attention_heads = 4config.code2wav_config.num_key_value_heads = 4config.code2wav_config.intermediate_size = 128+ config.initializer_range = 0.02 # Default initializer range for weight initializationreturn config