first commit

This commit is contained in:
2026-10-21 15:52:23 +08:00
commit f37510c88f
18 changed files with 5315 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
{
"args": [
"vllm",
"serve",
"/model",
"--trust-remote-code",
"--kv-cache-dtype",
"fp8",
"--block-size",
"256",
"--tensor-parallel-size",
"8",
"--data-parallel-size",
"2",
"--enable-expert-parallel",
"--no-enable-flashinfer-autotune",
"--tokenizer-mode",
"deepseek_v4",
"--tool-call-parser",
"deepseek_v4",
"--enable-auto-tool-choice",
"--reasoning-parser",
"deepseek_v4",
"--max-model-len",
"4096",
"--max-num-batched-tokens",
"1024",
"--enforce-eager",
"--port",
"18000"
],
"env": {
"VLLM_DISABLED_KERNELS": "PPUCutlassFp8BlockScaledMMKernel",
"VLLM_PPU_BF16_O_PROJ": "1",
"CUDA_VISIBLE_DEVICES": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15",
"VLLM_MULTI_STREAM_GEMM_TOKEN_THRESHOLD": "0",
"VLLM_PPU_SERIAL_ATTENTION": "1",
"VLLM_ENGINE_READY_TIMEOUT_S": "3600"
}
}

20
examples/launch.py Normal file
View File

@@ -0,0 +1,20 @@
import os,sys,json,resource,subprocess,signal,time
from pathlib import Path
base=Path(__file__).parent
resource.setrlimit(resource.RLIMIT_MEMLOCK,(resource.RLIM_INFINITY,resource.RLIM_INFINITY))
cfg=json.loads((base/"command-serial.json").read_text())
env=os.environ.copy();env.update(cfg["env"])
log=base/(sys.argv[1] if len(sys.argv)>1 else "serve-fixed.log")
with log.open("w") as f:
p=subprocess.Popen(cfg["args"],env=env,stdout=f,stderr=subprocess.STDOUT,start_new_session=True,cwd="/workspace/pytorch")
(base/"serve.pid").write_text(str(p.pid))
print("SERVER_PID",p.pid,"LOG",log,flush=True)
rc=p.wait()
print("SERVER_EXIT",rc,flush=True)
if rc:
try: os.killpg(p.pid,signal.SIGTERM)
except ProcessLookupError: pass
time.sleep(3)
try: os.killpg(p.pid,signal.SIGKILL)
except ProcessLookupError: pass
sys.exit(rc)