1
0

更新 202510_RTX4090笔电操作记录.md

This commit is contained in:
8ga 2025-10-17 16:36:45 +08:00
parent c42e1509f5
commit 37c6857458

View File

@ -32,24 +32,14 @@ pip install vllm -i http://mirrors.cloud.tencent.com/pypi/simple --extra-index-u
# 安装 modelscope # 安装 modelscope
pip install modelscope -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com pip install modelscope -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 拉取 gpt-oss-20b 模型 # 拉取 gpt-oss-20b 模型,由于显存不足,运行失败了
modelscope download --model openai-mirror/gpt-oss-20b --local_dir /home/ss/vllm-py12/gpt-oss-20b modelscope download --model openai-mirror/gpt-oss-20b --local_dir /home/ss/vllm-py12/gpt-oss-20b
# 运行 gpt-oss-20b 模型失败,移动端的 RTX4090 只有 16GB 显存,至少需要 16~24GB 显存 # 下载了 Qwen3-0.6B
vllm serve \
/home/ss/vllm-py12/gpt-oss-20b \
--port 18777 \
--api-key token_lcfc \
--served-model-name gpt-oss-20b \
--gpu-memory-utilization 0.95 \
--tool-call-parser openai \
--enable-auto-tool-choice
# Qwen3-8b 也需要 16~24GB显存所以下载了 Qwen3-0.6B
modelscope download --model Qwen/Qwen3-0.6B --local_dir /home/ss/vllm-py12/qwen3-06b modelscope download --model Qwen/Qwen3-0.6B --local_dir /home/ss/vllm-py12/qwen3-06b
# 运行 Qwen3-8b # 运行 Qwen3-0.6B
vllm serve /home/ss/vllm-py12/qwen3-06b \ nohup vllm serve /home/ss/vllm-py12/qwen3-06b \
--host 0.0.0.0 \ --host 0.0.0.0 \
--port 8000 \ --port 8000 \
--served-model-name Qwen3-0.6B \ --served-model-name Qwen3-0.6B \
@ -57,5 +47,14 @@ vllm serve /home/ss/vllm-py12/qwen3-06b \
--dtype auto \ --dtype auto \
--gpu-memory-utilization 0.9 \ --gpu-memory-utilization 0.9 \
--max-model-len 32768 \ --max-model-len 32768 \
--trust-remote-code --trust-remote-code \
>> /home/ss/vllm-py12/vllm.log 2>&1 \
& echo $! > /home/ss/vllm-py12/vllm.pid
# 安装了抓包工具 tshark 和 ngrep
sudo apt install ngrep
sudo apt-get install tshark
# 运行了1个定时任务脚本
``` ```