llama.cpp v1.0.0:为本地 AI 生态系统奠定更坚实的基础
原题llama.cpp v1.0.0 : A stronger foundation for the local AI ecosystem
读前速览
llama.cpp 和 ggml 发布 v1.0.0,为开源本地 AI 推理库生态系统确立稳定的 API,并拓展分发渠道。
v1.0.0 通过语义化版本控制确立稳定的 API/ABI 兼容性边界
./include 中的 C API 如有破坏性变更,则提升 MAJOR 版本;增加向后兼容的功能,则提升 MINOR 版本;修复错误,则提升 PATCH 版本,帮助下游开发者管理兼容性。
通过 8+ 种打包渠道扩大分发范围
预发布构建、Docker、Debian、Homebrew、conda-forge、MacPorts、Winget 和 XCFramework 支持在 Linux、macOS、Windows、Android 和 iOS 平台上部署。
通过 ggml 后端广泛支持各类硬件和模型
动态 ggml 后端支持 NVIDIA、AMD、Qualcomm、Arm、IBM 和 Intel 硬件,并涵盖 150+ 种模型架构及各类推测解码方法。
社区驱动开发,并配备专业的 CI 基础设施
开源社区的贡献通过 Hugging Face Buckets 和 Jobs 进行验证,并利用覆盖主要硬件平台的自托管运行器确保代码质量。
完整摘要
llama.cpp v1.0.0 是这款开源库的重要里程碑。它通过量化和优化后的后端,让多模态 LLM 能在各种硬件上运行。此次发布引入语义化版本规则,明确划分 MAJOR/MINOR/PATCH 版本及其 API/ABI 兼容性边界。分发渠道也有所扩展,涵盖预发布构建、Docker、Debian、Homebrew、conda-forge、MacPorts、Winget 和 XCFramework,支持 Linux、macOS、Windows、Android 和 iOS。该项目支持 150+ 种模型架构和所有主流推测解码方法,并为 NVIDIA、AMD、Qualcomm、Arm、IBM 和 Intel 硬件提供后端。CI 基础设施借助 Hugging Face Buckets 和 Jobs 搭建,长期维护者也为项目贡献力量。
目录 · 7 节
自项目创立以来的 3.5 年间,它发展迅速,许多下游应用已经依赖我们的工作。随着本地 AI 和隐私在日常生活中变得越来越重要,我们预计这一趋势将持续下去。每增加一项集成,就意味着有更多开发者依赖我们的库接口,因此,拥有灵活而稳定的 API 至关重要。During the 3.5 years since its inception, the project has grown a lot and many downstream applications already depend on our work. We expect this trend to continue as local AI and privacy become increasingly important in our everyday lives. Every new integration means more developers depending on our library interfaces and therefore having a flexible but stable API is paramount.
今天,我们发布 libraries v1.0.0,彰显我们对这些开发者所肩负的责任。今后,llama.cpp 和 ggml 的 API 与 ABI 不兼容变更都将通过提升主版本号来体现。随着采用范围不断扩大,我们也会更加严格地向下游使用者明确标示这些边界。Today we release libraries v1.0.0, highlighting our responsibility to those developers. Moving forward, both llama.cpp and ggml will reflect API and ABI incompatibilities with major-version bumps. As adoption grows, we will be stricter about making those boundaries visible to downstream consumers.
版本发布 Releases
| Release | Library | Public header(s) |
|---|---|---|
| llama.cpp v1.0.0 - LLM inference in C/C++ | libllama |
llama.cpp/include/ |
| ggml v1.0.0 - Tensor library for machine learning | libggml |
ggml/include/ |
语义化版本更新规则 Semantic version update rules
以下规则适用于所有采用语义化版本控制的 ggml-org 项目:The following rules apply to all ggml-org projects using semantic versioning:
| Change type | Bump |
|---|---|
| MAJOR | Breaking change to the public C API in ./include |
| MINOR | Backward-compatible feature, backend updates, model support, or API addition |
| PATCH | Bug fix with no API change |
分布 Distribution
我们期待拓展 ggml-org 软件的分发方式,让更多开发者和终端用户能够获取这些软件。有关如何将 ggml-org 项目纳入你的打包和发布流程,详情请参阅以下讨论。We are looking forward to expanding the ways in which ggml-org software is distributed and reaches developers and end-users. For more information about how to add ggml-org projects to your packaging and release pipelines, please check the following discussion.
| Channel | Platforms |
|---|---|
| Pre-release artifacts | Linux, macOS, Windows, Android, iOS |
| Docker | Linux |
| Debian | Linux |
| Homebrew | macOS, Linux |
| conda-forge | Windows, macOS, Linux |
| MacPorts | macOS |
| Winget | Windows |
| XCFramework | iOS, macOS |
开发 Development
该项目培育了一个令人赞叹的开源社区,汇聚了技能娴熟、才华出众的贡献者。随着 AI 在软件工程领域的能力迅速提升,我们将继续以审慎、合理的方式调整并将大语言模型融入开发周期。维护高质量的代码库、掌控架构并理解实现细节,仍将是我们的首要任务。The project has fostered an amazing open-source community with highly-skilled and talented contributors. With the rapid advance of AI capabilities in the field of software engineering, we continue to adapt and integrate LLMs in our developement cycle in a thoughtful and resonable manner. Maintaining a high quality codebase, staying in control of the architecture and understanding the implementation details will remain our top priorities.
为了进一步加快开发节奏,我们持续投入更多资源来改进项目背后的 CI 基础设施。借助 HF Buckets 和 HF Jobs 等 HF 技术,我们能够扩展所需容量,确保合并到主分支的每项变更都正确无误。在 NVIDIA、AMD、Qualcomm、Arm、IBM 和 Intel 的硬件支持下,我们持续在所有主要硬件平台上部署更多自托管运行器。To reinforce the faster pace of development we continue to invest more and more resources in improving the CI infrastructure behind the projects. Thanks to HF technologies such as HF Buckets and HF Jobs we are able to scale the capacity necessary to guarantee correctness for every change that lands on the master branches. With hardware support from NVIDIA, AMD, Qualcomm, Arm, IBM and Intel, we continue to enroll more self-hosted runners across all major hardware platforms.
后端和模型覆盖范围 Backend and model coverage
llama.cpp 的底层机器学习引擎 ggml 旨在几乎能在现存的任何硬件上运行。这是通过实现专用的 ggml 后端实现的。每个后端都可以编译为动态库,并可选择在运行时加载。The underlying machine learning engine of llama.cpp - ggml is designed to run on virtually any hardware in existence. This is achieved by implementing dedicated ggml backends. Each backend can be compiled as a dynamic library and optionally loaded at runtime.
当前已实现的后端完整列表可在此处找到。A complete list of the currently implemented backends can be found here.
我们致力于为所有模型架构提供持续支持。目前,llama.cpp 支持 150 多种架构变体,以及所有主流的推测解码方法。We are committed to provide continuous support of all model architectures. Currently, llama.cpp supports more than 150 architecture variants as well as all mainstream speculative decoding methods.
谢谢 Thanks
Hugging Face 的 llama.cpp 团队感谢社区给予的巨大支持。特别感谢项目的长期维护者和所有贡献者。这是一个重要的里程碑,若没有大家共同努力,就不可能实现!The llama.cpp team at Hugging Face is thankful for the incredible support from the community. Special thanks to the long-time maintainers of the project and all contributors. This is a significant milestone which would not have been possible without our joint efforts!
其他资源 Additional resources
- llama.cpp 示例
- Hugging Face 上的 ggml-org
- GitHub 上的 ggml-org
- 快来体验适用于 macOS 和 Windows 的 Llama 桌面应用,它们由 llama.cpp 和 Hugging Face 背后的团队倾情打造。Check out Llama desktop apps for MacOS and Windows, shipped with love by the team behind llama.cpp and Hugging Face.