llama.cpp
纯 C/C++ 的 LLM 推理引擎,CPU 优先、零依赖
Georgi Gerganov 开发的 LLM 推理引擎,纯 C/C++ 实现、零依赖,CPU 推理是核心场景。提供两个主要可执行文件:llama-cli 用于命令行对话,llama-server 启动 OpenAI 兼容 REST API 与内置 WebUI。模型统一使用 GGUF 格式,支持 1.5-bit 到 8-bit 量化以降低内存占用。后端覆盖 CPU(AVX/NEON/RVV)、GPU(CUDA/Metal/Vulkan/ROCm)及 CPU+GPU 混合推理。Ollama、LM Studio、GPT4All 等本地推理工具均在其引擎上构建。ggml-org 团队于 2026 年 2 月加入 HuggingFace。
社区实测
本地推理快、底层能力强,但用户体验差;Ollama 填补了易用性空白
- 本地 LLM 推理速度比 Ollama 更快(来源 4)
- 现已内置 GUI,降低入门门槛(来源 3)
- llama serve 可一键启动服务(来源 4)
- 整体用户体验差,对新手不友好(来源 1、3、4)
- 参数调优复杂,需大量试错甚至自动化脚本(来源 4)
- 附带大量工具,学习成本高(来源 2)
- llama serve 看似简单,实际使用仍有坑(来源 4)
No mention of the fact that Ollama is about 1000x easier to use. Llama.cpp is a ... | Hacker Newsllama.cpp is all you need : r/LocalLLaMAThe local LLM ecosystem doesn't need Ollama | Hacker NewsI've read all the stuff about how llama.cpp is much faster and better than ollam... | Hacker News
截至 2026-07-15
brew install llama.cpp winget install llama.cpp curl -LsSf https://llama.app/install.sh | sh docker run -v /path/to/models:/models -p 8080:8080 ghcr.io/ggml-org/llama.cpp:server -m /models/model.gguf --port 8080 --host 0.0.0.0