Bonsai 2 27B:在更小9倍的占用空间中实现近无损压缩

Simon Willison's Blog 模型

摘要

Bonsai 2 27B是一个压缩的AI模型,能在更小9倍的占用空间中实现近无损性能,并提供使用Prism的llama.cpp分支的设置指南。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/09/25 19:44

# 评论:Bonsai 2 27B:以9倍体积缩减实现近无损压缩 来源:https://simonwillison.net/2026/Sep/17/hn-49747390/ 2026年9月17日 如果你想尝试来自https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf#these-files-need-our-llamacpp-build的GGUF模型,请注意你需要使用Prism的llama\.cpp分支才能运行,下载地址为https://github.com/PrismML-Eng/llama.cpp/releases/tag/prism-b10685-7dffb15 以下步骤应该可行: ``` cd /tmp # 获取Prism macOS运行时 curl -fL https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b10685-7dffb15/llama-prism-b10685-7dffb15-bin-macos-arm64.tar.gz -o bonsai-runtime.tar.gz tar -xzf bonsai-runtime.tar.gz # 下载约5.95 GB的GGUF模型: curl -fL https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf/resolve/main/Ternary-Bonsai-2-27B-PTQ1_0.gguf -o Ternary-Bonsai-2-27B-PTQ1_0.gguf # 运行服务器,我使用了8331端口 ./llama-prism-b10685-7dffb15/llama-server \ -m Ternary-Bonsai-2-27B-PTQ1_0.gguf \ --port 8331 -ngl 99 -fa on -c 32768 ``` 然后打开 http://localhost:8331 即可访问内置的llama\-server网页界面(效果非常好)……或者通过API这样发送提示: ``` uvx llm openai endpoint http://127.0.0.1:8331/v1 \ --model bonsai-2-27b --responses hi ``` 在我的M5 Pro上运行速度约为20个token/秒(重启服务器后曾达到44 token/秒,不确定原因),但我很确定有些地方没有正常工作,因为服务器启动时显示了 "`ggml\_metal\_device\_init: \- the tensor API is not supported in this environment \- disabling`"。

相似文章

PrismML希望其微型LLM将改变我们使用AI的方式

TechCrunch AI

PrismML,一家由Caltech创立的初创公司,发布了Bonsai 2,这是一个高度压缩的LLM,将内存使用量减少9-10倍,性能损失极小,旨在使AI能够在PC和智能手机等消费设备上运行。

prism-ml/Bonsai-27B-gguf

Hugging Face Models Trending

Prism ML 发布了 Bonsai-27B-gguf,这是一个拥有 270 亿参数的语言模型,采用二进制(1.125 位)权重,实现了约 14 倍的尺寸缩减,同时保留了约 90% 的 FP16 推理性能。它可以在消费级硬件上运行,并具有高吞吐量。