PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Refactor test timeouts and update dependencies for performance (#2361)
Sun, Xuehao1965bdf02fee
diff --git a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.shindex 394d2d9cc..e0413b795 100644--- a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh+++ b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh@@ -85,7 +85,7 @@ function setup_basic_test_env() {uv pip install -r test/unit/test_cuda/requirements.txtuv pip install -r test/unit/test_cuda/requirements_diffusion.txtuv pip install -U transformers chardet- uv pip install -U pytest-cov+ uv pip install -U pytest-cov pytest-timeoutuv pip install kernels==0.16.1 # For sm120: https://github.com/huggingface/transformers/blob/v5.16.1/setup.py#L93uv pip uninstall torch torchvisionuv pip install torch==2.14.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130@@ -105,7 +105,7 @@ function run_pytest() {echo "##[group]Running ${test_case}..."# Record the test targets so a retry can rerun exactly these cases.printf '%s\n' ${test_case} > "${ut_log_name%.log}.list"- pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs \+ pytest -m "not skip_ci" --timeout=600 --cov=auto_round --cov-report= --cov-append -vs \--junitxml="${ut_log_name%.log}.xml" ${test_case} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"}@@ -179,7 +179,7 @@ function run_unit_test_llmc() {cd "${BUILD_SOURCESDIRECTORY}" || exit 1rm -rf /root/.venvuv venv --python=3.14 /root/.venv- uv pip install -U pytest-cov+ uv pip install -U pytest-cov pytest-timeoutBUILD_TYPE="nightly" uv pip install \-r test/integration/test_cuda/requirements_llmc.txt \--extra-index-url https://download.pytorch.org/whl/cu130 \@@ -203,7 +203,7 @@ function run_unit_test_sglang() {cd "${BUILD_SOURCESDIRECTORY}" || exit 1rm -rf /root/.venvuv venv --python=3.14 /root/.venv- uv pip install -U pytest-cov+ uv pip install -U pytest-cov pytest-timeoutuv pip install -r test/integration/test_cuda/requirements_sglang.txt \--prerelease=allow \--extra-index-url https://download.pytorch.org/whl/cu130 \@@ -228,7 +228,7 @@ function run_unit_test_vllm() {cd "${BUILD_SOURCESDIRECTORY}" || exit 1rm -rf /root/.venvuv venv --python=3.14 /root/.venv- uv pip install -U pytest-cov+ uv pip install -U pytest-cov pytest-timeoutuv pip install -r test/integration/test_cuda/requirements_vllm.txt \--extra-index-url https://download.pytorch.org/whl/cu130 \--index-strategy unsafe-best-matchdiff --git a/.azure-pipelines/scripts/ut/run_ark_ut.sh b/.azure-pipelines/scripts/ut/run_ark_ut.shindex b59accd5c..648252724 100644--- a/.azure-pipelines/scripts/ut/run_ark_ut.sh+++ b/.azure-pipelines/scripts/ut/run_ark_ut.sh@@ -8,7 +8,7 @@ function setup_environment() {cd /auto-round/auto_round_extension/arkuv pip install -r requirements.txtuv pip install /auto-round/ark_wheel/*.whl --no-deps- uv pip install pytest pandas+ uv pip install pytest pytest-timeout pandasuv pip listecho "##[endgroup]"@@ -25,7 +25,7 @@ function run_unit_test() {echo "##[group]Running ark ${test_file}..."local ut_log_name="${LOG_DIR}/unittest_ark_${test_basename}.log"- COVERAGE_CORE=sysmon pytest -v ${test_file} 2>&1 | tee ${ut_log_name}+ COVERAGE_CORE=sysmon pytest --timeout=600 -v ${test_file} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"done}diff --git a/.azure-pipelines/scripts/ut/run_ut.sh b/.azure-pipelines/scripts/ut/run_ut.shindex b9324b958..6fee9f508 100644--- a/.azure-pipelines/scripts/ut/run_ut.sh+++ b/.azure-pipelines/scripts/ut/run_ut.sh@@ -27,7 +27,7 @@ function setup_environment() {git clone -b master --quiet --single-branch https://github.com/ggml-org/llama.cpp.git && cd llama.cpp/gguf-py && uv pip install .echo "Install unit report dependencies ..."- uv pip install pytest-cov+ uv pip install pytest-cov pytest-timeoutuv pip install -U chardetecho "Install auto-round for unit tests ..."@@ -65,7 +65,7 @@ function run_pytest() {# Record the test targets so a retry can rerun exactly these cases.printf '%s\n' ${test_case} > "${ut_log_name%.log}.list"numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \- pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs \+ pytest -m "not skip_ci" --timeout=600 --cov=auto_round --cov-report= --cov-append -vs \--junitxml="${ut_log_name%.log}.xml" ${test_case} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"}diff --git a/.azure-pipelines/scripts/ut/run_ut_cuda.sh b/.azure-pipelines/scripts/ut/run_ut_cuda.shindex a43d550b7..39182b329 100644--- a/.azure-pipelines/scripts/ut/run_ut_cuda.sh+++ b/.azure-pipelines/scripts/ut/run_ut_cuda.sh@@ -4,7 +4,9 @@set -xeCONDA_ENV_NAME="unittest_cuda"-PYTHON_VERSION="3.14"+PYTHON_VERSION="3.12"+TORCH_VERSION="2.14.0"+REPO_PATH=$(git rev-parse --show-toplevel)LOG_DIR=${REPO_PATH}/ut_log_dirSUMMARY_LOG=${LOG_DIR}/results_summary.log@@ -24,7 +26,7 @@ function create_conda_env() {if conda info --envs | grep -q "^$CONDA_ENV_NAME\s"; then conda remove -n ${CONDA_ENV_NAME} --all -y; ficonda create --quiet -n ${CONDA_ENV_NAME} python=${PYTHON_VERSION} setuptools -ysource activate ${CONDA_ENV_NAME} > /dev/null 2>&1- conda install --quiet -c conda-forge git gxx=11.2.0 gcc=11.2.0 gdb sysroot_linux-64 libgcc uv -y+ conda install --quiet -c conda-forge git gxx=13.4 gcc=13.4 gdb sysroot_linux-64 libgcc uv -yexport LD_PRELOAD=${CONDA_PREFIX}/lib/libstdc++.so.6# install AutoRound@@ -94,14 +96,14 @@ function run_unit_test() {cd ${REPO_PATH}/testrm -rf .coverage* *.xml *.html- uv pip install torch==2.14.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==${TORCH_VERSION} torchvision torchao --index-url https://download.pytorch.org/whl/cu130uv pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu130uv pip install 'git+https://github.com/ggml-org/llama.cpp.git@master#subdirectory=gguf-py'uv pip install -r unit/test_cuda/requirements.txtuv pip install -r unit/test_cuda/requirements_diffusion.txtuv pip install -U transformers chardetuv pip uninstall torch torchvision- uv pip install torch==2.14.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==${TORCH_VERSION} torchvision torchao --index-url https://download.pytorch.org/whl/cu130cd ${REPO_PATH} && uv pip install . && cd ${REPO_PATH}/testpip list > ${LOG_DIR}/ut_pip_list.txt@@ -130,9 +132,8 @@ function run_unit_test_vlm() {cd ${REPO_PATH}/testrm -rf .coverage* *.xml *.html- uv pip install torch==2.14.0 torchvision --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==${TORCH_VERSION} torchvision --index-url https://download.pytorch.org/whl/cu130uv pip install git+https://github.com/haotian-liu/[email protected] --no-deps- uv pip install flash-attn==2.8.3 --no-build-isolationuv pip install -r unit/test_cuda/requirements_vlm.txt \--extra-index-url https://download.pytorch.org/whl/cu130 \--index-strategy unsafe-best-matchdiff --git a/.azure-pipelines/scripts/ut/run_ut_hpu.sh b/.azure-pipelines/scripts/ut/run_ut_hpu.shindex ebad33723..8a6a0f1a1 100644--- a/.azure-pipelines/scripts/ut/run_ut_hpu.sh+++ b/.azure-pipelines/scripts/ut/run_ut_hpu.sh@@ -9,7 +9,7 @@ function setup_environment() {export TZ='Asia/Shanghai'export TQDM_MININTERVAL=60export HF_HUB_DISABLE_PROGRESS_BARS=1- pip install pytest-cov+ pip install pytest-cov pytest-timeoutpip listecho "##[endgroup]"@@ -38,14 +38,14 @@ function run_unit_test() {echo "##[group]Running ${test_file} in HPU lazy mode..."local ut_log_name="${LOG_DIR}/unittest_lazy_${test_basename}.log"- PT_HPU_LAZY_MODE=1 pytest --cov=auto_round \+ PT_HPU_LAZY_MODE=1 pytest --timeout=600 --cov=auto_round \--cov-report= --cov-append -vs \--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"echo "##[group]Running ${test_file} in HPU compile mode..."local ut_log_name="${LOG_DIR}/unittest_compile_${test_basename}.log"- PT_HPU_LAZY_MODE=0 pytest --mode compile --cov=auto_round \+ PT_HPU_LAZY_MODE=0 pytest --mode compile --timeout=600 --cov=auto_round \--cov-report= --cov-append -vs \--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"diff --git a/.azure-pipelines/scripts/ut/run_ut_xpu.sh b/.azure-pipelines/scripts/ut/run_ut_xpu.shindex 0837c1f2b..cdba8617c 100644--- a/.azure-pipelines/scripts/ut/run_ut_xpu.sh+++ b/.azure-pipelines/scripts/ut/run_ut_xpu.sh@@ -13,7 +13,7 @@ SESSION_TIMEOUT=600function setup_environment() {echo "##[group]set up UT env..."echo "Install unit report dependencies ..."- uv pip install pytest-cov+ uv pip install pytest-cov pytest-timeoutuv pip install -U chardet# Keep the GGUF conversion helpers in sync with the model conversion code.@@ -56,7 +56,7 @@ function run_pytest() {# Record the test targets so a retry can rerun exactly these cases.printf '%s\n' ${test_case} > "${ut_log_name%.log}.list"numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \- pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs \+ pytest -m "not skip_ci" --timeout=600 --cov=auto_round --cov-report= --cov-append -vs \--junitxml="${ut_log_name%.log}.xml" ${test_case} 2>&1 | tee ${ut_log_name}echo "##[endgroup]"}diff --git a/test/integration/test_cpu/test_inc_calib_dataset.py b/test/integration/test_cpu/test_inc_calib_dataset.pyindex d707d36df..bfb401fbe 100644--- a/test/integration/test_cpu/test_inc_calib_dataset.py+++ b/test/integration/test_cpu/test_inc_calib_dataset.py@@ -98,7 +98,6 @@ class TestLocalCalibDataset:)autoround.quantize()- @pytest.mark.timeout(60)def test_apply_chat_template(self, tiny_qwen_model_path):model_name = tiny_qwen_model_pathmodel = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", trust_remote_code=True)@@ -118,7 +117,6 @@ class TestLocalCalibDataset:)autoround.quantize()- @pytest.mark.timeout(180)def test_combine_dataset(self, tiny_qwen_model_path):dataset = "NeelNanda/pile-10k" + "," + "madao33/new-title-chinese" + "," + "mbpp" + "," + "opencode-instruct"bits, group_size, sym = 4, 128, True@@ -134,7 +132,6 @@ class TestLocalCalibDataset:)autoround.quantize()- @pytest.mark.timeout(60)def test_combine_dataset2(self, tiny_opt_model_path):dataset = "NeelNanda/pile-10k:num=256,mbpp:num=256"bits, group_size, sym = 4, 128, Truediff --git a/test/integration/test_cpu/test_inc_static_attn.py b/test/integration/test_cpu/test_inc_static_attn.pyindex e5b5c983c..1bfa10eef 100644--- a/test/integration/test_cpu/test_inc_static_attn.py+++ b/test/integration/test_cpu/test_inc_static_attn.py@@ -10,7 +10,6 @@ from auto_round import AutoRounddeepseekv3_model_name = get_model_path("tflsxyy/DeepSeek-V3-bf16-4layers")[email protected](180)def test_deepseek_v2(tiny_deepseek_v2_model_path):model_name = tiny_deepseek_v2_model_pathmodel = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=False)@@ -51,7 +50,6 @@ def setup_deepseekv3():return model, tokenizer, output_dir, configdef test_deepseek_v3(setup_deepseekv3):model, tokenizer, output_dir, config = setup_deepseekv3autoround = AutoRound(diff --git a/test/integration/test_xpu/test_llmc_integration.py b/test/integration/test_xpu/test_llmc_integration.pyindex 4920338c6..3e68bd144 100644--- a/test/integration/test_xpu/test_llmc_integration.py+++ b/test/integration/test_xpu/test_llmc_integration.py@@ -75,7 +75,6 @@ w8a8_static_recipe_modifier = AutoRoundModifier(@pytest.mark.skipif(torch.xpu.device_count() < 1, reason="test requires at least 1 XPU")@pytest.mark.parametrize("recipe",[diff --git a/test/unit/common/advanced/test_low_precision_input_model.py b/test/unit/common/advanced/test_low_precision_input_model.pyindex 2a8fbdd4f..aadfcd6f8 100644--- a/test/unit/common/advanced/test_low_precision_input_model.py+++ b/test/unit/common/advanced/test_low_precision_input_model.py@@ -86,7 +86,6 @@ class TestCompressedTensor:model.model.layers[0].mlp.up_proj.weight.dtype == torch.bfloat16), "CompressedLinear layer was not converted to Linear"- @pytest.mark.timeout(60)def test_w4a16_to_mxfp4(self, tmp_path):model = get_tiny_model(get_model_path(self.w4a16_model_path))model.config.name_or_path = None # Clear the name_or_path to avoid MTP copying issuesdiff --git a/test/unit/common/models/test_conv1d.py b/test/unit/common/models/test_conv1d.pyindex 5a69516d3..b9c3cd2fe 100644--- a/test/unit/common/models/test_conv1d.py+++ b/test/unit/common/models/test_conv1d.py@@ -42,7 +42,6 @@ class TestQuantizationConv1d:shutil.rmtree("runs", ignore_errors=True)@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)- @pytest.mark.timeout(300)def test_quant(self, dataloader, device, micro_conv1d_model_path):"""Quantize a Conv1D-based model, save it, reload on `device`, and run inference."""if device != "cpu" and not is_gptqmodel_available():diff --git a/test/unit/common/models/test_moe_model.py b/test/unit/common/models/test_moe_model.pyindex e608c8437..91fcd7178 100644--- a/test/unit/common/models/test_moe_model.py+++ b/test/unit/common/models/test_moe_model.py@@ -41,7 +41,6 @@ def count_modules_by_type(model, target_module_name_or_class):return cnt@pytest.mark.parametrize("scheme", ["MXFP4", "MXFP8"])def test_gptoss(scheme, tiny_gpt_oss_model_path, tmp_path):config = AutoConfig.from_pretrained(tiny_gpt_oss_model_path, trust_remote_code=True)@@ -75,7 +74,6 @@ def test_gptoss(scheme, tiny_gpt_oss_model_path, tmp_path):loaded_out = loaded_model(inp)[email protected](120)def test_llama4(tiny_llama4_model_path):output_dir = "./tmp/test_quantized_llama4"quantized_model, save_folder = quantize_model(diff --git a/test/unit/common/quantization/test_asym.py b/test/unit/common/quantization/test_asym.pyindex 0f6892057..2bb50eacd 100644--- a/test/unit/common/quantization/test_asym.py+++ b/test/unit/common/quantization/test_asym.py@@ -79,7 +79,6 @@ class TestAutoRoundAsym:# ------------------------------------------------------------------# RTN path (iters=0): cheap, so runs unconditionally in CI on every device.# ------------------------------------------------------------------- @pytest.mark.timeout(60)@pytest.mark.parametrize("device", _device_params(_AVAILABLE_DEVICES))@pytest.mark.parametrize("format", _FORMATS)def test_asym_format_rtn(self, tiny_opt_model_path, format, device):@@ -239,7 +238,6 @@ class TestAutoRoundAsym:# heavier still and stay skip_ci -- manual/nightly coverage only).# ------------------------------------------------------------------@requires_cuda- @pytest.mark.timeout(120)@pytest.mark.parametrize("group_size", [32])def test_asym_group_size_tuning(self, tiny_opt_model_path, group_size, dataloader):"""Tuned (iters=1) asym quantization works across group sizes."""diff --git a/test/unit/common/quantization/test_mix_bits.py b/test/unit/common/quantization/test_mix_bits.pyindex 50c267946..f2f7a68be 100644--- a/test/unit/common/quantization/test_mix_bits.py+++ b/test/unit/common/quantization/test_mix_bits.py@@ -172,7 +172,6 @@ class TestAutoRound:inputs = tokenizer(text, return_tensors="pt").to(model.device)print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))- @pytest.mark.timeout(60)def test_mixed_MXFP_autoround_format_loading(self, dataloader):layer_config = {"k_proj": {"bits": 8, "act_bits": 8},diff --git a/test/unit/common/quantization/test_mxfp_nvfp_llmc_export.py b/test/unit/common/quantization/test_mxfp_nvfp_llmc_export.pyindex c35588c55..c37973b38 100644--- a/test/unit/common/quantization/test_mxfp_nvfp_llmc_export.py+++ b/test/unit/common/quantization/test_mxfp_nvfp_llmc_export.py@@ -61,7 +61,6 @@ class TestAutoRoundFP:moe = compressed_model.model.layers[1].mlpassert hasattr(moe.experts[0].gate_proj.orig_layer, "act_max")- @pytest.mark.timeout(60)def test_nvfp4_moe_actmax_ar(self, tiny_deepseek_v2_model_path, dataloader):model_name = tiny_deepseek_v2_model_pathlayer_config = {@@ -94,7 +93,6 @@ class TestAutoRoundFP:and lm_head.weight_scale.dtype is torch.float8_e4m3fn), "Illegal NVFP4 packing for lm_head layer"- @pytest.mark.timeout(60)def test_mxfp4_moe_ar(self, tiny_deepseek_v2_model_path, dataloader):model_name = tiny_deepseek_v2_model_pathlayer_config = {diff --git a/test/unit/common/schemes/test_auto_scheme.py b/test/unit/common/schemes/test_auto_scheme.pyindex f32ffff4b..837a96605 100644--- a/test/unit/common/schemes/test_auto_scheme.py+++ b/test/unit/common/schemes/test_auto_scheme.py@@ -308,7 +308,6 @@ class TestAutoScheme:# Exporting both integer and MXFP schemes loads and rewrites the tiny# checkpoint twice; on CPU/XPU this can exceed the historical 70s limit.- @pytest.mark.timeout(180)def test_auto_scheme_export(self, micro_opt_model_path, tmp_path):calibration_dataset = _make_local_calibration_dataset(tmp_path)model_name = micro_opt_model_path@@ -335,7 +334,6 @@ class TestAutoScheme:assert mxfp_config["data_type"] == "mx_fp"assert os.path.exists(os.path.join(int_model_path, "config.json"))- @pytest.mark.timeout(120)def test_gguf_user_fixed_embedding_budget(self, micro_qwen_model_path, tmp_path):"""Regression test: a user-fixed embedding must be budget-priced at its fixed bits.diff --git a/test/unit/common/schemes/test_scheme.py b/test/unit/common/schemes/test_scheme.pyindex 1edc23e19..a0db4a45b 100644--- a/test/unit/common/schemes/test_scheme.py+++ b/test/unit/common/schemes/test_scheme.py@@ -45,7 +45,6 @@ class TestAutoRound:ar.post_init()assert ar.bits == 2- @pytest.mark.timeout(120)def test_w4a16_mixed(self, micro_qwen_moe_model_path, dataloader):layer_config = {@@ -186,7 +185,6 @@ class TestAutoRound:else:assert device_list == [f"{major_type}:0", f"{major_type}:1"]- @pytest.mark.timeout(60)def test_set_scheme(self, tiny_qwen_model_path):pytest.importorskip("sentencepiece")ar = AutoRound(diff --git a/test/unit/common/utils/test_alg_ext.py b/test/unit/common/utils/test_alg_ext.pyindex 7e64bd570..a9fb4c9e5 100644--- a/test/unit/common/utils/test_alg_ext.py+++ b/test/unit/common/utils/test_alg_ext.py@@ -12,7 +12,6 @@ def _local_calibration_dataset(tmp_path):class TestAlgExt:- @pytest.mark.timeout(60)def test_gguf_q4_alg_ext(self, tiny_qwen_model_path, tmp_path):"""Exercise the GGUF algorithm-extension path not covered by CUDA matrix tests."""AutoRound(@@ -28,7 +27,6 @@ class TestAlgExt:def test_alg_ext_import(self):from auto_round.algorithms.quantization.sign_roundv2 import SignRoundV2Quantizer- @pytest.mark.timeout(60)def test_nvfp4_alg_ext(self, tiny_opt_model_path, tmp_path):"""Keep NVFP4 as the representative format not exercised by the CUDA matrix."""AutoRound(diff --git a/test/unit/common/utils/test_cli_usage.py b/test/unit/common/utils/test_cli_usage.pyindex e25234641..39ab04796 100644--- a/test/unit/common/utils/test_cli_usage.py+++ b/test/unit/common/utils/test_cli_usage.py@@ -41,7 +41,6 @@ class TestAutoRoundCmd:def test_auto_round_cmd(self, monkeypatch):_assert_cli_ok(monkeypatch, ["auto_round", "-h"])- @pytest.mark.timeout(90)def test_auto_round_cmd2(self, monkeypatch, tiny_opt_model_path, tmp_path):calibration_path = tmp_path / "calibration.json"calibration_path.write_text(json.dumps(["AutoRound CLI local calibration sample. " * 32]))diff --git a/test/unit/common/utils/test_generation.py b/test/unit/common/utils/test_generation.pyindex 6ff11e6dd..b5635face 100644--- a/test/unit/common/utils/test_generation.py+++ b/test/unit/common/utils/test_generation.py@@ -59,7 +59,6 @@ class TestAutoRoundFormatGeneration:print(res)assert "!!!" not in res- @pytest.mark.timeout(120)def test_autoround_sym(self, dataloader):for bits in [4]:model = AutoModelForCausalLM.from_pretrained(self.model_name, torch_dtype="auto", trust_remote_code=True)diff --git a/test/unit/test_ark/test_model.py b/test/unit/test_ark/test_model.pyindex 6c35da38b..823da1e61 100644--- a/test/unit/test_ark/test_model.py+++ b/test/unit/test_ark/test_model.py@@ -58,7 +58,6 @@ class TestAutoRoundARKBackend:evaluate_accuracy(model, tokenizer, threshold=tar_acc, batch_size=32, limit=limit)torch.xpu.empty_cache()- @pytest.mark.timeout(60)@pytest.mark.parametrize("format", ["auto_round", "auto_round:gptqmodel"])@pytest.mark.parametrize("bits, group_size, sym", [(4, 128, True), (8, 128, True)])@pytest.mark.parametrize("dtype", [torch.bfloat16])@@ -66,7 +65,6 @@ class TestAutoRoundARKBackend:def test_formats(self, format, bits, group_size, sym, dtype, device):self.main_op(format, bits, group_size, sym, dtype, device)- @pytest.mark.timeout(60)@pytest.mark.parametrize("format", ["auto_round:auto_awq"])@pytest.mark.parametrize("bits, group_size, sym", [(4, 32, True)])@pytest.mark.parametrize("dtype", [torch.float16])@@ -74,7 +72,6 @@ class TestAutoRoundARKBackend:def test_awq_fp16(self, format, bits, group_size, sym, dtype, device):self.main_op(format, bits, group_size, sym, dtype, device)- @pytest.mark.timeout(300)@pytest.mark.parametrize("format", ["auto_round"])@pytest.mark.parametrize("bits, group_size, sym", [(2, 32, False)])@pytest.mark.parametrize("dtype", [torch.bfloat16])diff --git a/test/unit/test_cpu/algorithms/test_awq.py b/test/unit/test_cpu/algorithms/test_awq.pyindex 72c7e6dc3..380d76661 100644--- a/test/unit/test_cpu/algorithms/test_awq.py+++ b/test/unit/test_cpu/algorithms/test_awq.py@@ -51,7 +51,6 @@ class TestAWQNormalLLM:assert cfg.awq_seqlen == 128- @pytest.mark.timeout(90)def test_awq_w4a16_quantize_and_inference(self, tiny_opt_model_path):"""W4A16 AWQ quantization produces valid layer_config and the model can generate.@@ -80,7 +79,6 @@ class TestAWQNormalLLM:output = generate_prompt(model, tokenizer, device=device)assert len(output) > 0, "Model should produce non-empty output"- @pytest.mark.timeout(120)def test_awq_w4a16_export_default_scheme(self, tiny_opt_model_path):"""Default W4A16 scheme export: quantization_config has bits=4, group_size=128."""ar = AutoRound(@@ -130,7 +128,6 @@ class TestAWQNormalLLM:assert qconfig["sym"] == symassert "auto-round" in qconfig["quant_method"]- @pytest.mark.timeout(120)@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)def test_awq_w4a16_round_trip(self, tiny_opt_model_path, device):"""Quantize, save, reload on `device`, and generate -- exercises the full save/load round trip.@@ -161,7 +158,6 @@ class TestAWQNonIntegerSchemes:MXFP/NVFP scheme."""- @pytest.mark.timeout(60)@pytest.mark.parametrize("scheme", ["MXFP4", "NVFP4"])def test_awq_non_integer_scheme_smoke(self, tiny_opt_model_path, scheme):"""Algorithm/config correctness (bits/act_bits assignment) -- runs once on cpu.@@ -735,7 +731,6 @@ class TestAWQMoE:assert kwargs["position_embeddings"][1].shape == (1, 4, 8)@requires_cuda- @pytest.mark.timeout(420)def test_awq_moe_quantized_layers_check(self, tiny_qwen_moe_model_path):"""AWQ on MoE: expert layers should be quantized, gates/routers stay FP.@@ -779,7 +774,6 @@ class TestAWQMoE:# TODO: Investigate and fix the excessive test runtime instead of relying on an increased timeout.@requires_cuda- @pytest.mark.timeout(400)def test_awq_moe_save_quant_config(self, tiny_qwen_moe_model_path):"""AWQ MoE: saved quantization_config should be consistent and loadable.diff --git a/test/unit/test_cpu/backends/test_torch_backend.py b/test/unit/test_cpu/backends/test_torch_backend.pyindex 5ade5afe2..8665f6176 100644--- a/test/unit/test_cpu/backends/test_torch_backend.py+++ b/test/unit/test_cpu/backends/test_torch_backend.py@@ -55,7 +55,6 @@ class TestTorchBackendFunctional:@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)@pytest.mark.parametrize("iters", [0, 1], ids=["rtn", "tuning"])@pytest.mark.parametrize("sym,group_size,format", _4BIT_CASES)- @pytest.mark.timeout(120)def test_torch_backend_4bit(self, tiny_opt_model_path, sym, group_size, format, iters, device):"""4-bit (a)symmetric model, RTN or tuned, loads via the torch backend and generates text."""ar = AutoRound(tiny_opt_model_path, bits=4, group_size=group_size, sym=sym, iters=iters, seqlen=2, nsamples=1)diff --git a/test/unit/test_cpu/core/test_autoround.py b/test/unit/test_cpu/core/test_autoround.pyindex 7fe6d3cf1..d639be085 100644--- a/test/unit/test_cpu/core/test_autoround.py+++ b/test/unit/test_cpu/core/test_autoround.py@@ -36,7 +36,6 @@ class TestAutoRound:def teardown_class(self):shutil.rmtree("runs", ignore_errors=True)- @pytest.mark.timeout(90)def test_bits_setting(self, tiny_opt_model_path):layer_config = {"model.decoder.layers.0.self_attn.k_proj": {"data_type": "mx_fp8", "group_size": 32}}autoround = AutoRound(tiny_opt_model_path, iters=2, seqlen=2, nsamples=1, layer_config=layer_config)@@ -45,7 +44,6 @@ class TestAutoRound:if module.bits != 8:raise ValueError(f"Expected bits to be 8, but got {module.bits}")- @pytest.mark.timeout(90)def test_layer_config(self, tiny_opt_model_path, dataloader):model_name = tiny_opt_model_pathlayer_config = {"self_attn": {"bits": 4, "data_type": "nv_fp", "act_bits": 16, "group_size": 16}}@@ -109,7 +107,6 @@ class TestAutoRound:autoround.quantize()# TODO: Investigate and fix the excessive test runtime instead of relying on an increased timeout.- @pytest.mark.timeout(220)def test_mx_fp4(self, dataloader):model_name = opt_name_or_pathbits, group_size, sym = 4, 32, False@@ -158,7 +155,6 @@ class TestAutoRound:)autoround.quantize()- @pytest.mark.timeout(60)@pytest.mark.parametrize("bits", [2, 3, 4])def test_g128(self, bits, dataloader):model_name = opt_name_or_path@@ -371,7 +367,6 @@ class TestAutoRound:)autoround.quantize()- @pytest.mark.timeout(60)def test_rtn(self, tiny_opt_model_path):model_name = tiny_opt_model_pathmodel = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", trust_remote_code=True)@@ -680,7 +675,6 @@ class TestAutoRound:assert ar.optimizer == torch.optim.AdamWassert ar.mllm- @pytest.mark.timeout(60)def test_attention_mask_in_dataset(self):from transformers import AutoTokenizer@@ -698,7 +692,6 @@ class TestAutoRound:ar = AutoRound(model_name, iters=1, dataset=data, seqlen=8)ar.quantize()- @pytest.mark.timeout(60)def test_attention_mask_via_tokenize_in_dataset(self):from transformers import AutoTokenizerdiff --git a/test/unit/test_cpu/core/test_resume_integration.py b/test/unit/test_cpu/core/test_resume_integration.pyindex 8bcedbb29..6396a65aa 100644--- a/test/unit/test_cpu/core/test_resume_integration.py+++ b/test/unit/test_cpu/core/test_resume_integration.py@@ -41,7 +41,6 @@ def _clean_resume_env():class TestResumeIntegration:- @pytest.mark.timeout(60)def test_resume_skips_already_completed_blocks(self, tiny_opt_model_path, tmp_path):resume_dir = str(tmp_path / "resume")# AR_DISK_STREAM_MODEL keeps low_cpu_mem_usage active for this plaindiff --git a/test/unit/test_cpu/export/test_export.py b/test/unit/test_cpu/export/test_export.pyindex e2310fab0..059bd398e 100644--- a/test/unit/test_cpu/export/test_export.py+++ b/test/unit/test_cpu/export/test_export.py@@ -202,7 +202,6 @@ class TestAutoRound:inputs = tokenizer(text, return_tensors="pt").to(model.device)print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))- @pytest.mark.timeout(120)@pytest.mark.parametrize("static_kv_dtype", ["fp8", "float16"])def test_static_afp8_export(self, static_kv_dtype):import os@@ -395,7 +394,6 @@ class TestAutoRound:assert quantization_config["static_attention_dtype"] == "fp8"assert quantization_config["static_attention_granularity"] == "head"- @pytest.mark.timeout(120)def test_awq_lmhead_export(self, dataloader):bits, sym, group_size = 4, False, 128model_name = get_model_path("microsoft/phi-4")@@ -430,7 +428,6 @@ class TestAutoRound:assert isinstance(lm_head, WQLinear_GEMM), "Illegal AWQ quantization for lm_head layer"- @pytest.mark.timeout(120)def test_gptq_lmhead_export(self, dataloader):bits, sym, group_size = 4, True, 128# Note that, to save UT tuning time, the local model is intentionally kept lightweight, using only 2 hidden layers.@@ -598,7 +595,6 @@ class TestAutoRound:scale_dtype=ar.scale_dtype,)- @pytest.mark.timeout(480)def test_autoawq_qwen3_vl_infer(self, dataloader):model_path = get_model_path("Qwen/Qwen3-VL-2B-Instruct")autoround = AutoRound(diff --git a/test/unit/test_cpu/export/test_gguf_format.py b/test/unit/test_cpu/export/test_gguf_format.pyindex ee2379d3f..9929ba594 100644--- a/test/unit/test_cpu/export/test_gguf_format.py+++ b/test/unit/test_cpu/export/test_gguf_format.py@@ -120,7 +120,6 @@ class TestGGUF:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(60)def test_q4_0(self, tiny_qwen_model_path):bits, group_size, sym = 4, 32, Trueautoround = AutoRound(@@ -154,7 +153,6 @@ class TestGGUF:assert type(autoround).__name__ == "CompressionOrchestrator"assert isinstance(autoround.quantize_config, OptimizedRTNConfig)- @pytest.mark.timeout(60)def test_func(self):bits, group_size, sym = 4, 128, Trueautoround = AutoRound(@@ -172,7 +170,6 @@ class TestGGUF:model = AutoModelForCausalLM.from_pretrained(quantized_model_path, gguf_file=gguf_file, device_map="auto")eval_generated_prompt(model, self.tokenizer)- @pytest.mark.timeout(120)def test_q4_k_m(self, dataloader, tiny_qwen_model_path):model_name = tiny_qwen_model_pathlayer_config = {@@ -212,7 +209,6 @@ class TestGGUF:assert autoround.model.model.layers[0].mlp.gate_proj.bits == 8assert autoround.layer_config["model.layers.0.mlp.gate_proj"]["mostly"] == "gguf:q8_0"- @pytest.mark.timeout(360)def test_all_format(self, monkeypatch, tiny_qwen_model_path):model_name = tiny_qwen_model_path# for gguf_format in ["gguf:q4_0", "gguf:q4_1", "gguf:q4_k_m", "gguf:q6_k"]:@@ -243,7 +239,6 @@ class TestGGUF:)shutil.rmtree("../../tmp_autoround", ignore_errors=True)- @pytest.mark.timeout(90)def test_vlm_gguf(self, tiny_qwen_vl_model_path):from auto_round import AutoRound@@ -264,7 +259,6 @@ class TestGGUF:else:assert file_size < 270, f"file size {file_size} MB is too large for non-quantized mmproj-model.gguf"- @pytest.mark.timeout(60)def test_vlm_gguf_wo_quant_nontext_module(self, tiny_qwen_vl_model_path):from auto_round import AutoRound@@ -523,7 +517,6 @@ class TestGGUF:assert ar.layer_config["model.language_model.embed_tokens"]["bits"] == 6assert ar.layer_config["model.language_model.embed_tokens"]["super_bits"] == 8- @pytest.mark.timeout(60)def test_q2k_mixed(self, tiny_qwen_moe_model_path):model_name = tiny_qwen_moe_model_pathautoround = AutoRound(@@ -546,7 +539,6 @@ class TestGGUF:tensor_types = {tensor.name: tensor.tensor_type.name for tensor in gguf_model.tensors}assert tensor_types["blk.0.ffn_up_exps.weight"] == "Q2_K"- @pytest.mark.timeout(60)def test_q2k_mixed_keeps_only_three_dim_expert_weights_at_q2k(self, tiny_qwen_moe_model_path):model_name = tiny_qwen_moe_model_pathautoround = AutoRound(diff --git a/test/unit/test_cpu/export/test_llmc_format.py b/test/unit/test_cpu/export/test_llmc_format.pyindex 8b77d29fd..3a080d38a 100644--- a/test/unit/test_cpu/export/test_llmc_format.py+++ b/test/unit/test_cpu/export/test_llmc_format.py@@ -213,7 +213,6 @@ class TestLLMC:# autoround.quantize()# autoround.save_quantized("./saved", format="llm_compressor", inplace=True)- @pytest.mark.timeout(120)def test_llmcompressor_fp8(self, tmp_path):## quantize the modelmodel_name = opt_name_or_path@@ -296,7 +295,6 @@ class TestLLMC:and quantization_config["ignore"] == ["lm_head"]), f"Invalid MXFP8 quantization configuration: {quantization_config}"- @pytest.mark.timeout(60)def test_mxfp8_llmcompressor_kv_config(self, tiny_opt_model_path, tmp_path):ar = AutoRound(model=tiny_opt_model_path,@@ -417,7 +415,6 @@ class TestLLMC:assert q_scale.shape == torch.Size([compressed_model.config.num_attention_heads])assert k_scale.ndim == 1- @pytest.mark.timeout(60)def test_mixed_precision_llmcompressor_format(self, tiny_opt_model_path, tmp_path):scheme = AutoScheme(avg_bits=7,diff --git a/test/unit/test_cpu/models/test_audio_quantization.py b/test/unit/test_cpu/models/test_audio_quantization.pyindex faa693b5d..a3ce9dbe9 100644--- a/test/unit/test_cpu/models/test_audio_quantization.py+++ b/test/unit/test_cpu/models/test_audio_quantization.py@@ -61,7 +61,6 @@ class TestMiMoAudioQuantization:has_quantlinear = any(m.__class__.__name__ == "QuantLinear" for m in quantized_model.modules())assert has_quantlinear, "Quantized model should contain QuantLinear layers"- @pytest.mark.timeout(90)def test_quantize_with_tuning(self, tiny_mimo_audio_model_path, tmp_path):"""Tuned MiMo-Audio quantization uses local calibration data and produces QuantLinear layers."""import transformersdiff --git a/test/unit/test_cpu/models/test_diffusion.py b/test/unit/test_cpu/models/test_diffusion.pyindex f27602ba5..bb2b077fa 100644--- a/test/unit/test_cpu/models/test_diffusion.py+++ b/test/unit/test_cpu/models/test_diffusion.py@@ -141,7 +141,6 @@ def setup_flux():return pipe, output_dir[email protected](120)def test_flux_saving(setup_flux):pipe, output_dir = setup_fluxautoround = AutoRound(@@ -158,7 +157,6 @@ def test_flux_saving(setup_flux):shutil.rmtree(output_dir, ignore_errors=True)[email protected](150)def test_flux(setup_flux):pipe, output_dir = setup_fluxautoround = AutoRound(diff --git a/test/unit/test_cpu/models/test_mllm.py b/test/unit/test_cpu/models/test_mllm.pyindex 4905680f6..3ea8c72d5 100644--- a/test/unit/test_cpu/models/test_mllm.py+++ b/test/unit/test_cpu/models/test_mllm.py@@ -147,7 +147,6 @@ class TestAutoRound:model = AutoModelForCausalLM.from_pretrained(opt_name_or_path, trust_remote_code=True)assert is_pure_text_model(model)- @pytest.mark.timeout(120)def test_str_input(self):tokenizer = AutoTokenizer.from_pretrained(self.model_name)processor = AutoProcessor.from_pretrained(self.model_name, trust_remote_code=True)diff --git a/test/unit/test_cpu/models/test_moe_alignment.py b/test/unit/test_cpu/models/test_moe_alignment.pyindex 9146d9a0b..f15334d1b 100644--- a/test/unit/test_cpu/models/test_moe_alignment.py+++ b/test/unit/test_cpu/models/test_moe_alignment.py@@ -26,7 +26,6 @@ def setup_deepseek_v2_lite():return model, tokenizer, output_dir, config[email protected](120)def test_moe_scale_alignment_fp8_static(setup_deepseek_v2_lite):"""Test that FP8_STATIC quantization unifies gate/up input scales across experts."""# Enable MoE scale unification explicitlydiff --git a/test/unit/test_cpu/quantization/test_model_free.py b/test/unit/test_cpu/quantization/test_model_free.pyindex b5a590e60..a4fd6308a 100644--- a/test/unit/test_cpu/quantization/test_model_free.py+++ b/test/unit/test_cpu/quantization/test_model_free.py@@ -1471,7 +1471,6 @@ _TRANSFORMER_TENSORS = {class TestKimiK25Int4Source:"""Tests for _copy_metadata_files including subdirectory handling."""- @pytest.mark.timeout(120)def test_non_diffusion_copies_subfolders(self, tmp_path):"""Non-diffusion model: subdirectories should be copied to output."""model_dir = _make_model_dir(tmp_path, _SIMPLE_CONFIG, _SIMPLE_TENSORS)@@ -1715,7 +1714,6 @@ class TestModelFreeAutoScheme:moved to test/unit/test_cpu/utils/test_model_free_utils.py -> TestAutoSchemeHelpers."""- @pytest.mark.timeout(120)def test_e2e_int_auto_scheme(self, tmp_path, tiny_opt_model_path):from auto_round import AutoSchemediff --git a/test/unit/test_cpu/quantization/test_model_free_parity.py b/test/unit/test_cpu/quantization/test_model_free_parity.pyindex 1b61405f0..4db582e61 100755--- a/test/unit/test_cpu/quantization/test_model_free_parity.py+++ b/test/unit/test_cpu/quantization/test_model_free_parity.py@@ -478,7 +478,6 @@ def test_disable_model_free_opt_out(tiny_opt_model_path):("plain_rtn", True, {"disable_opt_rtn": True}),],)def test_mxfp_auto_scheme_quantization_config_parity(tmp_path, tiny_opt_model_path, test_name, model_free_disable_opt_rtn, regular_kwargs):diff --git a/test/unit/test_cpu/utils/test_model_scope.py b/test/unit/test_cpu/utils/test_model_scope.pyindex 45368afe6..d874d5b81 100644--- a/test/unit/test_cpu/utils/test_model_scope.py+++ b/test/unit/test_cpu/utils/test_model_scope.py@@ -32,13 +32,11 @@ class TestModelScope:if os.path.exists(self.cache_path):shutil.rmtree(self.cache_path, ignore_errors=True)- @pytest.mark.timeout(120)def test_llm(self, dataloader):model_name = save_tiny_model(get_model_path("Qwen/Qwen2.5-0.5B-Instruct"), self.tiny_model_path, num_layers=2)autoround = AutoRound(model_name, platform="model_scope", scheme="w4a16", iters=0, seqlen=2, dataset=dataloader)autoround.quantize_and_save(self.saved_path)- @pytest.mark.timeout(480)def test_mllm(self, dataloader):model_name = save_tiny_model(get_model_path("Qwen/Qwen2-VL-2B-Instruct"), self.tiny_model_path, num_layers=2, is_mllm=Truediff --git a/test/unit/test_cuda/algorithms/test_alg_ext.py b/test/unit/test_cuda/algorithms/test_alg_ext.pyindex 3db2033fb..996d9f0df 100644--- a/test/unit/test_cuda/algorithms/test_alg_ext.py+++ b/test/unit/test_cuda/algorithms/test_alg_ext.py@@ -67,7 +67,6 @@ class TestAlgExt:# "overrides were applied (data_type was not yet 'int_asym_dq')."# )- @pytest.mark.timeout(90)def test_int2_g64_asym_enable_alg_ext_keeps_config(self, tiny_qwen_model_path):"""Regression test: asym int2/g64 keeps the requested tuning config."""@@ -101,7 +100,6 @@ class TestAlgExt:assert quantizer.enable_norm_bias_tuning is Trueassert quantizer.enable_quanted_input is False- @pytest.mark.timeout(120)@pytest.mark.parametrize("scheme", ["MXFP4", "W2A16G64"])def test_all_support_dtype(self, scheme, tiny_qwen_model_path, tmp_path, monkeypatch):from auto_round.auto_scheme import AutoSchemediff --git a/test/unit/test_cuda/algorithms/test_auto_scheme.py b/test/unit/test_cuda/algorithms/test_auto_scheme.pyindex 194b5d12d..b18f6ba2e 100644--- a/test/unit/test_cuda/algorithms/test_auto_scheme.py+++ b/test/unit/test_cuda/algorithms/test_auto_scheme.py@@ -38,7 +38,6 @@ class TestAutoScheme:yieldshutil.rmtree("runs", ignore_errors=True)- @pytest.mark.timeout(60)def test_gguf_k_0(self, tiny_qwen_model_path, tmp_path, monkeypatch):monkeypatch.setenv("AR_AUTO_SCHEME_NSAMPLES", "1")monkeypatch.setenv("AR_AUTO_SCHEME_BATCH_SIZE", "1")@@ -97,7 +96,6 @@ class TestAutoScheme:# Due to the tiny model and embedding, the actual number of bits of gguf format will be larger than the target bits.assert target_bits - 0.1 < avg_bits <= target_bits + 0.3- @pytest.mark.timeout(150)def test_shared_layers(self, tiny_opt_model_path):model_name = tiny_opt_model_pathfrom transformers import AutoModelForCausalLM, AutoTokenizer@@ -270,7 +268,6 @@ class TestAutoScheme:print(avg_bits)assert target_bits - 0.1 < avg_bits <= target_bits + 1e-3- @pytest.mark.timeout(150)def test_lm_head_and_mix_dtype(self, tiny_untied_qwen_model_path):target_bits = 5scheme = AutoScheme(avg_bits=target_bits, options=("MXFP4", "MXFP8"))diff --git a/test/unit/test_cuda/algorithms/test_awq.py b/test/unit/test_cuda/algorithms/test_awq.pyindex b207bb2a4..da1459920 100644--- a/test/unit/test_cuda/algorithms/test_awq.py+++ b/test/unit/test_cuda/algorithms/test_awq.py@@ -52,7 +52,6 @@ class TestAWQNormalLLM:assert cfg.awq_seqlen == 128@pytest.mark.skip_ci(reason="Coverage: CPU-only AWQ algorithm smoke; run in common/nightly coverage")- @pytest.mark.timeout(90)def test_awq_w4a16_quantize_and_inference(self, tiny_opt_model_path):"""W4A16 AWQ quantization produces valid layer_config and the model can generate.@@ -132,7 +131,6 @@ class TestAWQNormalLLM:assert qconfig["sym"] == symassert "auto-round" in qconfig["quant_method"]- @pytest.mark.timeout(120)@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)def test_awq_w4a16_round_trip(self, tiny_opt_model_path, device):"""Quantize, save, reload on `device`, and generate -- exercises the full save/load round trip.@@ -165,7 +163,6 @@ class TestAWQNonIntegerSchemes:"""@pytest.mark.skip_ci(reason="Coverage: CPU-only AWQ datatype smoke; run in common/nightly coverage")- @pytest.mark.timeout(60)@pytest.mark.parametrize("scheme", ["MXFP4", "NVFP4"])def test_awq_non_integer_scheme_smoke(self, tiny_opt_model_path, scheme):"""Algorithm/config correctness (bits/act_bits assignment) -- runs once on cpu.@@ -740,7 +737,6 @@ class TestAWQMoE:assert kwargs["position_embeddings"][1].shape == (1, 4, 8)@requires_cuda- @pytest.mark.timeout(420)def test_awq_moe_quantized_layers_check(self, micro_qwen_moe_model_path):"""AWQ on MoE: expert layers should be quantized, gates/routers stay FP.@@ -784,7 +780,6 @@ class TestAWQMoE:# TODO: Investigate and fix the excessive test runtime instead of relying on an increased timeout.@requires_cuda- @pytest.mark.timeout(400)def test_awq_moe_save_quant_config(self, micro_qwen_moe_model_path):"""AWQ MoE: saved quantization_config should be consistent and loadable.diff --git a/test/unit/test_cuda/algorithms/test_block_runner.py b/test/unit/test_cuda/algorithms/test_block_runner.pyindex 73f5eebca..976798e50 100644--- a/test/unit/test_cuda/algorithms/test_block_runner.py+++ b/test/unit/test_cuda/algorithms/test_block_runner.py@@ -52,7 +52,6 @@ class TestBlockRunnerGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_3bit_asym_sign_sgd_reload(self, tiny_opt_model_path, dataloader):autoround = AutoRound(tiny_opt_model_path,@@ -77,7 +76,6 @@ class TestBlockRunnerGpu:@pytest.mark.skip_ci(reason="Matrix: group_size=64 packing is covered by test_autoround_int_export; retain full Sign-SGD case weekly")- @pytest.mark.timeout(180)def test_group64_sign_sgd_reload(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,@@ -97,7 +95,6 @@ class TestBlockRunnerGpu:@pytest.mark.skip_ci(reason="Coverage: symmetric INT export/reload is covered by test_autoround_int_export; retain tuning case weekly")- @pytest.mark.timeout(180)def test_4bit_sym_group128_reload(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,@@ -117,7 +114,6 @@ class TestBlockRunnerGpu:@pytest.mark.skip_ci(reason="Coverage: asymmetric INT2 runtime is covered by the Triton backend smoke; retain full tuning case weekly")- @pytest.mark.timeout(180)def test_2bit_asym_group32_reload(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,@@ -141,7 +137,6 @@ class TestBlockRunnerGpu:@pytest.mark.skip_ci(reason="Coverage: test_3bit_asym_sign_sgd_reload already verifies tuned reload and forward; retain longer convergence case weekly")- @pytest.mark.timeout(180)def test_sign_sgd_forward_after_reload(self, tiny_opt_model_path):"""Sign-SGD quantized model must forward-pass on GPU after reload."""autoround = AutoRound(diff --git a/test/unit/test_cuda/algorithms/test_config_resolver.py b/test/unit/test_cuda/algorithms/test_config_resolver.pyindex 0d55a5a94..194cfe0c7 100644--- a/test/unit/test_cuda/algorithms/test_config_resolver.py+++ b/test/unit/test_cuda/algorithms/test_config_resolver.py@@ -30,7 +30,6 @@ class TestConfigResolverGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)@pytest.mark.parametrize("scheme", ["W4A16", "W2A16", "W8A16", "MXFP4"])def test_preset_scheme_export(self, tiny_opt_model_path, scheme):autoround = AutoRound(tiny_opt_model_path, scheme=scheme, iters=0, disable_opt_rtn=True, nsamples=1, seqlen=16)@@ -39,7 +38,6 @@ class TestConfigResolverGpu:config = AutoConfig.from_pretrained(quantized_model_path, trust_remote_code=True)assert getattr(config, "quantization_config", {}).get("quant_method") == "auto-round"- @pytest.mark.timeout(180)def test_layer_config_override(self, tiny_opt_model_path):"""Per-layer override wins over the default scheme during config resolution."""layer_config = {"model.decoder.layers.0.self_attn.q_proj": {"bits": 8}}diff --git a/test/unit/test_cuda/algorithms/test_sign_sgd_pipeline.py b/test/unit/test_cuda/algorithms/test_sign_sgd_pipeline.pyindex a5a49712a..b9989a8ff 100644--- a/test/unit/test_cuda/algorithms/test_sign_sgd_pipeline.py+++ b/test/unit/test_cuda/algorithms/test_sign_sgd_pipeline.py@@ -31,7 +31,6 @@ class TestSignSgdPipeline:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_sign_sgd_quantize_reload_forward(self, tiny_opt_model_path):"""Run a real sign-SGD quantization on GPU, reload and forward-pass it."""autoround = AutoRound(@@ -56,7 +55,6 @@ class TestSignSgdPipeline:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_w4a8_quantize_reload(self, tiny_opt_model_path):"""W4A8 with iters>0 exercises the activation-quantization hooks on GPU."""autoround = AutoRound(@@ -81,7 +79,6 @@ class TestSignSgdPipeline:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_sign_sgd_asym(self, tiny_opt_model_path):"""Asymmetric sign-SGD quantization + export on GPU.@@ -103,7 +100,6 @@ class TestSignSgdPipeline:assert isinstance(compressed_model, torch.nn.Module)assert os.path.isdir(quantized_model_path)- @pytest.mark.timeout(180)def test_sign_sgd_bits2_group32(self, tiny_opt_model_path):"""2-bit, small-group sign-SGD exercises low-bit block optimization."""autoround = AutoRound(diff --git a/test/unit/test_cuda/auto_scheme/test_auto_scheme.py b/test/unit/test_cuda/auto_scheme/test_auto_scheme.pyindex e6f8d1c3e..6420f2408 100644--- a/test/unit/test_cuda/auto_scheme/test_auto_scheme.py+++ b/test/unit/test_cuda/auto_scheme/test_auto_scheme.py@@ -47,7 +47,6 @@ class TestAutoSchemeGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(240)def test_auto_scheme_quantize_reload(self, tiny_qwen_model_path, tmp_path, monkeypatch):monkeypatch.setenv("AR_AUTO_SCHEME_NSAMPLES", "1")monkeypatch.setenv("AR_AUTO_SCHEME_BATCH_SIZE", "1")@@ -76,7 +75,6 @@ class TestAutoSchemeGpu:)assert isinstance(model, torch.nn.Module)- @pytest.mark.timeout(120)def test_auto_scheme_avg_bits_in_range(self, tiny_qwen_model_path, tmp_path, monkeypatch):"""The generated mixed scheme lands near the requested average bit-width."""from auto_round.auto_scheme.utils import compute_avg_bits_for_model@@ -99,7 +97,6 @@ class TestAutoSchemeGpu:avg_bits, _ = compute_avg_bits_for_model(model, ignore_scale_zp_bits=True)assert target - 0.3 < avg_bits <= target + 0.3- @pytest.mark.timeout(240)def test_auto_scheme_iters1_reload(self, tiny_qwen_model_path, tmp_path, monkeypatch):"""Auto scheme with sign-SGD (iters>0) + reload."""monkeypatch.setenv("AR_AUTO_SCHEME_NSAMPLES", "1")diff --git a/test/unit/test_cuda/backends/test_exllamav2_backend.py b/test/unit/test_cuda/backends/test_exllamav2_backend.pyindex 434e7db08..cf2677979 100644--- a/test/unit/test_cuda/backends/test_exllamav2_backend.py+++ b/test/unit/test_cuda/backends/test_exllamav2_backend.py@@ -34,7 +34,6 @@ class TestAutoRoundexllamaBackend:# @pytest.mark.skip_ci(reason="Only tiny model is suggested")# @pytest.mark.skip_ci(reason="Time-consuming; Accuracy evaluation")@require_gptqmodel- @pytest.mark.timeout(240)def test_gptqmodel_exllmav2_4bits_asym(self, dataloader):model_path = get_model_path("facebook/opt-125m")bits, group_size, sym = 4, 128, False@@ -123,7 +122,6 @@ class TestAutoRoundexllamaBackend:@pytest.mark.skip_ci(reason="Backend/JIT: AWQ ExLlamaV2 matrix is covered in nightly; keep the native asym smoke in PR CI")- @pytest.mark.timeout(90)def test_gptqmodel_awq_exllamav2_4bits_asym(self, dataloader):"""Test AWQ quantization with gptqmodel:awq_exllamav2 backend (bfloat16 inference)."""model_path = get_model_path("facebook/opt-125m")diff --git a/test/unit/test_cuda/backends/test_marlin_backend.py b/test/unit/test_cuda/backends/test_marlin_backend.pyindex 44da32583..5b868c5ba 100644--- a/test/unit/test_cuda/backends/test_marlin_backend.py+++ b/test/unit/test_cuda/backends/test_marlin_backend.py@@ -34,7 +34,6 @@ class TestAutoRoundMarlinBackend:# Keep one CI test for marlin backend and skip others to save time.# @pytest.mark.skip_ci(reason="Only tiny model is suggested")# @pytest.mark.skip_ci(reason="Time-consuming; Accuracy evaluation")- @pytest.mark.timeout(240)def test_marlin_4bits_sym_with_zp_m_1(self, dataloader):model = AutoModelForCausalLM.from_pretrained(self.model_name, torch_dtype="auto", trust_remote_code=True)tokenizer = AutoTokenizer.from_pretrained(self.model_name, trust_remote_code=True)@@ -175,7 +174,6 @@ class TestAutoRoundMarlinBackend:@pytest.mark.skip_ci(reason="Backend/JIT: AWQ Marlin is a format/backend matrix case; standard Marlin smoke remains in PR CI")- @pytest.mark.timeout(90)def test_gptqmodel_awq_marlin_4bits_sym(self):"""Test AWQ quantization with gptqmodel:awq_marlin backend (sym-only, float16)."""model_path = get_model_path("facebook/opt-125m")diff --git a/test/unit/test_cuda/backends/test_torch_backend_accuracy.py b/test/unit/test_cuda/backends/test_torch_backend_accuracy.pyindex 82cf60b72..a28685106 100644--- a/test/unit/test_cuda/backends/test_torch_backend_accuracy.py+++ b/test/unit/test_cuda/backends/test_torch_backend_accuracy.py@@ -45,7 +45,6 @@ class TestTorchBackendAccuracy:def teardown_class(cls):shutil.rmtree("runs", ignore_errors=True)- @pytest.mark.timeout(90)def test_torch_backend_accuracy_asym_rtn(self, dataloader):"""RTN-quantized 4-bit asym model meets the accuracy threshold in both fp16 and bf16."""model = AutoModelForCausalLM.from_pretrained(self.model_name, dtype="auto", trust_remote_code=True)@@ -65,7 +64,6 @@ class TestTorchBackendAccuracy:evaluate_accuracy(model, tokenizer, threshold=0.35, batch_size=16, limit=10)torch.cuda.empty_cache()- @pytest.mark.timeout(90)def test_torch_backend_accuracy_sym_rtn(self, dataloader):"""RTN-quantized 4-bit sym model meets the accuracy threshold."""model = AutoModelForCausalLM.from_pretrained(self.model_name, dtype="auto", trust_remote_code=True)@@ -82,7 +80,6 @@ class TestTorchBackendAccuracy:evaluate_accuracy(model, tokenizer, threshold=0.28, batch_size=32, limit=1000)torch.cuda.empty_cache()- @pytest.mark.timeout(90)def test_torch_backend_accuracy_asym_tuning(self, dataloader):"""Tuned (iters=1) 4-bit asym model meets the accuracy threshold."""model = AutoModelForCausalLM.from_pretrained(self.model_name, dtype="auto", trust_remote_code=True)diff --git a/test/unit/test_cuda/backends/test_triton_backend.py b/test/unit/test_cuda/backends/test_triton_backend.pyindex 6d689db5c..c597a17d3 100644--- a/test/unit/test_cuda/backends/test_triton_backend.py+++ b/test/unit/test_cuda/backends/test_triton_backend.py@@ -22,7 +22,6 @@ class TestAutoRoundTritonBackend:shutil.rmtree("runs", ignore_errors=True)@require_greater_than_050- @pytest.mark.timeout(120)def test_tritonv2_2bits_asym(self, tiny_opt_model_path):"""A tuned INT2 asymmetric export reloads and generates with Triton.diff --git a/test/unit/test_cuda/calibration/test_calib_dataset.py b/test/unit/test_cuda/calibration/test_calib_dataset.pyindex f3b665031..32ab6c5fd 100644--- a/test/unit/test_cuda/calibration/test_calib_dataset.py+++ b/test/unit/test_cuda/calibration/test_calib_dataset.py@@ -5,7 +5,6 @@ from auto_round.calib_dataset import get_dataloaderclass TestLocalCalibDataset:- @pytest.mark.timeout(150)def test_combine_dataset(self, tiny_opt_model_path, monkeypatch):# Subprocess lifecycle is covered by test_calib_dataset_subprocess.py. The# streaming sources below cannot reuse its cache, so avoid loading each twice.diff --git a/test/unit/test_cuda/compressors/test_layer_config.py b/test/unit/test_cuda/compressors/test_layer_config.pyindex 2cfb748b2..3a41adcfb 100644--- a/test/unit/test_cuda/compressors/test_layer_config.py+++ b/test/unit/test_cuda/compressors/test_layer_config.py@@ -36,7 +36,6 @@ class TestLayerConfigGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_mixed_precision_quantize_reload(self, tiny_opt_model_path):layer_config = {"model.decoder.layers.0.self_attn.q_proj": {"bits": 8},@@ -63,7 +62,6 @@ class TestLayerConfigGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_layer_config_string_scheme(self, tiny_opt_model_path):"""layer_config values given as preset scheme strings."""layer_config = {@@ -87,7 +85,6 @@ class TestLayerConfigGpu:model = AutoModelForCausalLM.from_pretrained(quantized_model_path, device_map="cuda:0", trust_remote_code=True)assert isinstance(model, torch.nn.Module)- @pytest.mark.timeout(180)def test_ignore_layers_not_quantized(self, tiny_opt_model_path):"""A layer listed in ignore_layers must not be quantized."""ignored = "model.decoder.layers.0.self_attn.q_proj"@@ -111,7 +108,6 @@ class TestLayerConfigGpu:q_proj = getattr(q_proj, part)assert not hasattr(q_proj, "qweight"), "ignored layer was unexpectedly quantized"- @pytest.mark.timeout(180)def test_layer_config_bits2_8(self, tiny_opt_model_path):"""Mixed 2-bit and 8-bit per-layer config."""layer_config = {diff --git a/test/unit/test_cuda/export/test_auto_round_format.py b/test/unit/test_cuda/export/test_auto_round_format.pyindex 9eea2b23a..69559bc9c 100644--- a/test/unit/test_cuda/export/test_auto_round_format.py+++ b/test/unit/test_cuda/export/test_auto_round_format.py@@ -177,7 +177,6 @@ class TestAutoRound:eval_generated_prompt(model, tokenizer)torch.cuda.empty_cache()- @pytest.mark.timeout(120)def test_fp8_block_fp8_format(self, tiny_qwen_model_path):model_name = tiny_qwen_model_pathdiff --git a/test/unit/test_cuda/export/test_autoround_int_export.py b/test/unit/test_cuda/export/test_autoround_int_export.pyindex cc39e2b0f..dd5767970 100644--- a/test/unit/test_cuda/export/test_autoround_int_export.py+++ b/test/unit/test_cuda/export/test_autoround_int_export.py@@ -54,7 +54,6 @@ class TestAutoroundIntExportGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)@pytest.mark.parametrize("bits", [2, 4, 8])@pytest.mark.parametrize("group_size", [32, 128])def test_int_export_reload_forward(self, tiny_opt_model_path, bits, group_size):@@ -78,7 +77,6 @@ class TestAutoroundIntExportGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)@pytest.mark.parametrize("group_size", [128])def test_w8_asym_env_int_export_reload_forward(self, tiny_opt_model_path, group_size, monkeypatch):"""AR_ALLOW_W8_ASYM=1 skips the native-format refusal; the packed@@ -105,7 +103,6 @@ class TestAutoroundIntExportGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)@pytest.mark.parametrize("bits", [4]) # 8-bit asym is refused at construction@pytest.mark.parametrize("group_size", [32, 128])def test_asym_int_export_reload_forward(self, tiny_opt_model_path, bits, group_size):@@ -130,7 +127,6 @@ class TestAutoroundIntExportGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_int_export_group_size_64(self, tiny_opt_model_path):"""group_size=64 exercises the non-power-of-128 packing path."""autoround = AutoRound(diff --git a/test/unit/test_cuda/export/test_fp8_schemes.py b/test/unit/test_cuda/export/test_fp8_schemes.pyindex abe0b2a3d..64a077a9d 100644--- a/test/unit/test_cuda/export/test_fp8_schemes.py+++ b/test/unit/test_cuda/export/test_fp8_schemes.py@@ -39,13 +39,11 @@ class TestFp8SchemesGpu:breakassert found_fp8, "No fp8 weight found in the compressed model"- @pytest.mark.timeout(180)def test_fp8_block_export(self, tiny_qwen_model_path):autoround = AutoRound(tiny_qwen_model_path, scheme="FP8_BLOCK", iters=0, disable_opt_rtn=True, seqlen=2)compressed_model, _ = autoround.quantize_and_save(output_dir=self.save_dir, format="auto_round")self._assert_fp8_weight(compressed_model)- @pytest.mark.timeout(180)def test_fp8_static_export(self, tiny_qwen_model_path):autoround = AutoRound(tiny_qwen_model_path, scheme="FP8_STATIC", iters=0, disable_opt_rtn=True, seqlen=2)compressed_model, quantized_model_path = autoround.quantize_and_save(@@ -55,7 +53,6 @@ class TestFp8SchemesGpu:model = AutoModelForCausalLM.from_pretrained(quantized_model_path, device_map="cuda:0", trust_remote_code=True)assert isinstance(model, torch.nn.Module)- @pytest.mark.timeout(180)def test_fp8_block_forward(self, tiny_qwen_model_path):"""Reloaded FP8_BLOCK model must run a forward pass on GPU."""autoround = AutoRound(tiny_qwen_model_path, scheme="FP8_BLOCK", iters=0, disable_opt_rtn=True, seqlen=2)@@ -74,7 +71,6 @@ class TestFp8SchemesGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_fp8_plain_export(self, tiny_qwen_model_path):"""Weight-only FP8 (FPW8A16, per-channel scale) export."""autoround = AutoRound(diff --git a/test/unit/test_cuda/export/test_gguf_format.py b/test/unit/test_cuda/export/test_gguf_format.pyindex 3cd83f0d8..360f3e90a 100644--- a/test/unit/test_cuda/export/test_gguf_format.py+++ b/test/unit/test_cuda/export/test_gguf_format.py@@ -105,7 +105,6 @@ class TestAutoRound:@pytest.mark.skipif(not check_version("transformers>=5.2.0"), reason="requires transformers >= 5.2.0")@pytest.mark.skipif(not torch.cuda.is_available(), reason="requires CUDA")@require_gguf- @pytest.mark.timeout(240)def test_qwen35_moe_gguf(self, tiny_qwen35_moe_model_path, monkeypatch):monkeypatch.setenv("AR_DISABLE_GGUF_MTP_EXPORT", "1")self._export_qwen35_moe_gguf(tiny_qwen35_moe_model_path)@@ -231,7 +230,6 @@ class TestAutoRound:reason="Architecture: Gemma VLM GGUF export validates mmproj output and requires a large multimodal fixture")@require_gguf- @pytest.mark.timeout(120)def test_vlm_gguf(self):from test.helpers import save_tiny_model@@ -309,7 +307,6 @@ class TestAutoRound:reason="Matrix: The Q2_K_S first-eighth FFN-down dtype rule is covered by a dedicated GGUF dtype unit test")@require_gguf- @pytest.mark.timeout(90)def test_q2_k_s_ffn_down_q4k(self):"""Verify blk.0.ffn_down.weight is Q4_K in gguf:q2_k_s format.Blocks where i_layer < n_layer/8 should use Q4_K instead of Q2_K for ffn_down."""diff --git a/test/unit/test_cuda/export/test_mxfp_nvfp.py b/test/unit/test_cuda/export/test_mxfp_nvfp.pyindex 892be0862..0b658e661 100644--- a/test/unit/test_cuda/export/test_mxfp_nvfp.py+++ b/test/unit/test_cuda/export/test_mxfp_nvfp.py@@ -30,7 +30,6 @@ class TestMxfpNvfpExportGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)@pytest.mark.parametrize("scheme", ["MXFP4", "NVFP4", "MXFP8", "MXFP4_RCEIL"])def test_export_reload_forward(self, tiny_qwen_model_path, scheme):autoround = AutoRound(@@ -50,7 +49,6 @@ class TestMxfpNvfpExportGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)@pytest.mark.parametrize("scheme", ["MXFP4", "NVFP4"])def test_export_qlinear_modules(self, tiny_qwen_model_path, scheme):"""The reloaded model must contain the expected MXFP/NVFP quant-linear module."""diff --git a/test/unit/test_cuda/export/test_nvfp_autoround_export.py b/test/unit/test_cuda/export/test_nvfp_autoround_export.pyindex 79d382e6a..19c0e549d 100644--- a/test/unit/test_cuda/export/test_nvfp_autoround_export.py+++ b/test/unit/test_cuda/export/test_nvfp_autoround_export.py@@ -30,7 +30,6 @@ class TestNvfpAutoroundExport:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_nvfp4_autoround_export(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,diff --git a/test/unit/test_cuda/models/test_fp8_model.py b/test/unit/test_cuda/models/test_fp8_model.pyindex 73f64b223..9d8d53e6f 100644--- a/test/unit/test_cuda/models/test_fp8_model.py+++ b/test/unit/test_cuda/models/test_fp8_model.py@@ -79,7 +79,6 @@ class TestAutoRound:tokenizer = AutoTokenizer.from_pretrained(quantized_model_path)generate_prompt(model, tokenizer)- @pytest.mark.timeout(90)def test_gguf_imatrix(self, mock_fp8_capable_device, tiny_fp8_qwen_model_path):ar = AutoRound(tiny_fp8_qwen_model_path, iters=0)_, quantized_model_path = ar.quantize_and_save(format="gguf:q2_k_s", output_dir=self.save_dir)@@ -112,7 +111,6 @@ class TestAutoRound:with patch("torch.cuda.get_device_capability", return_value=DEVICE_CAPABILITY): # revert DEVICE_CAPABILITYevaluate_accuracy(folder, threshold=0.25)- @pytest.mark.timeout(300)def test_small_model_opt_rtn(self, mock_fp8_capable_device):model_name = get_model_path("Qwen/Qwen3-0.6B-FP8")ar = AutoRound(model=model_name, iters=0)diff --git a/test/unit/test_cuda/models/test_moe_model.py b/test/unit/test_cuda/models/test_moe_model.pyindex fe3e3e34f..7e9869f4e 100644--- a/test/unit/test_cuda/models/test_moe_model.py+++ b/test/unit/test_cuda/models/test_moe_model.py@@ -17,7 +17,6 @@ def _calibration_data(seqlen):@pytest.mark.skipif(not check_version("transformers>=5.2.0"), reason="requires transformers >= 5.2.0")def test_qwen3_5_moe(tiny_qwen35_moe_text_model_path, tmp_path):from transformers import Qwen3_5MoeForCausalLM@@ -47,7 +46,6 @@ def test_qwen3_5_moe(tiny_qwen35_moe_text_model_path, tmp_path):reason="Architecture: Conditional Qwen3.5 fused-MoE validates the large VLM fixture; retain in the full test tier")@pytest.mark.skipif(not check_version("transformers>=5.2.0"), reason="requires transformers >= 5.2.0")[email protected](300)def test_qwen3_5_moe_conditional(tiny_qwen35_moe_model_path, tmp_path):from transformers import Qwen3_5MoeForConditionalGenerationdiff --git a/test/unit/test_cuda/models/test_omni_model.py b/test/unit/test_cuda/models/test_omni_model.pyindex 99559ead3..b4782436e 100644--- a/test/unit/test_cuda/models/test_omni_model.py+++ b/test/unit/test_cuda/models/test_omni_model.py@@ -133,7 +133,6 @@ class TestQwen3OmniMoeQuantization:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_quantize_and_reload(self, tiny_opt_model_path, tiny_qwen3_omni_moe_model_path):"""Quantize, save, reload, and run Qwen3-Omni's text-only thinker path."""autoround = _make_text_only_autoround(tiny_qwen3_omni_moe_model_path, tiny_opt_model_path)diff --git a/test/unit/test_cuda/models/test_special_model.py b/test/unit/test_cuda/models/test_special_model.pyindex aad08170e..69215b7e3 100644--- a/test/unit/test_cuda/models/test_special_model.py+++ b/test/unit/test_cuda/models/test_special_model.py@@ -38,7 +38,6 @@ class TestSpecialModelHandlerGpu:layers = get_predefined_ignore_layers(model)assert any(".gate" in name for name in layers), f"No MoE gate ignore layers found: {layers}"- @pytest.mark.timeout(240)def test_moe_quantize_reload(self, tiny_qwen_moe_model_path):autoround = AutoRound(tiny_qwen_moe_model_path,@@ -65,7 +64,6 @@ class TestSpecialModelHandlerGpu:layers = get_predefined_ignore_layers(model)assert layers == []- @pytest.mark.timeout(240)def test_moe_lm_head_not_quantized(self, tiny_qwen_moe_model_path):"""lm_head is not in the quant block list and must stay unquantized after export."""autoround = AutoRound(@@ -85,7 +83,6 @@ class TestSpecialModelHandlerGpu:if lm_head is not None:assert not hasattr(lm_head, "qweight"), "lm_head was unexpectedly quantized"- @pytest.mark.timeout(240)def test_moe_quantize_iters_reload(self, tiny_qwen_moe_model_path):"""MoE quantization with sign-SGD (iters>0) + reload."""autoround = AutoRound(diff --git a/test/unit/test_cuda/quantization/test_act_quantization.py b/test/unit/test_cuda/quantization/test_act_quantization.pyindex 6143c6377..e1d7e7cbc 100644--- a/test/unit/test_cuda/quantization/test_act_quantization.py+++ b/test/unit/test_cuda/quantization/test_act_quantization.py@@ -41,7 +41,6 @@ class TestActQuantizationGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)def test_w4a8_act_dynamic(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,@@ -58,7 +57,6 @@ class TestActQuantizationGpu:_, quantized_model_path = autoround.quantize_and_save(output_dir=self.save_dir, format="auto_round")self._reload_and_forward(quantized_model_path)- @pytest.mark.timeout(180)def test_w8a8_act_dynamic(self, tiny_opt_model_path):autoround = AutoRound(tiny_opt_model_path,@@ -76,7 +74,6 @@ class TestActQuantizationGpu:_, quantized_model_path = autoround.quantize_and_save(output_dir=self.save_dir, format="auto_round")self._reload_and_forward(quantized_model_path)- @pytest.mark.timeout(180)def test_w4a8_act_static(self, tiny_opt_model_path):"""Static (non-dynamic) activation quantization path."""autoround = AutoRound(@@ -95,7 +92,6 @@ class TestActQuantizationGpu:_, quantized_model_path = autoround.quantize_and_save(output_dir=self.save_dir, format="auto_round")self._reload_and_forward(quantized_model_path)- @pytest.mark.timeout(180)def test_w4a8_act_group128(self, tiny_opt_model_path):"""Wider act_group_size exercises a different act-hook grouping path."""autoround = AutoRound(@@ -113,7 +109,6 @@ class TestActQuantizationGpu:_, quantized_model_path = autoround.quantize_and_save(output_dir=self.save_dir, format="auto_round")self._reload_and_forward(quantized_model_path)- @pytest.mark.timeout(180)def test_w8a8_asym(self, tiny_opt_model_path):"""Asymmetric W8A8 cannot be exported to the auto_round format.@@ -136,7 +131,6 @@ class TestActQuantizationGpu:seqlen=16,)- @pytest.mark.timeout(180)def test_w4a8_reload_layer_type_diff_but_output_equal(self, tiny_opt_model_path):"""Save path keeps wrappers; reload path materializes FakeActQuantLinear, outputs should match."""old_offload = os.environ.get("AR_DISABLE_OFFLOAD")diff --git a/test/unit/test_cuda/quantization/test_mxfp_nvfp.py b/test/unit/test_cuda/quantization/test_mxfp_nvfp.pyindex e214bf48b..9b1675694 100644--- a/test/unit/test_cuda/quantization/test_mxfp_nvfp.py+++ b/test/unit/test_cuda/quantization/test_mxfp_nvfp.py@@ -28,7 +28,6 @@ QMODULE_MAPPING = {}[email protected](120)@pytest.mark.parametrize("scheme", testing_schemes)@torch.inference_mode()def test_e2e_quant_and_infer(scheme, tiny_qwen_model_path):diff --git a/test/unit/test_cuda/quantization/test_torch_compile.py b/test/unit/test_cuda/quantization/test_torch_compile.pyindex 6ea92ec5f..2110c3400 100644--- a/test/unit/test_cuda/quantization/test_torch_compile.py+++ b/test/unit/test_cuda/quantization/test_torch_compile.py@@ -57,7 +57,6 @@ class TestTorchCompile:shutil.rmtree(self.save_dir, ignore_errors=True)@require_gguf- @pytest.mark.timeout(90)def test_gguf_q2ks_torch_compile_iters0(self, tiny_qwen_model_path):"""Test GGUF Q2_K_S with torch.compile and iters=0 (RTN mode).diff --git a/test/unit/test_cuda/requirements_vlm.txt b/test/unit/test_cuda/requirements_vlm.txtindex f9d195112..3539bf033 100644--- a/test/unit/test_cuda/requirements_vlm.txt+++ b/test/unit/test_cuda/requirements_vlm.txt@@ -1,10 +1,8 @@# git+https://github.com/haotian-liu/[email protected] --no-deps# pip install git+https://github.com/deepseek-ai/DeepSeek-VL2.git --no-deps# pip install -v git+https://github.com/casper-hansen/[email protected] --no-build-isolation-# pip install flash-attn==2.8.3 --no-build-isolationbitsandbyteseinops-flash-attngptqmodellm-eval>=0.4.2,<0.5optimumdiff --git a/test/unit/test_cuda/schemes/test_scheme_presets.py b/test/unit/test_cuda/schemes/test_scheme_presets.pyindex f175acc24..9c1d50df3 100644--- a/test/unit/test_cuda/schemes/test_scheme_presets.py+++ b/test/unit/test_cuda/schemes/test_scheme_presets.py@@ -30,7 +30,6 @@ class TestSchemePresetsGpu:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)@pytest.mark.parametrize("scheme", ["W4A16", "W2A16", "W8A16", "W3A16", "INT8"])def test_scheme_preset_quantize_forward(self, tiny_opt_model_path, scheme):autoround = AutoRound(tiny_opt_model_path, scheme=scheme, iters=0, disable_opt_rtn=True, nsamples=1, seqlen=16)@@ -43,7 +42,6 @@ class TestSchemePresetsGpu:out = model(input_ids)assert out.logits.shape[0] == 1- @pytest.mark.timeout(180)@pytest.mark.parametrize(("bits", "expected"),[(4, 4), (8, 8)],diff --git a/test/unit/test_cuda/transform/test_mxfp4_transform.py b/test/unit/test_cuda/transform/test_mxfp4_transform.pyindex 7bd5b30cf..9c2e7aeb3 100644--- a/test/unit/test_cuda/transform/test_mxfp4_transform.py+++ b/test/unit/test_cuda/transform/test_mxfp4_transform.py@@ -26,7 +26,6 @@ class TestAutoRound:shutil.rmtree("./saved", ignore_errors=True)shutil.rmtree("runs", ignore_errors=True)- @pytest.mark.timeout(120)def test_transform_mxfp4_quant_infer(self):model_name = get_model_path("qwen/Qwen3-0.6B")scheme = "MXFP4"@@ -49,7 +48,6 @@ class TestAutoRound:@pytest.mark.skip_ci(reason="Matrix: Default MXFP4 transform covers CUDA export/reload; MXFP4 tuning remains in the full test tier")- @pytest.mark.timeout(90)def test_transform_mxfp4_tuning_quant_infer(self):model_name = get_model_path("qwen/Qwen3-0.6B")scheme = "MXFP4"@@ -72,7 +70,6 @@ class TestAutoRound:@pytest.mark.skip_ci(reason="Matrix: Random Hadamard behavior has dedicated unit coverage; keep the CUDA MXFP4 E2E smoke deterministic")- @pytest.mark.timeout(90)def test_random_transform_mxfp4_quant_infer(self):model_name = get_model_path("qwen/Qwen3-0.6B")scheme = "MXFP4"diff --git a/test/unit/test_cuda/transform/test_spinquant.py b/test/unit/test_cuda/transform/test_spinquant.pyindex 815602752..1a6d0808f 100644--- a/test/unit/test_cuda/transform/test_spinquant.py+++ b/test/unit/test_cuda/transform/test_spinquant.py@@ -308,7 +308,6 @@ class TestPipelineIntegration:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_pipeline_quarot_string(self):"""AutoRound(alg_configs=["rtn", "quarot"]) should work end-to-end."""model_name = get_model_path("Qwen/Qwen3-0.6B")@@ -325,7 +324,6 @@ class TestPipelineIntegration:tokenizer = AutoTokenizer.from_pretrained(quantized_model_path)generate_prompt(model, tokenizer)- @pytest.mark.timeout(90)def test_pipeline_spinquant_config(self):"""AutoRound(alg_configs=["rtn", SpinQuantConfig(...)]) should work."""model_name = get_model_path("Qwen/Qwen3-0.6B")@@ -353,7 +351,6 @@ class TestPipelineIntegration:@pytest.mark.skip_ci(reason="Matrix: The SpinQuantConfig-object pipeline is already covered by test_pipeline_spinquant_config")- @pytest.mark.timeout(90)def test_pipeline_config_object(self):"""Building a SpinQuantConfig directly (instead of the dict shorthand) and passingit via ``alg_configs`` should work."""diff --git a/test/unit/test_hpu/test_auto_round.py b/test/unit/test_hpu/test_auto_round.pyindex fea794177..90850c123 100644--- a/test/unit/test_hpu/test_auto_round.py+++ b/test/unit/test_hpu/test_auto_round.py@@ -31,7 +31,6 @@ def run_opt_125m_on_hpu():@pytest.mark.skipif(not is_hpex_available(), reason="HPU is not supported")@pytest.mark.skipif(not is_pytest_mode_lazy(), reason="Only for lazy mode")def test_opt_125m_lazy_mode():run_opt_125m_on_hpu()diff --git a/test/unit/test_hpu/test_quant_fp8.py b/test/unit/test_hpu/test_quant_fp8.pyindex fc9737dd7..73091a1ec 100644--- a/test/unit/test_hpu/test_quant_fp8.py+++ b/test/unit/test_hpu/test_quant_fp8.py@@ -31,7 +31,6 @@ class TestAutoRound:def check_nan_inf_in_tensor(self, tensor, name=""):return torch.isnan(tensor).any() or torch.isinf(tensor).any()- @pytest.mark.timeout(120)@pytest.mark.parametrize("model_name", MODEL_LIST)def test_small_model_rtn_generation(self, model_name):ar = AutoRound(model_name, iters=0, scheme="FP8_STATIC", nsamples=16)diff --git a/test/unit/test_hpu/test_static_attn.py b/test/unit/test_hpu/test_static_attn.pyindex 2a06a8a44..6f2c5cacf 100644--- a/test/unit/test_hpu/test_static_attn.py+++ b/test/unit/test_hpu/test_static_attn.py@@ -26,7 +26,6 @@ def setup_deepseekv2():@pytest.mark.skipif(not is_hpex_available(), reason="HPU is not supported")@pytest.mark.skipif(not is_pytest_mode_lazy(), reason="Only for lazy mode")def test_deepseek_v2_on_hpu(setup_deepseekv2):model, tokenizer, output_dir, config = setup_deepseekv2autoround = AutoRound(diff --git a/test/unit/test_xpu/algorithms/test_awq.py b/test/unit/test_xpu/algorithms/test_awq.pyindex f4c880f8f..9bbb8cb1a 100644--- a/test/unit/test_xpu/algorithms/test_awq.py+++ b/test/unit/test_xpu/algorithms/test_awq.py@@ -51,7 +51,6 @@ class TestAWQNormalLLM:assert cfg.awq_seqlen == 128- @pytest.mark.timeout(90)def test_awq_w4a16_quantize_and_inference(self, tiny_opt_model_path):"""W4A16 AWQ quantization produces valid layer_config and the model can generate.@@ -80,7 +79,6 @@ class TestAWQNormalLLM:output = generate_prompt(model, tokenizer, device=device)assert len(output) > 0, "Model should produce non-empty output"- @pytest.mark.timeout(120)def test_awq_w4a16_export_default_scheme(self, tiny_opt_model_path):"""Default W4A16 scheme export: quantization_config has bits=4, group_size=128."""ar = AutoRound(@@ -130,7 +128,6 @@ class TestAWQNormalLLM:assert qconfig["sym"] == symassert "auto-round" in qconfig["quant_method"]- @pytest.mark.timeout(120)@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)def test_awq_w4a16_round_trip(self, tiny_opt_model_path, device):"""Quantize, save, reload on `device`, and generate -- exercises the full save/load round trip.@@ -163,7 +160,6 @@ class TestAWQNonIntegerSchemes:MXFP/NVFP scheme."""- @pytest.mark.timeout(60)@pytest.mark.parametrize("scheme", ["MXFP4", "NVFP4"])def test_awq_non_integer_scheme_smoke(self, tiny_opt_model_path, scheme):"""Algorithm/config correctness (bits/act_bits assignment) -- runs once on cpu.@@ -737,7 +733,6 @@ class TestAWQMoE:assert kwargs["position_embeddings"][1].shape == (1, 4, 8)@requires_cuda- @pytest.mark.timeout(420)def test_awq_moe_quantized_layers_check(self, tiny_qwen_moe_model_path):"""AWQ on MoE: expert layers should be quantized, gates/routers stay FP.@@ -781,7 +776,6 @@ class TestAWQMoE:# TODO: Investigate and fix the excessive test runtime instead of relying on an increased timeout.@requires_cuda- @pytest.mark.timeout(400)def test_awq_moe_save_quant_config(self, tiny_qwen_moe_model_path):"""AWQ MoE: saved quantization_config should be consistent and loadable.diff --git a/test/unit/test_xpu/backends/test_torch_backend.py b/test/unit/test_xpu/backends/test_torch_backend.pyindex 5ade5afe2..8665f6176 100644--- a/test/unit/test_xpu/backends/test_torch_backend.py+++ b/test/unit/test_xpu/backends/test_torch_backend.py@@ -55,7 +55,6 @@ class TestTorchBackendFunctional:@pytest.mark.parametrize("device", _AVAILABLE_DEVICES)@pytest.mark.parametrize("iters", [0, 1], ids=["rtn", "tuning"])@pytest.mark.parametrize("sym,group_size,format", _4BIT_CASES)- @pytest.mark.timeout(120)def test_torch_backend_4bit(self, tiny_opt_model_path, sym, group_size, format, iters, device):"""4-bit (a)symmetric model, RTN or tuned, loads via the torch backend and generates text."""ar = AutoRound(tiny_opt_model_path, bits=4, group_size=group_size, sym=sym, iters=iters, seqlen=2, nsamples=1)diff --git a/test/unit/test_xpu/test_autoround.py b/test/unit/test_xpu/test_autoround.pyindex b12286616..da32e35a6 100644--- a/test/unit/test_xpu/test_autoround.py+++ b/test/unit/test_xpu/test_autoround.py@@ -29,7 +29,6 @@ class TestAutoRoundXPU:yieldshutil.rmtree(self.save_dir, ignore_errors=True)- @pytest.mark.timeout(180)def test_gptq_format(self, dataloader):model_name = get_model_path("facebook/opt-125m")model = AutoModelForCausalLM.from_pretrained(@@ -126,7 +125,6 @@ class TestAutoRoundXPU:shutil.rmtree(quantized_model_path, ignore_errors=True)- @pytest.mark.timeout(120)def test_vlm_model(self, dataloader):scheme = "W4A16"model_name = get_model_path("Qwen/Qwen2-VL-2B-Instruct")@@ -194,7 +192,6 @@ class TestAutoRoundXPU:)print(output_text[0])- @pytest.mark.timeout(90)def test_quant_lm_head(self, dataloader):bits, sym, group_size = 4, True, 128# Note that, to save UT tuning time, the local model is intentionally kept lightweight, using only 2 hidden layers.