要在 RTX 3070 Ti 上部署一个本地聊天机器人,核心思路是:
用本地 GPU 跑大模型(LLM)+ 聊天界面(Web / API)。
| 模型规模 | 是否可行 | 说明 |
|---|---|---|
| 7B 模型 | ✅ 强烈推荐 | 8GB 显存最佳选择 |
| 13B 模型 | ⚠️ 勉强 | 需 4bit + 显存优化 |
| 30B+ | ❌ 不支持 | 显存不够 |
✅ 结论:
优点
curl -fsSL https://ollama.com/install.sh | shollama run llama3:8b或更小:
ollama run mistralhttp://localhost:11434docker run -d \
-p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
ghcr.io/open-webui/open-webui:main浏览器访问:
http://localhost:3000✅ 支持:
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
pip install -r requirements.txt放在:
models/python server.py --chat --gpu访问:
http://localhost:7860✅ 功能极强:
| 模型 | 推荐理由 |
|---|---|
| LLaMA 3 8B | 综合最强 |
| Mistral 7B | 快、稳 |
| Qwen2 7B | 中文超强 |
| ChatGLM3-6B | 中文友好 |
curl http://localhost:11434/api/chat \
-d '{
"model": "llama3",
"messages": [
{"role": "user", "content": "你好"}
]
}'可直接接:
✅ 解决:
--n-gpu-layers 过高✅ 用:
✅ 最佳组合(新手)
RTX 3070 Ti
+ Ollama
+ LLaMA 3 8B
+ Open WebUI✅ 开发者组合
RTX 3070 Ti
+ text-generation-webui
+ Qwen2 7B 4bit你可以直接告诉我:
我可以给你 一步一步命令级教程,甚至帮你选模型。