Initial commit: OpenCode vLLM autostart plugin and launchers
- 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
This commit is contained in:
commit
40656fd046
27 files changed
+6710
No files matched your search
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
pkill -9 -f 'vllm serve' || true
|
||||
pkill -9 -f 'VLLM::EngineCore' || true
|
||||
sleep 4
|
||||
pgrep -af 'vllm serve' || echo "none"
|
||||
nvidia-smi --query-gpu=memory.used,memory.free --format=csv,noheader
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Agents-A1 35B-A3B NVFP4 on RTX 5090 / WSL.
|
||||
# NOTE: --moe-backend marlin crashes during load on this stack
|
||||
# (marlin_utils_fp4 _nvfp4_compute_scale_factor -> "device not ready").
|
||||
# vLLM CUTLASS is the stable sm120 path; ~139 tok/s single stream.
|
||||
VLLM_ENV=${VLLM_ENV:-/home/dfj/vllm-env}
|
||||
MODELS=${MODELS:-/home/dfj/models}
|
||||
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
|
||||
unset FLASHINFER_JIT_VERBOSE
|
||||
unset FLASHINFER_JIT_DEBUG
|
||||
export VLLM_USE_FLASHINFER_SAMPLER=0
|
||||
|
||||
# Pick a utilization that leaves headroom for whatever the desktop is using.
|
||||
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.90) u=0.90; if (u<0.60) u=0.62; printf "%.2f", u }')
|
||||
echo "agents-a1: ${FREE} MiB free / ${TOTAL} MiB total -> gpu-memory-utilization ${UTIL}"
|
||||
else
|
||||
UTIL=0.82
|
||||
fi
|
||||
|
||||
exec "$VLLM_ENV/bin/vllm" serve "$MODELS/protoLabsAI/Agents-A1-NVFP4" \
|
||||
--served-model-name agents-a1 \
|
||||
--host 0.0.0.0 \
|
||||
--port 8000 \
|
||||
--moe-backend cutlass \
|
||||
--language-model-only \
|
||||
--max-model-len 131072 \
|
||||
--gpu-memory-utilization "$UTIL" \
|
||||
--max-num-seqs 8 \
|
||||
--max-num-batched-tokens 8192 \
|
||||
--kv-cache-dtype fp8 \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser qwen3_coder \
|
||||
--reasoning-parser qwen3
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Qwen3.8 27B NVFP4 (unsloth) with MTP=3 on RTX 5090 / WSL.
|
||||
VLLM_ENV=${VLLM_ENV:-/home/dfj/vllm-env}
|
||||
MODELS=${MODELS:-/home/dfj/models}
|
||||
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
|
||||
unset FLASHINFER_JIT_VERBOSE
|
||||
unset FLASHINFER_JIT_DEBUG
|
||||
export VLLM_USE_FLASHINFER_SAMPLER=0
|
||||
exec "$VLLM_ENV/bin/vllm" serve "$MODELS/unsloth/Qwen3.8-27B-NVFP4" \
|
||||
--served-model-name qwen3.8-fast \
|
||||
--host 0.0.0.0 --port 8000 \
|
||||
--max-model-len 65536 \
|
||||
--kv-cache-dtype fp8 \
|
||||
--gpu-memory-utilization 0.87 \
|
||||
--max-num-seqs 1 \
|
||||
--max-num-batched-tokens 4096 \
|
||||
--limit-mm-per-prompt '{"image": 0, "video": 0}' \
|
||||
--speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
|
||||
--enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser qwen3
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Qwen3.8 27B Uncensored (preetpatel) NVFP4 on RTX 5090 / WSL.
|
||||
VLLM_ENV=${VLLM_ENV:-/home/dfj/vllm-env}
|
||||
MODELS=${MODELS:-/home/dfj/models}
|
||||
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
|
||||
unset FLASHINFER_JIT_VERBOSE
|
||||
unset FLASHINFER_JIT_DEBUG
|
||||
export VLLM_USE_FLASHINFER_SAMPLER=0
|
||||
exec "$VLLM_ENV/bin/vllm" serve "$MODELS/preetpatel/Qwen3.8-27B-Uncensored-NVFP4" \
|
||||
--served-model-name qwen3.8-uncensored \
|
||||
--host 0.0.0.0 \
|
||||
--port 8000 \
|
||||
--max-model-len 163840 \
|
||||
--kv-cache-dtype fp8 \
|
||||
--gpu-memory-utilization 0.87 \
|
||||
--max-num-seqs 8 \
|
||||
--max-num-batched-tokens 8192 \
|
||||
--limit-mm-per-prompt '{"image": 8, "video": 0}' \
|
||||
--mm-processor-kwargs '{"max_pixels": 2097152}' \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser qwen3_coder \
|
||||
--reasoning-parser qwen3
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
cd /home/dfj
|
||||
bash "$DIR/launch_agents_a1.sh" > /home/dfj/agents_a1.log 2>&1
|
||||
echo "EXIT=$?" >> /home/dfj/agents_a1.log
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
cd /home/dfj
|
||||
bash "$DIR/launch_fast_unsloth.sh" > /home/dfj/fast_unsloth.log 2>&1
|
||||
echo "EXIT=$?" >> /home/dfj/fast_unsloth.log
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
cd /home/dfj
|
||||
bash "$DIR/launch_qwen36_unc.sh" > /home/dfj/qwen36_unc.log 2>&1
|
||||
echo "EXIT=$?" >> /home/dfj/qwen36_unc.log
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
cd /home/dfj
|
||||
bash "$DIR/launch_inner.sh" > /home/dfj/uncensored.log 2>&1
|
||||
echo "EXIT=$?" >> /home/dfj/uncensored.log
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"video_processor_type": "Qwen3VLVideoProcessor"
|
||||
}
|
||||
Reference in new issue
Block a user