-
Notifications
You must be signed in to change notification settings - Fork 85
docs: align vLLM docs with current defaults #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c00c0de
441d521
0e1baa7
aabd3b5
4d3e927
2654e1d
e273053
bbc3276
aac84ea
bddeaab
46df11d
3f75b9f
2adafcb
efe37ae
d846107
3859fb3
3d079d7
4bbb7c8
5f45eac
ce05017
598c122
0b1ae86
e941415
eb9b529
14bc27f
6ef4146
3e8f2c2
9b23b6f
d518739
d025c60
6f4ac37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
|
|
||
| **vime** 支持多种 NVIDIA GPU 硬件平台: | ||
|
|
||
| - **B200 系列**:完全支持,运行步骤与 H 系列完全相同 | ||
| - **GB200 / GB300 / B200 / 300 系列**:完全支持,运行步骤与 H 系列完全相同 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is 300 Series? B300?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
| - **H 系列 (H100/H200)**:官方支持,具有完整的 CI 测试保护,运行稳定可靠 | ||
|
|
||
| **重要说明**: | ||
|
|
@@ -19,8 +19,6 @@ | |
| - B 卡基本功能稳定,可作为开发和测试参考,但暂无 CI 保护 | ||
| - 两种硬件平台使用完全相同的安装和启动流程 | ||
|
|
||
| - 对于不方便使用 docker 的场景,请参考 [build_conda.sh](https://github.com/vllm-project/vime/blob/main/build_conda.sh)。 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove the non-Docker path? GB guard doesn't replace conda install.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have conda for now, also I don't think vllm has a conda release. |
||
|
|
||
| ### 拉取并启动 Docker 容器 | ||
|
|
||
| 请执行以下命令,拉取最新镜像并启动一个交互式容器: | ||
|
|
@@ -525,7 +523,7 @@ CUSTOM_ARGS=( | |
|
|
||
| ## 大规模 MOE 模型的多机训练 | ||
|
|
||
| 为了启动多机任务,首先需要启动一个 ray 集群,即在 node 0 运行: | ||
| 如果使用 Ray 进行多机训练,可以参考下面的方式启动集群: | ||
|
|
||
| ```bash | ||
| # Node0(HEAD) | ||
|
|
@@ -536,7 +534,7 @@ ray start --head --node-ip-address ${MASTER_ADDR} \ | |
| ray start --address=${MASTER_ADDR}:6379 --num-gpus 8 | ||
| ``` | ||
|
|
||
| 在 ray 集群启动后,可以在 node 0 提交任务,例如: | ||
| 在 Ray 集群启动后,可以在 node 0 提交任务,例如: | ||
|
|
||
| ```bash | ||
| ray job submit --address="http://127.0.0.1:8265" \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,7 @@ | |
|
|
||
| ### 选择训练后端 | ||
|
|
||
| vime 支持多种训练后端,可以通过 `--train-backend` 参数进行选择: | ||
|
|
||
| - `megatron`(默认):使用 Megatron-LM 作为训练后端,支持大规模模型的高效训练。 | ||
| vime 当前使用 Megatron-LM 作为训练后端,用于支持大规模模型的高效训练。 | ||
|
|
||
| ### 加载 megatron | ||
|
|
||
|
|
@@ -148,7 +146,7 @@ vLLM 的加载非常简单,只需要: | |
| - 在第一个训练步之前,vime 会把 megatron 里的参数同步给 vLLM,所以 `--hf-checkpoint` 中不需要有最新的训练参数,在续训的时候也不需要更换 hf ckpt; | ||
| - vLLM 默认会从 huggingface ckpt 中 `config.json` 读取模型的最大 context length,可以使用 `--vllm-max-model-len` 参数来对这个值进行覆盖,从而支持进行更长的推理; | ||
| - 在训推一体的训练过程中,虽然 megatron 和 vLLM 会先后 offload,但是还是需要为对方留有一些空间,需要通过减小 `--vllm-gpu-memory-utilization` 来调整 vLLM 的显存占用总量。 | ||
| - vime 支持透传 vllm-router 的参数,方式是在原参数名前加上 `router` 前缀。例如,vllm-router 的 `--balance-abs-threshold` 参数需要设置为 `--router-balance-abs-threshold`。由于 vllm-router 默认使用 cache-aware routing,可能会导致请求分配不均衡的问题。可以通过设置 `--router-balance-abs-threshold 0` 来强制均衡分配,但这可能会影响多轮对话场景下 prefix cache 的命中率。 | ||
| - vime 支持透传 vllm-router 的参数,方式是在原参数名前加上 `router` 前缀。例如,vllm-router 的 `--balance-abs-threshold` 参数需要设置为 `--router-balance-abs-threshold`。vime 默认使用 `consistent_hash` 路由策略。暂时不支持 cache-aware routing。可以通过设置 `--router-balance-abs-threshold 0` 来强制均衡分配,但这可能会影响多轮对话场景下 prefix cache 的命中率。 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cache-aware routing is not supported for now — but --router-policy cache_aware is still in argparse choices and vllm-config examples. |
||
|
|
||
| 对于一些 vLLM 的自定义以及 vime 引入 vLLM 的原理,请见 vLLM 使用方法一节。 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,18 +14,10 @@ def get_workers(router_url): | |
| return [] | ||
|
|
||
|
|
||
| def start_profile(worker_url, args): | ||
| payload = { | ||
| "output_dir": args.output_dir, | ||
| "num_steps": args.num_steps, | ||
| "activities": args.activities, | ||
| "profile_by_stage": args.profile_by_stage, | ||
| "with_stack": args.with_stack, | ||
| "record_shapes": args.record_shapes, | ||
| } | ||
| def start_profile(worker_url): | ||
| try: | ||
| print(f"Starting profile on {worker_url} for {args.num_steps} steps...") | ||
| response = requests.post(f"{worker_url}/start_profile", json=payload) | ||
| print(f"Starting profile on {worker_url}...") | ||
| response = requests.post(f"{worker_url}/start_profile", json={}) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does vLLM actually ignore the old payload?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
| response.raise_for_status() | ||
| print(f"Successfully started profile on {worker_url}") | ||
| except Exception as e: | ||
|
|
@@ -46,12 +38,6 @@ def main(): | |
| parser = argparse.ArgumentParser(description="Automate vLLM profiling across all workers via router.") | ||
| parser.add_argument("--router-url", type=str, required=True, help="Router URL (e.g., http://127.0.0.1:3000)") | ||
| parser.add_argument("--action", type=str, choices=["start", "stop"], default="start", help="Action to perform") | ||
| parser.add_argument("--output-dir", type=str, default="/tmp/vllm_profile", help="Output directory for traces") | ||
| parser.add_argument("--num-steps", type=int, default=3, help="Number of steps to profile (default: 3)") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Anyone still passing those flags will break silently — did we check?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it will not breaks but just silently do the start profile. |
||
| parser.add_argument("--activities", type=str, nargs="+", default=["GPU"], help="Activities to profile (CPU, GPU)") | ||
| parser.add_argument("--profile-by-stage", action="store_true", help="Profile by stage (prefill/decode)") | ||
| parser.add_argument("--with-stack", action="store_true", help="Record call stack") | ||
| parser.add_argument("--record-shapes", action="store_true", help="Record tensor shapes") | ||
|
|
||
| args = parser.parse_args() | ||
|
|
||
|
|
@@ -68,7 +54,7 @@ def main(): | |
| continue | ||
|
|
||
| if args.action == "start": | ||
| start_profile(worker_url, args) | ||
| start_profile(worker_url) | ||
| else: | ||
| stop_profile(worker_url) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.