Cambricon MLU
Use the MLU backend when running xLLM on Cambricon devices.
Image and Container Startup
Section titled “Image and Container Startup”xLLM does not currently provide a public MLU image in the docs. If you already have the development image, start the container with:
sudo docker run -it \--privileged \--shm-size '128gb' \--ipc=host \--net=host \--pid=host \--name xllm-mlu \-v $HOME:$HOME \-w $HOME \<docker_image_name> \/bin/bashServer Startup Command
Section titled “Server Startup Command”#!/bin/bashset -e
rm -rf core.*
export MLU_VISIBLE_DEVICES=0
MODEL_PATH="/path/to/model/Qwen3-8B"MASTER_NODE_ADDR="127.0.0.1:9748"START_PORT=18000START_DEVICE=0LOG_DIR="log"NNODES=1
mkdir -p $LOG_DIR
for (( i=0; i<$NNODES; i++ ))do PORT=$((START_PORT + i)) DEVICE=$((START_DEVICE + i)) LOG_FILE="$LOG_DIR/node_$i.log" xllm \ --model $MODEL_PATH \ --devices="mlu:$DEVICE" \ --port $PORT \ --nnodes=$NNODES \ --master_node_addr=$MASTER_NODE_ADDR \ --block_size=16 \ --node_rank=$i \ > $LOG_FILE 2>&1 &doneFor a single-device run, <device-id> usually starts from 0. For larger deployments, keep the selected device ids aligned with --node_rank, --nnodes, and per-worker ports.
- xLLM does not currently provide a public MLU image in the docs. Use an available MLU development image with the container startup command above.
- The MLU launch example uses
--block_size=16in the current docs. - Check the Model Support List before choosing an MLU deployment target.