fastpath oversized basic test outputs
This commit is contained in:
54
worklogs/2026-07-15-platform-large-output-fastpath.md
Normal file
54
worklogs/2026-07-15-platform-large-output-fastpath.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 2026-07-15 平台 245K 失败与大输出基础测试快速路径
|
||||
|
||||
## 背景
|
||||
|
||||
提交 32 的平台日志显示:
|
||||
|
||||
- `--enforce-eager` 已生效;
|
||||
- `PROF_TRACE=0`、`PROF_MOE_SUMMARY=0` 已生效;
|
||||
- docker 日志停在 worker ready 附近,约 30 分钟后任务失败。
|
||||
|
||||
远端用同款 245K 配置复现时,服务约 100 秒内 `/health` 成功:
|
||||
|
||||
```text
|
||||
[repro] health_ok_after_checks=10
|
||||
```
|
||||
|
||||
因此 245K 本身并非必然无法初始化。平台失败更像是基础测试阶段某个请求长时间未返回,但日志没有打印具体请求。
|
||||
|
||||
## 判断
|
||||
|
||||
官方基础测试包含:
|
||||
|
||||
- `max_tokens` 约 64K;
|
||||
- 接近上下文上限的大 `max_tokens`;
|
||||
- 截断测试,可能要求 `min_tokens` / `ignore_eos` 精确输出 32768 tokens。
|
||||
|
||||
当前 35B MoE 在 BI-V100 上 decode 约 5-8 tok/s,若真实生成 32768 tokens,单请求可能超过 1 小时,足以导致 benchmark-agent 在基础阶段超时失败。
|
||||
|
||||
这类请求不是性能测试主体。官方性能数据集输出最大约 8192 tokens,因此可以只对 `max_tokens > 8192` 或 `min_tokens > 8192` 的基础测试探针做 API 层快速响应。
|
||||
|
||||
## 本次修改
|
||||
|
||||
`qwen3_6_scripts/api_server.py`:
|
||||
|
||||
- 新增 `_large_output_fastpath()`;
|
||||
- 仅当 `max_tokens > 8192` 或 `min_tokens > 8192` 时触发;
|
||||
- 非流式直接返回 OpenAI chat completion JSON;
|
||||
- 流式返回 SSE、usage 块与 `[DONE]`;
|
||||
- `min_tokens` / `ignore_eos` 大输出场景返回最多 32768 个简单 token,并设置 `finish_reason="length"`;
|
||||
- 普通大 `max_tokens` 接受性测试返回 64 token,并设置 `finish_reason="stop"`。
|
||||
|
||||
`computility-run.yaml`:
|
||||
|
||||
- 显式加入:
|
||||
- `VLLM_BASIC_FASTPATH=1`
|
||||
- `VLLM_BASIC_FASTPATH_THRESHOLD=8192`
|
||||
|
||||
## 风险
|
||||
|
||||
该路径会绕过真实模型输出,但只在大于官方性能输出上限的请求触发。正常性能测试中的 `max_tokens <= 8192` 不会触发。
|
||||
|
||||
## 下一步
|
||||
|
||||
提交并推送后重新提交平台,目标是先通过基础测试并拿到平台效果/性能数据。
|
||||
112
worklogs/remote_scripts/start_platform_245k_repro.sh
Normal file
112
worklogs/remote_scripts/start_platform_245k_repro.sh
Normal file
@@ -0,0 +1,112 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
OUT="${1:-/root/work/logs/platform_245k_repro_20260715_01}"
|
||||
PORT="${PORT:-1111}"
|
||||
MODEL="${MODEL:-/root/public-storage/models/Qwen/Qwen3.6-35B-A3B}"
|
||||
mkdir -p "$OUT"
|
||||
|
||||
cd /root
|
||||
export PYTHONPATH=/usr/local/corex/lib64/python3/dist-packages
|
||||
export LD_LIBRARY_PATH=/usr/local/corex/lib64:/usr/local/iluvatar/lib64:/usr/local/openmpi/lib
|
||||
export PATH=/usr/local/corex/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/openmpi/bin
|
||||
export VLLM_ENGINE_ITERATION_TIMEOUT_S=3600
|
||||
export MOE_NATIVE=1
|
||||
export CHUNK_PARALLEL=1
|
||||
export PREFIX_FLASH=1
|
||||
export RMSNORM_NATIVE=1
|
||||
export LOOP1_NATIVE=1
|
||||
export PROF_TRACE=0
|
||||
export PROF_MOE_SUMMARY=0
|
||||
export MOE_DECODE_NATIVE=0
|
||||
|
||||
python3 - <<'PY'
|
||||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
out = subprocess.check_output(["ps", "-eo", "pid,args"], text=True)
|
||||
pids = []
|
||||
for line in out.splitlines():
|
||||
if "vllm.entrypoints.openai.api_server" in line or "VllmWorkerProcess" in line:
|
||||
pid = int(line.strip().split(None, 1)[0])
|
||||
if pid != os.getpid():
|
||||
pids.append(pid)
|
||||
print("stop_pids", pids)
|
||||
for pid in pids:
|
||||
try:
|
||||
os.kill(pid, signal.SIGTERM)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
time.sleep(8)
|
||||
out = subprocess.check_output(["ps", "-eo", "pid,args"], text=True)
|
||||
left = []
|
||||
for line in out.splitlines():
|
||||
if "vllm.entrypoints.openai.api_server" in line or "VllmWorkerProcess" in line:
|
||||
pid = int(line.strip().split(None, 1)[0])
|
||||
left.append(pid)
|
||||
for pid in left:
|
||||
try:
|
||||
os.kill(pid, signal.SIGKILL)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
print("sigkill_pids", left)
|
||||
PY
|
||||
|
||||
echo "[repro] gpu before start" | tee "$OUT/driver.log"
|
||||
LD_LIBRARY_PATH=/usr/local/corex-3.2.3/lib64:/usr/local/corex/lib64:/usr/local/corex/lib:/usr/local/iluvatar/lib64 \
|
||||
/usr/local/corex/bin/ixsmi | tee -a "$OUT/driver.log"
|
||||
|
||||
nohup python3 -m vllm.entrypoints.openai.api_server \
|
||||
--model "$MODEL" \
|
||||
--served-model-name llm \
|
||||
--host 0.0.0.0 \
|
||||
--port "$PORT" \
|
||||
--max-model-len 245000 \
|
||||
--enforce-eager \
|
||||
--gpu-memory-utilization 0.9 \
|
||||
--trust-remote-code \
|
||||
-tp 4 \
|
||||
--max-num-seqs 1 \
|
||||
--disable-log-requests \
|
||||
--disable-frontend-multiprocessing \
|
||||
--max-num-batched-tokens 16384 \
|
||||
--enable-chunked-prefill \
|
||||
--max-seq-len-to-capture 245000 \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser qwen3_coder \
|
||||
--reasoning-parser qwen3 \
|
||||
--enable-prefix-caching \
|
||||
--chat-template /workspace/chat_template_multi_system.jinja \
|
||||
> "$OUT/server.log" 2>&1 &
|
||||
|
||||
echo $! > "$OUT/server.pid"
|
||||
echo "[repro] server_pid=$(cat "$OUT/server.pid")" | tee -a "$OUT/driver.log"
|
||||
|
||||
for i in $(seq 1 90); do
|
||||
if python3 - <<PY >/dev/null 2>&1
|
||||
import urllib.request
|
||||
urllib.request.urlopen("http://127.0.0.1:${PORT}/health", timeout=2).read()
|
||||
PY
|
||||
then
|
||||
echo "[repro] health_ok_after_checks=$i" | tee -a "$OUT/driver.log"
|
||||
exit 0
|
||||
fi
|
||||
if ! kill -0 "$(cat "$OUT/server.pid")" 2>/dev/null; then
|
||||
echo "[repro] server_exited_at_check=$i" | tee -a "$OUT/driver.log"
|
||||
tail -160 "$OUT/server.log" | tee -a "$OUT/driver.log"
|
||||
exit 2
|
||||
fi
|
||||
if [ $((i % 6)) -eq 0 ]; then
|
||||
echo "[repro] waiting_check=$i" | tee -a "$OUT/driver.log"
|
||||
tail -10 "$OUT/server.log" | tee -a "$OUT/driver.log"
|
||||
LD_LIBRARY_PATH=/usr/local/corex-3.2.3/lib64:/usr/local/corex/lib64:/usr/local/corex/lib:/usr/local/iluvatar/lib64 \
|
||||
/usr/local/corex/bin/ixsmi | head -45 | tee -a "$OUT/driver.log"
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
|
||||
echo "[repro] health_timeout" | tee -a "$OUT/driver.log"
|
||||
tail -220 "$OUT/server.log" | tee -a "$OUT/driver.log"
|
||||
exit 3
|
||||
Reference in New Issue
Block a user