[CI][ROCm] Prefetch safetensors weights in AMD CI (#54898)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Andreas Karatzas
2026-09-02 03:28:39 -05:00
committed by GitHub
co-authored by OpenAI Codex
parent e52407ef4c
commit c6005000d3
5 changed files with 15 additions and 5 deletions
@@ -1,7 +1,7 @@
# For hf script, without -t option (tensor parallel size).
# bash .buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh -m meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 -l 250 -t 8 -f 5
model_name: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"
rocm_safetensors_load_strategy: lazy
rocm_safetensors_load_strategy: prefetch
required_gpu_arch:
- gfx942
- gfx950
+2 -1
View File
@@ -1,6 +1,7 @@
# quantization, model, revision[, minimum capability[, safetensors load strategy]]
fp8, amd/Meta-Llama-3.1-8B-Instruct-FP8-KV, main
None, amd/Llama-3.2-1B-Instruct-FP8-KV, main
fp8, amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV, main
fp8, amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV, main, 80, prefetch
gptq, robertgshaw2/zephyr-7b-beta-channelwise-gptq, main
gptq, TheBloke/Llama-2-7B-GPTQ, main
gptq, TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ, gptq-8bit--1g-actorder_True
+4 -3
View File
@@ -1,3 +1,4 @@
fp8, amd/Meta-Llama-3.1-70B-Instruct-FP8-KV, main
None, microsoft/phi-4, main
fp8, amd/Mixtral-8x22B-Instruct-v0.1-FP8-KV, main
# quantization, model, revision[, minimum capability[, safetensors load strategy]]
fp8, amd/Meta-Llama-3.1-70B-Instruct-FP8-KV, main, 80, prefetch
None, microsoft/phi-4, main, 80, prefetch
fp8, amd/Mixtral-8x22B-Instruct-v0.1-FP8-KV, main, 80, prefetch
@@ -28,6 +28,7 @@ do
echo "=== RUNNING MODEL: $MODEL_CONFIG ==="
unset WEIGHT_LOADING_TEST_SAFETENSORS_LOAD_STRATEGY
export QUANTIZATION=${array[0]}
export MODEL_NAME=${array[1]}
export REVISION=${array[2]}
@@ -35,6 +36,9 @@ do
if [ ${#array[@]} -gt 3 ]; then
export MIN_CAPABILITY=${array[3]}
fi
if [ ${#array[@]} -gt 4 ]; then
export WEIGHT_LOADING_TEST_SAFETENSORS_LOAD_STRATEGY=${array[4]}
fi
pytest -s weight_loading/test_weight_loading.py || LOCAL_SUCCESS=$?
if [[ $LOCAL_SUCCESS == 0 ]]; then
@@ -16,6 +16,9 @@ MODEL_NAME = os.environ.get(
REVISION = os.environ.get("REVISION", "main")
QUANTIZATION = os.environ.get("QUANTIZATION", "gptq_marlin")
MIN_CAPABILITY = os.environ.get("MIN_CAPABILITY", "80")
SAFETENSORS_LOAD_STRATEGY = os.environ.get(
"WEIGHT_LOADING_TEST_SAFETENSORS_LOAD_STRATEGY"
)
@pytest.mark.skipif(
@@ -42,6 +45,7 @@ def test_weight_loading(vllm_runner):
quantization=None if QUANTIZATION == "None" else QUANTIZATION,
max_model_len=MAX_MODEL_LEN,
tensor_parallel_size=2,
safetensors_load_strategy=SAFETENSORS_LOAD_STRATEGY,
# Generating 20 tokens needs a tiny KV cache, while sizing and
# allocating a full-size one dominates this test on large devices.
kv_cache_memory_bytes=2 * GiB_bytes,