[A3] Qwen3.6 单机混部 - shun8686/sglang GitHub Wiki
服务启动参数 - A3 - 原始
#!/bin/bash
export ASCEND_RT_VISIBLE_DEVICES=12,13
export SGLANG_NPU_HICACHE_MAMBA_IO=async
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
sysctl -w vm.swappiness=0
sysctl -w kernel.numa_balancing=0
sysctl -w kernel.sched_migration_cost_ns=50000
unset https_proxy
unset http_proxy
unset HTTPS_PROXY
unset HTTP_PROXY
unset ASCEND_LAUNCH_BLOCKING
source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/nnal/atb/set_env.sh
export ASCEND_USE_FIA=1
export GLOO_SOCKET_IFNAME="lo"
export HCCL_BUFFSIZE=100
export HCCL_OP_EXPANSION_MODE=AIV
export HCCL_SOCKET_IFNAME="lo"
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=0
export SGLANG_SET_CPU_AFFINITY=1
export STREAMS_PER_DEVICE=32
python3 -m sglang.launch_server \
--model-path /mnt/paas/weights/Qwen/Qwen3.6-35B-A3B \
--host 127.0.0.1 --port 8869 \
--tp-size 2 \
--nnodes 1 \
--attention-backend ascend \
--device npu \
--chunked-prefill-size 65536 \
--max-total-tokens 65536 \
--max-prefill-tokens 43400 \
--trust-remote-code \
--prefill-max-requests 12 \
--max-running-requests 122 \
--max-mamba-cache-size 122 \
--mem-fraction-static 0.9 \
--cuda-graph-bs-decode 4 16 32 64 96 116 120 122 \
--enable-multimodal \
--mm-attention-backend ascend_attn \
--dtype bfloat16 \
--mamba-ssm-dtype bfloat16 \
--speculative-algorithm NEXTN \
--speculative-num-steps 3 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 4 \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_coder \
--enable-hierarchical-cache \
--hicache-io-backend kernel_ascend \
--enable-cache-report \
--hicache-ratio 4 \
--hicache-write-policy write_through \
--hicache-storage-backend npu_memcache \
--hicache-storage-backend-extra-config '{"meta_service_url":"tcp://127.0.0.1:5007", "config_store_url":"tcp://127.0.0.1:6007", "log_level":"info", "world_size":2, "protocol": "device_sdma", "dram_size": "30GB"}'
服务启动参数 - A3 - 极光
#!/bin/bash
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
sysctl -w vm.swappiness=0
sysctl -w kernel.numa_balancing=0
sysctl -w kernel.sched_migration_cost_ns=50000
unset https_proxy
unset http_proxy
unset HTTPS_PROXY
unset HTTP_PROXY
unset ASCEND_LAUNCH_BLOCKING
source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/nnal/atb/set_env.sh
export ASCEND_USE_FIA=1
export GLOO_SOCKET_IFNAME="lo"
export HCCL_BUFFSIZE=100
export HCCL_OP_EXPANSION_MODE=AIV
export HCCL_SOCKET_IFNAME="lo"
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=0
export SGLANG_SET_CPU_AFFINITY=1
export STREAMS_PER_DEVICE=32
export SGLANG_NPU_HICACHE_MAMBA_IO=async
python3 -m sglang.launch_server \
--model-path /mnt/paas/weights/Qwen/Qwen3.6-35B-A3B \
--tp-size 2 \
--attention-backend ascend \
--device npu \
--chunked-prefill-size 65536 \
--max-total-tokens 65536 \
--max-prefill-tokens 43400 \
--trust-remote-code \
--prefill-max-requests 12 \
--max-running-requests 122 \
--max-mamba-cache-size 122 \
--mem-fraction-static 0.9 \
--cuda-graph-bs-decode 4 16 32 64 96 116 120 122 \
--enable-multimodal \
--mm-attention-backend ascend_attn \
--dtype bfloat16 \
--mamba-ssm-dtype bfloat16 \
--speculative-algorithm NEXTN \
--speculative-num-steps 3 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 4 \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_coder \
--enable-hierarchical-cache \
--hicache-io-backend kernel_ascend \
--enable-cache-report \
--hicache-ratio 2 \
--hicache-write-policy write_through \
--hicache-storage-backend npu_memcache \
--hicache-storage-backend-extra-config '{"meta_service_url":"tcp://127.0.0.1:5007", "config_store_url":"tcp://127.0.0.1:6007", "log_level":"info", "world_size":256, "protocol": "device_sdma", "dram_size": "1GB"}'