Initialize vLLM config for Frontier profiling
This commit is contained in:
@@ -9,6 +9,7 @@ unchanged and adapt only that call boundary for the profiling experiment.
|
||||
from __future__ import annotations
|
||||
|
||||
import inspect
|
||||
import os
|
||||
from typing import Any
|
||||
|
||||
import torch
|
||||
@@ -51,7 +52,19 @@ def main() -> None:
|
||||
frontier_rope._VLLM_GET_ROPE_IMPORT_ERROR = None
|
||||
|
||||
from frontier.profiling.linear_op.main import main as frontier_main
|
||||
from vllm.config import ModelConfig, VllmConfig, set_current_vllm_config
|
||||
|
||||
model_root = os.environ.get("MODEL_ROOT")
|
||||
if not model_root:
|
||||
raise RuntimeError("MODEL_ROOT must point to the profiled Qwen checkpoint")
|
||||
model_config = ModelConfig(
|
||||
model=model_root,
|
||||
dtype="bfloat16",
|
||||
max_model_len=8192,
|
||||
skip_tokenizer_init=True,
|
||||
generation_config="vllm",
|
||||
)
|
||||
with set_current_vllm_config(VllmConfig(model_config=model_config)):
|
||||
frontier_main()
|
||||
|
||||
|
||||
|
||||
@@ -16,3 +16,4 @@ OUTPUT_ROOT = "/home/admin/cpfs/wjh/aituner/aituner-qwen30-vllm020-profile-fleet
|
||||
VENV_ROOT = "/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1"
|
||||
FRONTIER_ROOT = "/home/admin/cpfs/wjh/frontier-qwen30-vllm020-profile-v1/Frontier"
|
||||
VLLM_SOURCE = "/home/admin/cpfs/wjh/agentic-kv/third_party/vllm_v20_build"
|
||||
MODEL_ROOT = "/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B"
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
version = 1
|
||||
|
||||
[[jobs]]
|
||||
name = "qwen30-vllm020-frontier-linear-smoke-20260716-v2-rope-api"
|
||||
name = "qwen30-vllm020-frontier-linear-smoke-20260716-v3-model-context"
|
||||
gpus = 1
|
||||
gpu_model = "H20"
|
||||
hosts = ["dash0"]
|
||||
command = "cd /home/admin/cpfs/wjh/aituner/aituner-qwen30-vllm020-profile-v1/runs/frontier-qwen30-vllm020-profile-v1 && timeout --signal=TERM --kill-after=30s 1020 bash run_frontier_linear_smoke.sh"
|
||||
artifacts = ["artifacts/frontier-linear-smoke-v2"]
|
||||
artifacts = ["artifacts/frontier-linear-smoke-v3"]
|
||||
|
||||
[jobs.env]
|
||||
HOME = "/tmp/wjh"
|
||||
XDG_CACHE_HOME = "/tmp/wjh/.cache"
|
||||
VLLM_CACHE_ROOT = "/tmp/wjh/.cache/vllm"
|
||||
OUTPUT_ROOT = "/home/admin/cpfs/wjh/aituner/aituner-qwen30-vllm020-profile-fleet/artifacts/frontier-linear-smoke-v2"
|
||||
OUTPUT_ROOT = "/home/admin/cpfs/wjh/aituner/aituner-qwen30-vllm020-profile-fleet/artifacts/frontier-linear-smoke-v3"
|
||||
VENV_ROOT = "/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1"
|
||||
FRONTIER_ROOT = "/home/admin/cpfs/wjh/frontier-qwen30-vllm020-profile-v1/Frontier"
|
||||
VLLM_SOURCE = "/home/admin/cpfs/wjh/agentic-kv/third_party/vllm_v20_build"
|
||||
MODEL_ROOT = "/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B"
|
||||
|
||||
@@ -6,6 +6,8 @@ OUTPUT_ROOT="${OUTPUT_ROOT:?OUTPUT_ROOT must be set}"
|
||||
VENV_ROOT="${VENV_ROOT:-/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1}"
|
||||
FRONTIER_ROOT="${FRONTIER_ROOT:-/home/admin/cpfs/wjh/frontier-qwen30-vllm020-profile-v1/Frontier}"
|
||||
VLLM_SOURCE="${VLLM_SOURCE:-/home/admin/cpfs/wjh/agentic-kv/third_party/vllm_v20_build}"
|
||||
MODEL_ROOT="${MODEL_ROOT:-/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B}"
|
||||
export MODEL_ROOT
|
||||
RUN_DIR="$(pwd -P)"
|
||||
TOKENS=(1 8 16 32 64 128 256 512 1024 2048 4096 8192)
|
||||
mkdir -p "${OUTPUT_ROOT}/logs" "${OUTPUT_ROOT}/provenance" "${OUTPUT_ROOT}/profiles"
|
||||
@@ -23,9 +25,11 @@ nvidia-smi --query-gpu=index,name,driver_version,memory.used,utilization.gpu --f
|
||||
|
||||
test "$(git -C "${FRONTIER_ROOT}" rev-parse HEAD)" = "d9cfeb6d8791fbf2f295dd9744c56a666171776e"
|
||||
test "$(git -C "${VLLM_SOURCE}" rev-parse HEAD)" = "88d34c6409e9fb3c7b8ca0c04756f061d2099eb1"
|
||||
test -s "${MODEL_ROOT}/config.json"
|
||||
git rev-parse HEAD > "${OUTPUT_ROOT}/provenance/aituner.commit"
|
||||
git -C "${FRONTIER_ROOT}" rev-parse HEAD > "${OUTPUT_ROOT}/provenance/frontier.commit"
|
||||
git -C "${VLLM_SOURCE}" rev-parse HEAD > "${OUTPUT_ROOT}/provenance/vllm-source.commit"
|
||||
sha256sum "${MODEL_ROOT}/config.json" > "${OUTPUT_ROOT}/provenance/model-config.sha256"
|
||||
sha256sum run_frontier_linear_full.sh frontier_vllm020_compat.py \
|
||||
> "${OUTPUT_ROOT}/provenance/source.sha256"
|
||||
uv pip freeze --python "${VENV_ROOT}/bin/python" \
|
||||
|
||||
@@ -6,6 +6,8 @@ OUTPUT_ROOT="${OUTPUT_ROOT:?OUTPUT_ROOT must be set}"
|
||||
VENV_ROOT="${VENV_ROOT:-/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1}"
|
||||
FRONTIER_ROOT="${FRONTIER_ROOT:-/home/admin/cpfs/wjh/frontier-qwen30-vllm020-profile-v1/Frontier}"
|
||||
VLLM_SOURCE="${VLLM_SOURCE:-/home/admin/cpfs/wjh/agentic-kv/third_party/vllm_v20_build}"
|
||||
MODEL_ROOT="${MODEL_ROOT:-/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B}"
|
||||
export MODEL_ROOT
|
||||
RUN_DIR="$(pwd -P)"
|
||||
mkdir -p "${OUTPUT_ROOT}/logs" "${OUTPUT_ROOT}/provenance" "${OUTPUT_ROOT}/profiles"
|
||||
exec > >(tee -a "${OUTPUT_ROOT}/logs/smoke.log") 2>&1
|
||||
@@ -22,9 +24,11 @@ nvidia-smi --query-gpu=index,name,driver_version,memory.used,utilization.gpu --f
|
||||
|
||||
test "$(git -C "${FRONTIER_ROOT}" rev-parse HEAD)" = "d9cfeb6d8791fbf2f295dd9744c56a666171776e"
|
||||
test "$(git -C "${VLLM_SOURCE}" rev-parse HEAD)" = "88d34c6409e9fb3c7b8ca0c04756f061d2099eb1"
|
||||
test -s "${MODEL_ROOT}/config.json"
|
||||
git rev-parse HEAD > "${OUTPUT_ROOT}/provenance/aituner.commit"
|
||||
git -C "${FRONTIER_ROOT}" rev-parse HEAD > "${OUTPUT_ROOT}/provenance/frontier.commit"
|
||||
git -C "${VLLM_SOURCE}" rev-parse HEAD > "${OUTPUT_ROOT}/provenance/vllm-source.commit"
|
||||
sha256sum "${MODEL_ROOT}/config.json" > "${OUTPUT_ROOT}/provenance/model-config.sha256"
|
||||
sha256sum run_frontier_linear_smoke.sh frontier_vllm020_compat.py \
|
||||
> "${OUTPUT_ROOT}/provenance/source.sha256"
|
||||
uv pip freeze --python "${VENV_ROOT}/bin/python" \
|
||||
|
||||
Reference in New Issue
Block a user