- Desktop plugin: on-demand vLLM model start, eject, media budgets - WSL-native twin plugin for WSL project sessions - Launchers for Qwen3.6 35B-A3B, Qwen3.8 27B (uncensored/fast), Agents-A1 - Config templates, diagnostics, video-processor workaround
52 lines
2.2 KiB
Bash
52 lines
2.2 KiB
Bash
#!/bin/bash
|
|
# Qwen3.6-35B-A3B abliterated, NVFP4 on RTX 5090 / WSL.
|
|
# MTP is present in the checkpoint but disabled: with the BF16 draft on Triton
|
|
# it measured ~50 tok/s vs ~117-131 tok/s without speculative decoding.
|
|
# Based on THe-Plague/Qwen3.6-35B-A3B-abliterated-NVFP4-MTP.
|
|
#
|
|
# Video: vLLM 0.27.1 is built against an older transformers where the video
|
|
# processor mapping holds a class-name string. transformers 5.x stores a dict
|
|
# per backend ({"torchvision": "Qwen3VLVideoProcessor"}), which vLLM feeds into
|
|
# a dict lookup and crashes with "unhashable type: 'dict'". Shipping a local
|
|
# video_preprocessor_config.json makes vLLM resolve the name itself.
|
|
MODEL_DIR=${MODEL_DIR:-${MODELS:-/home/dfj/models}/THe-Plague/Qwen3.6-35B-A3B-abliterated-NVFP4-MTP}
|
|
VLLM_ENV=${VLLM_ENV:-/home/dfj/vllm-env}
|
|
VPC="$MODEL_DIR/video_preprocessor_config.json"
|
|
if [ ! -f "$VPC" ]; then
|
|
echo '{"video_processor_type": "Qwen3VLVideoProcessor"}' > "$VPC" && echo "qwen3.6-35b: wrote $VPC"
|
|
fi
|
|
|
|
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
|
export PATH="$VLLM_ENV/bin:$VLLM_ENV/lib/python3.12/site-packages/nvidia/cu13/bin:$PATH"
|
|
export CUDA_HOME="$VLLM_ENV/lib/python3.12/site-packages/nvidia/cu13"
|
|
export MAX_JOBS=4
|
|
export VLLM_USE_FLASHINFER_SAMPLER=0
|
|
export VLLM_MARLIN_USE_ATOMIC_ADD=1
|
|
export TORCH_MATMUL_PRECISION=high
|
|
unset FLASHINFER_JIT_VERBOSE
|
|
unset FLASHINFER_JIT_DEBUG
|
|
|
|
read TOTAL FREE < <(nvidia-smi --query-gpu=memory.total,memory.free --format=csv,noheader,nounits | awk -F',' '{gsub(/ /,""); print $1, $2}')
|
|
if [ -n "$TOTAL" ] && [ -n "$FREE" ]; then
|
|
UTIL=$(awk -v t="$TOTAL" -v f="$FREE" 'BEGIN { u=(f-1024)/t; if (u>0.92) u=0.92; if (u<0.60) u=0.62; printf "%.2f", u }')
|
|
echo "qwen3.6-35b: ${FREE} MiB free / ${TOTAL} MiB total -> gpu-memory-utilization ${UTIL}"
|
|
else
|
|
UTIL=0.85
|
|
fi
|
|
|
|
exec "$VLLM_ENV/bin/vllm" serve "$MODEL_DIR" \
|
|
--served-model-name qwen3.6-35b-uncensored \
|
|
--host 0.0.0.0 \
|
|
--port 8000 \
|
|
--moe-backend cutlass \
|
|
--max-model-len 262144 \
|
|
--limit-mm-per-prompt '{"image": 8, "video": 1}' \
|
|
--mm-processor-kwargs '{"max_pixels": 1048576}' \
|
|
--gpu-memory-utilization "$UTIL" \
|
|
--max-num-seqs 1 \
|
|
--max-num-batched-tokens 8192 \
|
|
--kv-cache-dtype fp8 \
|
|
--enable-auto-tool-choice \
|
|
--tool-call-parser qwen3_coder \
|
|
--reasoning-parser qwen3
|