Checklist / 检查清单
Question Description / 问题描述
#!/bin/bash
1. 显卡配置
export CUDA_VISIBLE_DEVICES=1
export VLLM_USE_MODELSCOPE=False
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
export export IMAGE_MAX_TOKEN_NUM=1024
2. 路径配置
BASE_PATH="/home/c/models/Qwen3-VL-4B-Instruct"
CHECKPOINT_PATH=
DATASET_PATH=
3. 公共采样参数 (专为 swift sample 适配)
COMMON_ARGS=(
--model "$BASE_PATH"
--adapters "$CHECKPOINT_PATH"
--sampler_engine vllm
--dataset "$DATASET_PATH"
--dtype float16
--torch_dtype float16
--engine_kwargs '{"gpu_memory_utilization": 0.85,"max_model_len": 4096, "enforce_eager": true}'
--max_new_tokens 2048
--top_p 0.95
--top_k 50
)
echo "============================================="
echo " 启动 vLLM 单卡引擎..."
echo "============================================="
echo "=> [GPU 2] 正在执行 T=0.4, N=8 ..."
swift sample "${COMMON_ARGS[@]}"
--temperature 0.4
--num_return_sequences 8
--output_file "sample_t0.4_n8.jsonl"
echo "=> [GPU 2] 正在执行 T=1.1, N=8 ..."
swift sample "${COMMON_ARGS[@]}"
--temperature 1.1
--num_return_sequences 8
--output_file "sample_t1.1_n8.jsonl"
echo " 任务全部完成!"
硬件V100,需要配置dtype: float16,但是ms-swift 的代码中,VllmEngine 类的 init 函数并没有把 dtype 这个参数开放出来接收,配置torch_type依旧失败,报错keyerro.请问当前条件下如果设置?
Checklist / 检查清单
Question Description / 问题描述
#!/bin/bash
1. 显卡配置
export CUDA_VISIBLE_DEVICES=1
export VLLM_USE_MODELSCOPE=False
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
export export IMAGE_MAX_TOKEN_NUM=1024
2. 路径配置
BASE_PATH="/home/c/models/Qwen3-VL-4B-Instruct"
CHECKPOINT_PATH=
DATASET_PATH=
3. 公共采样参数 (专为 swift sample 适配)
COMMON_ARGS=(
--model "$BASE_PATH"
--adapters "$CHECKPOINT_PATH"
--sampler_engine vllm
--dataset "$DATASET_PATH"
--dtype float16
--torch_dtype float16
--engine_kwargs '{"gpu_memory_utilization": 0.85,"max_model_len": 4096, "enforce_eager": true}'
--max_new_tokens 2048
--top_p 0.95
--top_k 50
)
echo "============================================="
echo " 启动 vLLM 单卡引擎..."
echo "============================================="
echo "=> [GPU 2] 正在执行 T=0.4, N=8 ..."
swift sample "${COMMON_ARGS[@]}"
--temperature 0.4
--num_return_sequences 8
--output_file "sample_t0.4_n8.jsonl"
echo "=> [GPU 2] 正在执行 T=1.1, N=8 ..."
swift sample "${COMMON_ARGS[@]}"
--temperature 1.1
--num_return_sequences 8
--output_file "sample_t1.1_n8.jsonl"
echo " 任务全部完成!"
硬件V100,需要配置dtype: float16,但是ms-swift 的代码中,VllmEngine 类的 init 函数并没有把 dtype 这个参数开放出来接收,配置torch_type依旧失败,报错keyerro.请问当前条件下如果设置?