feat(pkg): add ggml-org.llamacpp b10069 C++23 module - #129
Closed
wellwei wants to merge 2 commits into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #127.
这次只提交一个经过完整验证的不可变版本
ggml-org.llamacpp@b10069。相比 #127,移除了未完成验证的 b10107、多版本并集规则、错误的版本报告与内部过程文档,分支从当前main重新整理为两条聚焦提交。1. 包边界
import llamacpp;backend-metal启用 Metalllama.h的公开类型与函数声明(包括 deprecated API)由固定上游归档生成并校验六个上游 model TU 因 GCC C++23 named-module/vtable 兼容性在包内部单独以 C++20 编译:
dflash、eagle3、hunyuan-dense、llama-embed、minimax-m2、t5。这只是实现侧 dialect exception,消费者仍直接使用 C++23 与
import llamacpp;,不需要兼容头或额外 API 分支。2. 使用方式
添加依赖:
等价的 CPU 配置:
macOS ARM64 Metal 配置:
最小消费代码:
默认 CPU 测试会加载固定 GGUF、执行 decode 并采样一个 token。Metal 测试还会验证 MTL registry、GPU device、embedded Metal library、F32 graph compute、正数 GPU layer offload 与 decode,避免只有编译通过但实际未使用 GPU 的 false green。
3. 支持矩阵
Linux ARM64 当前被 mcpp 0.0.109 的 host-helper 问题阻塞:ARM64 默认选择 musl GCC,但
build.mcpphelper 没有继承静态链接设置,生成的 ELF 请求 Ubuntu glibc 环境不存在的/lib/ld-musl-aarch64.so.1,最终在posix_spawnp处表现为 exit 127。最小puts()build program 已独立复现;同一编译器仅增加-static后可正常运行。因此这里不添加包侧 workaround,也不宣称 Linux ARM64 支持;待 mcpp 核心修复并重新跑完整 consumer 后再扩展矩阵。本 PR 不包含 CUDA、Vulkan、OpenCL、其他 GPU backend、mtmd、server 或 CLI。支持边界是
llama.h公共库 API以及 CPU/macOS Metal 推理路径,不等同于打包 llama.cpp 仓库的全部应用程序。4. 可重复性与校验
b10069178a6c44937154dc4c4eff0d166f4a044c4fceba293a7c65a11e2203c5468a06d0d0e8d21dfff16ad08712b16c61efbe0d93e097llama.h做完整性检查,新增/删除/遗漏声明都会失败本地收尾验证(mcpp 0.0.109):
mcpp xpkg parse pkgs/g/ggml-org.llamacpp.lua:通过python3 tests/check_llamacpp_snapshot.py:通过Fork CI(HEAD
b58d4d0):run #30262738154本包目前只使用固定的 GLOBAL upstream URL,没有已授权发布的 CN mirror;未伪造镜像条目。PR 不需要提高现有
min_mcpp = 0.0.109或 workflow pin。5. 版本更新策略
llama.cpp 更新非常频繁,本包不按每个 daily build 机械追版本:
llama.hAPI 变化时立即评估升级这个策略把“跟进 upstream”限定为有消费者价值且能被当前 CPU/Metal 支持边界证明的更新,避免再次把试验中的版本和规则一起塞进 PR。