[BugFix] Fixes Qwen3-Next enable nz accuracy problem (#4058)
### What this PR does / why we need it?
- Fixes Qwen3-Next enable nz accuracy problem
### Does this PR introduce _any_ user-facing change?
N/A
- vLLM version: v0.11.0
- vLLM main:
83f478bb19
---------
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
This commit is contained in:
@@ -46,12 +46,18 @@ class TestUtils(TestBase):
|
||||
self.assertFalse(utils.is_310p())
|
||||
|
||||
def test_is_enable_nz(self):
|
||||
with mock.patch("vllm_ascend.utils.envs_ascend.VLLM_ASCEND_ENABLE_NZ",
|
||||
1):
|
||||
self.assertTrue(utils.is_enable_nz())
|
||||
with mock.patch("vllm_ascend.utils.envs_ascend.VLLM_ASCEND_ENABLE_NZ",
|
||||
0):
|
||||
self.assertFalse(utils.is_enable_nz())
|
||||
# Case when _ENABLE_NZ is already set
|
||||
utils._ENABLE_NZ = True
|
||||
self.assertTrue(utils.is_enable_nz())
|
||||
|
||||
utils._ENABLE_NZ = False
|
||||
self.assertFalse(utils.is_enable_nz())
|
||||
|
||||
# Case when _ENABLE_NZ is None and vllm_config is not provided
|
||||
utils._ENABLE_NZ = None
|
||||
with self.assertRaises(ValueError) as context:
|
||||
utils.is_enable_nz()
|
||||
self.assertIn("vllm_config must be provided", str(context.exception))
|
||||
|
||||
def test_sleep_mode_enabled(self):
|
||||
utils._SLEEP_MODE_ENABLED = None
|
||||
|
||||
Reference in New Issue
Block a user