适合:个人、本地开发、快速体验
支持模型
llama3llama3:8bllama3:70b安装步骤(以 Ubuntu 为例)
curl -fsSL https://ollama.com/install.sh | sh启动并运行:
ollama run llama3✅ 优点:
适合:研究、微调、二次开发
环境要求
示例
pip install transformers acceleratefrom transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3-8B-Instruct",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")⚠️ 注意:
适合:
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make| 项目 | 最低 | 推荐 |
|---|---|---|
| 系统 | Ubuntu 20.04+ | Ubuntu 22.04 |
| CPU | x86_64 | 多核 |
| 内存 | 16GB | 32GB+ |
| GPU | 可选 | NVIDIA + CUDA |
| 磁盘 | 20GB+ | 100GB+ |
| 模型 | CPU | GPU |
|---|---|---|
| LLaMA 3 8B | ✅ 可跑(慢) | ✅ 推荐 |
| LLaMA 3 70B | ❌ 不现实 | ✅ 必须 |
✅ Ubuntu / Debian
✅ CentOS / Rocky / Alma
✅ Arch
你可以告诉我:
我可以直接给你 一条龙部署命令 或 Docker 方案。