[Qwen4Exp] Support UVA PLE-offload and Engram tensor parallelism (#54371)
Signed-off-by: huanghaoyan.hhy <huanghaoyan.hhy@alibaba-inc.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
62f3bf58a5
commit
3116c5d06b
@@ -46,6 +46,39 @@ def test_optional_type():
|
||||
assert optional_type_func("42") == 42
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"options",
|
||||
[
|
||||
["--engram-config", '{"cpu_offload": false, "embedding_across_dp": true}'],
|
||||
[
|
||||
"--engram-config.cpu_offload",
|
||||
"false",
|
||||
"--engram-config.embedding_across_dp",
|
||||
"true",
|
||||
],
|
||||
],
|
||||
)
|
||||
def test_engram_config_cli(options, monkeypatch):
|
||||
"""CLI settings take precedence over the legacy offload environment."""
|
||||
monkeypatch.setenv("VLLM_PLE_CPU_OFFLOAD", "1")
|
||||
parser = EngineArgs.add_cli_args(FlexibleArgumentParser())
|
||||
args = EngineArgs.from_cli_args(parser.parse_args(options))
|
||||
assert args.engram_config is not None
|
||||
assert args.engram_config.cpu_offload is False
|
||||
assert args.engram_config.embedding_across_dp is True
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"options, provided",
|
||||
[([], False), (["--engram-config", "{}"], True)],
|
||||
)
|
||||
def test_engram_config_cli_optional(options, provided):
|
||||
"""An explicit empty config must remain distinct from an omitted config."""
|
||||
parser = EngineArgs.add_cli_args(FlexibleArgumentParser())
|
||||
args = EngineArgs.from_cli_args(parser.parse_args(options))
|
||||
assert (args.engram_config is not None) == provided
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("type_hint", "type", "expected"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user