白嫖地区一览:v6e(最先进的推理TPU):asia-northeast-1 us-east1-d v5p(最先进的训练TPU):us-east5-a us-central1-a
创建regional cluster,地区选择asia-northeast1-b或者us-east1-d
默认节点池类型选择TPU、型号选择ct6e-standard-8t,后面的topology确保是空白的,下Spot选项打勾,然后创建
白嫖地区一览:v6e(最先进的推理TPU):asia-northeast-1 us-east1-d v5p(最先进的训练TPU):us-east5-a us-central1-a
创建regional cluster,地区选择asia-northeast1-b或者us-east1-d
默认节点池类型选择TPU、型号选择ct6e-standard-8t,后面的topology确保是空白的,下Spot选项打勾,然后创建
首先克隆源代码
git clone https://github.com/vllm-project/vllm.git
在每个worker上安装依赖
cd vllm && pip install -r requirements/tpu.txt
安装库
sudo apt-get update && sudo NEEDRESTART_MODE=a apt-get install libopenblas-base libopenmpi-dev libomp-dev -y
安装vllm
cd vllm && VLLM_TARGET_DEVICE=”tpu” python setup.py develop
开启ray头节点
ray start –head –port=6379
其他worker连接头节点
ray start –address=’xx.xx.xx.xx:6379′
启动openai兼容api server
python3 -m vllm.entrypoints.openai.api_server –host=0.0.0.0 –port=8000 –tensor-parallel-size=芯片数量(4或8 由于有40个head因此此选项只能说4或8) –model=Qwen/QwQ-32B –trust-remote-code
使用ray的多节点需要开启 –distributed-executor-backend ray
如果100G空间不够使用gcsfuse挂载和开启 –download-dir=/xxx/bucket/