RTX4090部署Qwen3.5-9B模型
1.服务器基础信息
- Centos7.8 / 3.10.0-1127.el7.x86_64 / Driver Version: 550.127.08 / CUDA Version: 12.4
- RTX 4090 * 2 / 显存 24G * 2
- 准备部署模型 Qwen3.5-9B
- 部署方式vllm容器加载启动,vllm 0.20.1
2.需要升级的内容
- 由于vllm版本较新以及qwen3.5的架构也比较新,所以需要升级系统内核、nvidia驱动、cuda版本(升级驱动后,cuda版本自动升级)
2.1 离线升级内核版本到5.4
- 参考下列文档
https://www.cnblogs.com/Leonardo-li/p/18672492
2.2 设置内核启动顺序
一、先确认你机器上 GRUB 实际在哪
1️⃣ BIOS(传统启动)机器
ls -l /boot/grub2/grub.cfg
如果存在,直接用这个路径:
awk -F\' '$1=="menuentry " {print i++" : "$2}' /boot/grub2/grub.cfg
2️⃣ UEFI 机器(云服务器/新物理机常见)
ls /boot/efi/EFI/centos/grub.cfg
如果存在,用这个:
awk -F\' '$1=="menuentry " {print i++" : "$2}' /boot/efi/EFI/centos/grub.cfg
二、快速判断你是 BIOS 还是 UEFI
ls /sys/firmware/efi && echo "UEFI" || echo "BIOS"
三、不管哪种,设置 5.4 为默认启动(推荐用 grubby)
别再纠结 grub.cfg 路径了,grubby 最稳:
# 看已安装内核
grubby --info=ALL | grep -E "kernel|index"
找到 5.4 那一项的 index,比如 index=0:
# 设为默认
grubby --set-default=/boot/vmlinuz-5.4.278-1.el7.elrepo.x86_64
验证:
grubby --default-kernel
# 应输出 5.4 的路径
四、重新生成 GRUB 配置(保险起见)
BIOS:
grub2-mkconfig -o /boot/grub2/grub.cfg
UEFI:
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
3.升级gcc,并设置gcc环境
# 0. 装 SCL 源和 gcc 9
yum install -y centos-release-scl-rh
# 1. 把 SCL 源的地址改成阿里云(一行替换,已验证可用)
sed -i \
-e 's|^mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh|#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7\&repo=sclo-rh|' \
-e 's|^#baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/|baseurl=https://mirrors.aliyun.com/centos/7/sclo/$basearch/rh/|' \
/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# 2. 确认改对了:应该看到 baseurl 是 aliyun、mirrorlist 被注释掉
grep -E 'baseurl|mirrorlist' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo | head -4
# 3. 清缓存重建
yum clean all && yum makecache
# 4. 重新安装 gcc 9
yum install -y devtoolset-9-gcc
# 5.切换gcc环境
scl enable devtoolset-9 bash
gcc --version # 确认 9.3.1
4.nvidia驱动下载安装
4.1 驱动下载地址,选择对应的驱动,这边选择580.196.07,对应cuda13.0
https://www.nvidia.cn/geforce/drivers/results/

4.2 驱动安装
# 1.查看内目录,如果没有需要安装kernels-devel这个包,如果有多个内核目录需要和当前系统使用内核保持一致 uname -r
ls /usr/src/kernels/5.4.278-1.el7.elrepo.x86_64/
# 2.安装驱动
./NVIDIA-Linux-x86_64-580.196.07.run --kernel-source-path=/usr/src/kernels/5.4.278-1.el7.elrepo.x86_64/ -k $(uname -r)
# 安装步骤忽略
4.3 最终环境

