档案库 · AI 与模型 · 技术决策 · 2023
alpaca.cpp 押注:ChatGPT 风格 LLM 能在 MacBook 上运行;获得 10k 星
antimatter15 的 alpaca.cpp 在 MacBook 上仅用 4 GB 权重运行了 ChatGPT 风格 LLM;2023 年 3 月 Show HN,获得 673 分、10.1k 星,后来合并进 llama.cpp。
alpaca.cpp (antimatter15)
做的是什么生意
alpaca.cpp is an open-source program that runs a ChatGPT-style instruction-tuned LLM locally on macOS, Linux or Windows from a 4 GB quantized model, built by combining LLaMA, an open reproduction of Stanford Alpaca, and a chat-enabled llama.cpp.
起因
On 2023-03-16, GitHub user antimatter15 posted alpaca.cpp to Hacker News as 'Show HN: Run an Instruction-Tuned Chat-Style LLM on a MacBook'. The project combined Facebook's LLaMA foundation model, an open reproduction of Stanford Alpaca's instruction tuning, and modifications to Georgi Gerganov's llama.cpp that added a chat interface; the headline demo ran on an M2 MacBook Air with 4 GB of weights.
经过
The Show HN drew 673 points and 283 comments. The README positioned alpaca.cpp as a fast local alternative to ChatGPT-style APIs and shipped zips for macOS, Linux and Windows, while crediting the open chain behind it — LLaMA weights, alpaca-lora fine-tunes and llama.cpp's quantization. It also carried a research-only disclaimer: the weights were derivative of LLaMA, and Stanford Alpaca's instruction data had been generated by OpenAI, whose terms disallowed using its outputs to train competing models.
结果
The standalone project was superseded: the README says the alpaca.cpp changes 'have since been upstreamed in llama.cpp' and directs users to llama.cpp instead. As of the 2026-09-05 fetch the repository remains public with 10.1k stars and 843 forks as a record of the demo.
背景
alpaca.cpp 是 GitHub 用户 antimatter15 于 2023 年 3 月进行的实验,在笔记本电脑上完全运行了 ChatGPT 风格的指令微调 LLM:LLaMA 基础权重、Stanford Alpaca 微调的开源复现,以及基于 llama.cpp 的聊天界面。演示是在 M2 MacBook Air 上使用 4 GB 权重的未加速录屏,Show HN 于 2023 年 3 月 16 日获得 673 分和 283 条评论。
赌注在于本地推理很重要——用户希望模型在自己的机器上运行,无需 GPU、API 密钥或云,并且量化加 C++ 运行时可以让 7B 级别的模型在此可用。仓库为 macOS、Linux 和 Windows 提供了 zip,包含一键运行的聊天可执行文件,致谢了开源链条(LLaMA、alpaca-lora、llama.cpp),并警告权重是 LLaMA 和 OpenAI 生成的指令数据的衍生品,仅限研究使用。
独立项目并未成为该想法的长期归宿:其改动被上游合并到 llama.cpp,README 现在明确说明“请改用 llama.cpp”。截至 2026 年 9 月 5 日抓取,仓库仍公开,拥有 10.1k 星和 843 个 fork,是本地聊天 LLM 从不可能变为显然那一刻的记录。
这件事要成立,得有什么
- 时机:它在 Stanford Alpaca 开放指令微调后几天出现,当时对 ChatGPT 类似模型的需求巨大,但一切仍在云端运行。
- 技术捷径正确:4 位量化和 llama.cpp 的 C++ 运行时使 7B 聊天模型能在消费级笔记本上以 4 GB 运行。
- 因为是 llama.cpp 的分支,改进流回了平台——这就是为什么演示的影响超越了演示本身。
- HN 受众正是想本地运行模型的人,因此发布后几小时内就获得 673 分和 283 条评论。
可借鉴之处
一个尖锐的演示可以在平台之前证明一个品类:alpaca.cpp 在 2023 年 3 月展示了本地聊天 LLM 是真实的,但持久胜利属于 llama.cpp,它吸收了其改动。
后续进展
截至 2026 年 9 月 5 日,alpaca.cpp 仓库仍公开,位于 antimatter15 名下,拥有 10.1k 星和 843 个 fork,其 README 首先建议改用 llama.cpp,并指出改动已上游合并。项目作为独立分支实际上已经结束,被保留为它帮助展示的早期本地 LLM 时刻的产物。
资料来源
发现哪里写错了?告诉我们。
轮到你了
你刚读完一家。说说你在做什么,看看谁在赌同一件事。
免费账号 · 3 次免费提问 · 不用绑卡