5.vllm镜像下载
# 当前最新的镜像,tag是latest
docker pull vllm/vllm-openai:v0.20.1
6.qwen3.5-9b模型下载
#!/bin/bash
docker run --rm -it \
--entrypoint /bin/bash \
--pids-limit -1 \
--security-opt seccomp=unconfined \
-v /data/qwen/qwen35_9b:/models \
-e OMP_NUM_THREADS=8 \
vllm/vllm-openai:latest \
-c "pip install modelscope && python3 -c \"from modelscope import snapshot_download; snapshot_download('Qwen/Qwen3.5-9B', cache_dir='/models')\""
7.模型部署命令docker compose管理
version: '3.8'
services:
vllm-qwen:
image: vllm/vllm-openai:v0.20.1
container_name: vllm-qwen35-9b
privileged: true
volumes:
- /data/qwen/qwen35_9b:/models
ports:
- "23333:8000"
environment:
- NVIDIA_VISIBLE_DEVICES=0,1
- CUDA_VISIBLE_DEVICES=0,1
- VLLM_TARGET_DEVICE=cuda
- NCCL_P2P_DISABLE=1
shm_size: 16gb
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 2
capabilities: [gpu]
command:
- --model
- /models/Qwen/Qwen3___5-9B
- --host
- 0.0.0.0
- --port
- "8000"
- --served-model-name
- qwen3.5-9b
- --dtype
- bfloat16
- --max-model-len
- "8192"
- --tensor-parallel-size
- "2"
- --gpu-memory-utilization
- "0.90"
- --max-num-seqs
- "128"
- --enable-prefix-caching
- --trust-remote-code
- --default-chat-template-kwargs
- '{"enable_thinking": false}'
restart: unless-stopped
启动日志
WARNING 11-18 09:23:08 [argparse_utils.py:257] With `vllm serve`, you should provide the model as a positional argument or in a config file instead of via the `--model` option. The `--model` option will be removed in a future version.
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299]
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299] █ █ █▄ ▄█
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299] ▄▄ ▄█ █ █ █ ▀▄▀ █ version 0.20.1
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299] █▄█▀ █ █ █ █ model /models/Qwen/Qwen3___5-9B
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299] ▀▀ ▀▀▀▀▀ ▀▀▀▀▀ ▀ ▀
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:299]
(APIServer pid=1) INFO 11-18 09:23:08 [utils.py:233] non-default args: {'model_tag': '/models/Qwen/Qwen3___5-9B', 'default_chat_template_kwargs': {'enable_thinking': False}, 'host': '0.0.0.0', 'model': '/models/Qwen/Qwen3___5-9B', 'trust_remote_code': True, 'dtype': 'bfloat16', 'max_model_len': 8192, 'served_model_name': ['qwen3.5-9b'], 'tensor_parallel_size': 2, 'gpu_memory_utilization': 0.9, 'enable_prefix_caching': True, 'max_num_seqs': 128}
(APIServer pid=1) INFO 11-18 09:23:26 [nixl_utils.py:20] Setting UCX_RCACHE_MAX_UNRELEASED to '1024' to avoid a rare memory leak in UCX when using NIXL.
(APIServer pid=1) INFO 11-18 09:23:26 [nixl_utils.py:32] NIXL is available
(APIServer pid=1) INFO 11-18 09:23:26 [model.py:555] Resolved architecture: Qwen3_5ForConditionalGeneration
(APIServer pid=1) INFO 11-18 09:23:26 [model.py:1680] Using max model len 8192
(APIServer pid=1) WARNING 11-18 09:23:26 [config.py:367] Mamba cache mode is set to 'align' for Qwen3_5ForConditionalGeneration by default when prefix caching is enabled
(APIServer pid=1) INFO 11-18 09:23:26 [config.py:387] Warning: Prefix caching in Mamba cache 'align' mode is currently enabled. Its support for Mamba layers is experimental. Please report any issues you may observe.
(APIServer pid=1) INFO 11-18 09:23:26 [vllm.py:840] Asynchronous scheduling is enabled.
(APIServer pid=1) INFO 11-18 09:23:26 [kernel.py:205] Final IR op priority after setting platform defaults: IrOpPriorityConfig(rms_norm=['native'])
(APIServer pid=1) [transformers] `Qwen2VLImageProcessorFast` is deprecated. The `Fast` suffix for image processors has been removed; use `Qwen2VLImageProcessor` instead.
(APIServer pid=1) [transformers] The `use_fast` parameter is deprecated and will be removed in a future version. Use `backend="torchvision"` instead of `use_fast=True`, or `backend="pil"` instead of `use_fast=False`.
(EngineCore pid=249) INFO 11-18 09:23:41 [core.py:109] Initializing a V1 LLM engine (v0.20.1) with config: model='/models/Qwen/Qwen3___5-9B', speculative_config=None, tokenizer='/models/Qwen/Qwen3___5-9B', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=2, pipeline_parallel_size=1, data_parallel_size=1, decode_context_parallel_size=1, dcp_comm_backend=ag_rs, disable_custom_all_reduce=False, quantization=None, quantization_config=None, enforce_eager=False, enable_return_routed_experts=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='', reasoning_parser_plugin='', enable_in_reasoning=False), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, kv_cache_metrics=False, kv_cache_metrics_sample=0.01, cudagraph_metrics=False, enable_layerwise_nvtx_tracing=False, enable_mfu_metrics=False, enable_mm_processor_stats=False, enable_logging_iteration_details=False), seed=0, served_model_name=qwen3.5-9b, enable_prefix_caching=True, enable_chunked_prefill=True, pooler_config=None, compilation_config={'mode': <CompilationMode.VLLM_COMPILE: 3>, 'debug_dump_path': None, 'cache_dir': '', 'compile_cache_save_format': 'binary', 'backend': 'inductor', 'custom_ops': ['none'], 'ir_enable_torch_wrap': True, 'splitting_ops': ['vllm::unified_attention_with_output', 'vllm::unified_mla_attention_with_output', 'vllm::mamba_mixer2', 'vllm::mamba_mixer', 'vllm::short_conv', 'vllm::linear_attention', 'vllm::plamo2_mamba_mixer', 'vllm::gdn_attention_core', 'vllm::gdn_attention_core_xpu', 'vllm::olmo_hybrid_gdn_full_forward', 'vllm::kda_attention', 'vllm::sparse_attn_indexer', 'vllm::rocm_aiter_sparse_attn_indexer', 'vllm::deepseek_v4_attention', 'vllm::unified_kv_cache_update', 'vllm::unified_mla_kv_cache_update'], 'compile_mm_encoder': False, 'cudagraph_mm_encoder': False, 'encoder_cudagraph_token_budgets': [], 'encoder_cudagraph_max_vision_items_per_batch': 0, 'encoder_cudagraph_max_frames_per_batch': None, 'compile_sizes': [], 'compile_ranges_endpoints': [2048], 'inductor_compile_config': {'enable_auto_functionalized_v2': False, 'size_asserts': False, 'alignment_asserts': False, 'scalar_asserts': False, 'combo_kernels': True, 'benchmark_combo_kernel': True}, 'inductor_passes': {}, 'cudagraph_mode': <CUDAGraphMode.FULL_AND_PIECEWISE: (2, 1)>, 'cudagraph_num_of_warmups': 1, 'cudagraph_capture_sizes': [1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256], 'cudagraph_copy_inputs': False, 'cudagraph_specialize_lora': True, 'use_inductor_graph_partition': False, 'pass_config': {'fuse_norm_quant': False, 'fuse_act_quant': False, 'fuse_attn_quant': False, 'enable_sp': False, 'fuse_gemm_comms': False, 'fuse_allreduce_rms': False}, 'max_cudagraph_capture_size': 256, 'dynamic_shapes_config': {'type': <DynamicShapesType.BACKED: 'backed'>, 'evaluate_guards': False, 'assume_32_bit_indexing': False}, 'local_cache_dir': None, 'fast_moe_cold_start': False, 'static_all_moe_layers': []}, kernel_config=KernelConfig(ir_op_priority=IrOpPriorityConfig(rms_norm=['native']), enable_flashinfer_autotune=True, moe_backend='auto')
(EngineCore pid=249) WARNING 11-18 09:23:41 [multiproc_executor.py:1029] Reducing Torch parallelism from 28 threads to 1 to avoid unnecessary CPU contention. Set OMP_NUM_THREADS in the external environment to tune this value as needed.
(EngineCore pid=249) INFO 11-18 09:23:41 [multiproc_executor.py:139] DP group leader: node_rank=0, node_rank_within_dp=0, master_addr=127.0.0.1, mq_connect_ip=100.101.0.2 (local), world_size=2, local_world_size=2
INFO 11-18 09:23:48 [nixl_utils.py:32] NIXL is available
INFO 11-18 09:23:48 [nixl_utils.py:32] NIXL is available
[transformers] `Qwen2VLImageProcessorFast` is deprecated. The `Fast` suffix for image processors has been removed; use `Qwen2VLImageProcessor` instead.
[transformers] `Qwen2VLImageProcessorFast` is deprecated. The `Fast` suffix for image processors has been removed; use `Qwen2VLImageProcessor` instead.
(Worker pid=368) INFO 11-18 09:23:50 [parallel_state.py:1402] world_size=2 rank=0 local_rank=0 distributed_init_method=tcp://127.0.0.1:45119 backend=nccl
(Worker pid=369) INFO 11-18 09:23:50 [parallel_state.py:1402] world_size=2 rank=1 local_rank=1 distributed_init_method=tcp://127.0.0.1:45119 backend=nccl
(Worker pid=368) INFO 11-18 09:23:54 [pynccl.py:111] vLLM is using nccl==2.28.9
(Worker pid=368) WARNING 11-18 09:23:55 [symm_mem.py:66] SymmMemCommunicator: Device capability 8.9 not supported, communicator is not available.
(Worker pid=369) WARNING 11-18 09:23:55 [symm_mem.py:66] SymmMemCommunicator: Device capability 8.9 not supported, communicator is not available.
(Worker pid=368) WARNING 11-18 09:23:55 [custom_all_reduce.py:164] Custom allreduce is disabled because your platform lacks GPU P2P capability or P2P test failed. To silence this warning, specify disable_custom_all_reduce=True explicitly.
(Worker pid=369) WARNING 11-18 09:23:55 [custom_all_reduce.py:164] Custom allreduce is disabled because your platform lacks GPU P2P capability or P2P test failed. To silence this warning, specify disable_custom_all_reduce=True explicitly.
(Worker pid=368) INFO 11-18 09:23:55 [parallel_state.py:1715] rank 0 in world size 2 is assigned as DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank N/A, EPLB rank N/A
(Worker pid=369) [transformers] The `use_fast` parameter is deprecated and will be removed in a future version. Use `backend="torchvision"` instead of `use_fast=True`, or `backend="pil"` instead of `use_fast=False`.
(Worker pid=368) [transformers] The `use_fast` parameter is deprecated and will be removed in a future version. Use `backend="torchvision"` instead of `use_fast=True`, or `backend="pil"` instead of `use_fast=False`.
(Worker_TP0 pid=368) INFO 11-18 09:24:03 [gpu_model_runner.py:4777] Starting to load model /models/Qwen/Qwen3___5-9B...
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [cuda.py:423] Using backend AttentionBackendEnum.FLASH_ATTN for vit attention
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [mm_encoder_attention.py:230] Using AttentionBackendEnum.FLASH_ATTN for MMEncoderAttention.
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [gdn_linear_attn.py:153] Using Triton/FLA GDN prefill kernel
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [cuda.py:368] Using FLASH_ATTN attention backend out of potential backends: ['FLASH_ATTN', 'FLASHINFER', 'TRITON_ATTN', 'FLEX_ATTENTION'].
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [flash_attn.py:646] Using FlashAttention version 2
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [weight_utils.py:904] Filesystem type for checkpoints: EXT4. Checkpoint size: 17.98 GiB. Available RAM: 55.13 GiB.
(Worker_TP0 pid=368) INFO 11-18 09:24:04 [weight_utils.py:927] Auto-prefetch is disabled because the filesystem (EXT4) is not a recognized network FS (NFS/Lustre). If you want to force prefetching, start vLLM with --safetensors-load-strategy=prefetch.
Loading safetensors checkpoint shards: 0% Completed | 0/4 [00:00<?, ?it/s]
Loading safetensors checkpoint shards: 25% Completed | 1/4 [00:00<00:01, 1.80it/s]
Loading safetensors checkpoint shards: 50% Completed | 2/4 [00:01<00:01, 1.53it/s]
Loading safetensors checkpoint shards: 75% Completed | 3/4 [00:01<00:00, 1.50it/s]
Loading safetensors checkpoint shards: 100% Completed | 4/4 [00:02<00:00, 1.65it/s]
Loading safetensors checkpoint shards: 100% Completed | 4/4 [00:02<00:00, 1.62it/s]
(Worker_TP0 pid=368)
(Worker_TP0 pid=368) INFO 11-18 09:24:07 [default_loader.py:384] Loading weights took 2.53 seconds
(Worker_TP1 pid=369) INFO 11-18 09:24:07 [interface.py:606] Setting attention block size to 528 tokens to ensure that attention page size is >= mamba page size.
(Worker_TP1 pid=369) INFO 11-18 09:24:07 [interface.py:630] Padding mamba page size by 0.76% to ensure that mamba page size and attention page size are exactly equal.
(Worker_TP0 pid=368) INFO 11-18 09:24:07 [gpu_model_runner.py:4879] Model loading took 8.91 GiB memory and 3.799964 seconds
(Worker_TP0 pid=368) INFO 11-18 09:24:07 [interface.py:606] Setting attention block size to 528 tokens to ensure that attention page size is >= mamba page size.
(Worker_TP0 pid=368) INFO 11-18 09:24:07 [interface.py:630] Padding mamba page size by 0.76% to ensure that mamba page size and attention page size are exactly equal.
(Worker_TP0 pid=368) INFO 11-18 09:24:08 [gpu_model_runner.py:5820] Encoder cache will be initialized with a budget of 16384 tokens, and profiled with 1 image items of the maximum feature size.
(Worker_TP0 pid=368) INFO 11-18 09:24:23 [backends.py:1069] Using cache directory: /root/.cache/vllm/torch_compile_cache/5a5ae098af/rank_0_0/backbone for vLLM's torch.compile
(Worker_TP0 pid=368) INFO 11-18 09:24:23 [backends.py:1128] Dynamo bytecode transform time: 9.59 s
(Worker_TP0 pid=368) INFO 11-18 09:24:27 [backends.py:376] Cache the graph of compile range (1, 2048) for later use
(Worker_TP0 pid=368) INFO 11-18 09:24:53 [backends.py:391] Compiling a graph for compile range (1, 2048) takes 29.23 s
(Worker_TP0 pid=368) INFO 11-18 09:24:58 [decorators.py:668] saved AOT compiled function to /root/.cache/vllm/torch_compile_cache/torch_aot_compile/df41a358d296222f081be218231d924e0bdc4aabf2303a66a2ab5ebf967e817e/rank_0_0/model
(Worker_TP0 pid=368) INFO 11-18 09:24:58 [monitor.py:53] torch.compile took 44.32 s in total
(EngineCore pid=249) INFO 11-18 09:25:08 [shm_broadcast.py:681] No available shared memory broadcast block found in 60 seconds. This typically happens when some processes are hanging or doing some time-consuming work (e.g. compilation, weight/kv cache quantization).
(EngineCore pid=249) INFO 11-18 09:26:09 [shm_broadcast.py:681] No available shared memory broadcast block found in 60 seconds. This typically happens when some processes are hanging or doing some time-consuming work (e.g. compilation, weight/kv cache quantization).
(Worker_TP0 pid=368) INFO 11-18 09:26:18 [monitor.py:81] Initial profiling/warmup run took 80.12 s
(Worker_TP0 pid=368) INFO 11-18 09:26:27 [gpu_model_runner.py:5963] Profiling CUDA graph memory: PIECEWISE=35 (largest=256), FULL=19 (largest=128)
(Worker_TP1 pid=369) INFO 11-18 09:26:27 [gpu_model_runner.py:5963] Profiling CUDA graph memory: PIECEWISE=35 (largest=256), FULL=19 (largest=128)
(Worker_TP1 pid=369) INFO 11-18 09:26:30 [gpu_model_runner.py:6042] Estimated CUDA graph memory: 0.82 GiB total
(Worker_TP0 pid=368) INFO 11-18 09:26:30 [gpu_model_runner.py:6042] Estimated CUDA graph memory: 0.82 GiB total
(Worker_TP1 pid=369) INFO 11-18 09:26:31 [gpu_worker.py:455] CUDA graph memory profiling is enabled (default since v0.21.0). The current --gpu-memory-utilization=0.9000 is equivalent to --gpu-memory-utilization=0.8650 without CUDA graph memory profiling. To maintain the same effective KV cache size as before, increase --gpu-memory-utilization to 0.9350. To disable, set VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS=0.
(Worker_TP0 pid=368) INFO 11-18 09:26:31 [gpu_worker.py:440] Available KV cache memory: 9.88 GiB
(Worker_TP0 pid=368) INFO 11-18 09:26:31 [gpu_worker.py:455] CUDA graph memory profiling is enabled (default since v0.21.0). The current --gpu-memory-utilization=0.9000 is equivalent to --gpu-memory-utilization=0.8650 without CUDA graph memory profiling. To maintain the same effective KV cache size as before, increase --gpu-memory-utilization to 0.9350. To disable, set VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS=0.
(EngineCore pid=249) INFO 11-18 09:26:31 [kv_cache_utils.py:1708] GPU KV cache size: 456,517 tokens
(EngineCore pid=249) INFO 11-18 09:26:31 [kv_cache_utils.py:1709] Maximum concurrency for 8,192 tokens per request: 55.73x
Capturing CUDA graphs (mixed prefill-decode, PIECEWISE): 100%|██████████| 35/35 [00:01<00:00, 17.56it/s]
Capturing CUDA graphs (decode, FULL): 100%|██████████| 19/19 [00:01<00:00, 12.06it/s]
(Worker_TP1 pid=369) INFO 11-18 09:26:35 [gpu_worker.py:599] CUDA graph pool memory: 0.75 GiB (actual), 0.82 GiB (estimated), difference: 0.07 GiB (9.4%).
(Worker_TP0 pid=368) INFO 11-18 09:26:35 [gpu_model_runner.py:6133] Graph capturing finished in 4 secs, took 0.75 GiB
(Worker_TP0 pid=368) INFO 11-18 09:26:35 [gpu_worker.py:599] CUDA graph pool memory: 0.75 GiB (actual), 0.82 GiB (estimated), difference: 0.07 GiB (9.4%).
(EngineCore pid=249) INFO 11-18 09:26:35 [core.py:299] init engine (profile, create kv cache, warmup model) took 147.74 s (compilation: 44.32 s)
(EngineCore pid=249) INFO 11-18 09:26:37 [nixl_utils.py:32] NIXL is available
(EngineCore pid=249) [transformers] `Qwen2VLImageProcessorFast` is deprecated. The `Fast` suffix for image processors has been removed; use `Qwen2VLImageProcessor` instead.
(EngineCore pid=249) [transformers] The `use_fast` parameter is deprecated and will be removed in a future version. Use `backend="torchvision"` instead of `use_fast=True`, or `backend="pil"` instead of `use_fast=False`.
(EngineCore pid=249) INFO 11-18 09:26:43 [vllm.py:840] Asynchronous scheduling is enabled.
(EngineCore pid=249) INFO 11-18 09:26:43 [kernel.py:205] Final IR op priority after setting platform defaults: IrOpPriorityConfig(rms_norm=['native'])
(APIServer pid=1) INFO 11-18 09:26:43 [api_server.py:598] Supported tasks: ['generate']
(APIServer pid=1) INFO 11-18 09:26:44 [hf.py:314] Detected the chat template content format to be 'string'. You can set `--chat-template-content-format` to override this.
(APIServer pid=1) INFO 11-18 09:26:50 [base.py:233] Multi-modal warmup completed in 5.817s
(APIServer pid=1) INFO 11-18 09:26:55 [base.py:233] Readonly multi-modal warmup completed in 5.119s
(APIServer pid=1) INFO 11-18 09:26:56 [api_server.py:602] Starting vLLM server on http://0.0.0.0:8000
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:37] Available routes are:
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /openapi.json, Methods: HEAD, GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /docs, Methods: HEAD, GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /docs/oauth2-redirect, Methods: HEAD, GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /redoc, Methods: HEAD, GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /tokenize, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /detokenize, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /load, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /version, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /health, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /metrics, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/models, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /ping, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /ping, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /invocations, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/chat/completions, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/chat/completions/batch, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/responses, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/responses/{response_id}, Methods: GET
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/responses/{response_id}/cancel, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/completions, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/messages, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/messages/count_tokens, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /inference/v1/generate, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /scale_elastic_ep, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /is_scaling_elastic_ep, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /generative_scoring, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/chat/completions/render, Methods: POST
(APIServer pid=1) INFO 11-18 09:26:56 [launcher.py:46] Route: /v1/completions/render, Methods: POST
(APIServer pid=1) INFO: Started server process [1]
(APIServer pid=1) INFO: Waiting for application startup.
(APIServer pid=1) INFO: Application startup complete.
8.模型测试
- 单请求大概100 token/s,QPS平均在 25左右
curl -s http://127.0.0.1:23333/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"qwen3.5-9b","messages":[{"role":"user","content":"介绍下自己"}]}'

至此qwen3.5-9b大模型就部署完成了,其实部署比较简单,主要是基础环境配置稍微复杂一点,另外就是vllm的版本与nvidia驱动,cuda版本都有关联,太旧的驱动和cuda是不行的!!!

浙公网安备 33010602011771号