∴ GitHub / 趋势仓库

ashhart / TensorFold

用 Zig 编写的 LLM 推理引擎,支持 Metal、CUDA 和 Vulkan

语言
Zig
Star
2.2k
Fork
520
当日新增(11-15)
+37
累计在榜
4 天
最高名次
第 7 名
首次上榜
2026-11-12
去 GitHub 查看 ↗项目主页 ↗

∴ 是什么

TensorFold 是一个用 Zig 语言实现的 LLM 推理引擎,直接读取 checkpoint、处理 token 并运行 Metal 或 CUDA 内核。它作为一个单一二进制文件在 Apple Silicon 和 NVIDIA GPU 上提供服务,无需 Python 或 MLX 安装。

∴ 解决什么问题

  • 避免为 LLM 推理安装 Python 或 MLX 的依赖
  • 在苹果和 NVIDIA GPU 上提供统一的推理服务
  • 通过 API 提供 OpenAI 和 Anthropic 兼容的接口
  • 支持实验性的运行时权重学习(Living Weights)

∴ 怎么上手

  1. 01安装:brew install ashhart/tensorfold/tensorfold
  2. 02拉取模型:tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit@93760be4f1f69842a46bc13dbdc0f19e291392a3
  3. 03启动服务:tensorfold serve mlx-community/Qwen3.5-2B-MLX-4bit --name local-model --context 8192 --no-thinking
  4. 04发送请求:curl -fsS http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"local-model","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_tokens":128,"temperature":0}'

∴ 适合谁

适用于需要在 Apple Silicon 或 NVIDIA GPU 上本地部署和运行语言模型的开发者或运维人员,尤其是希望避免 Python 环境依赖的场景。

∴ 要点

  • 用 Zig 编写的单一二进制,直接运行内核
  • 支持 Metal 和 CUDA(以及路线中的 Vulkan)
  • 提供 OpenAI 和 Anthropic 兼容的 API
  • 支持 --parallel 控制并发请求
  • 包含实验性的 Living Weights 功能,可在运行中学习新事实
  • 许可:Apache-2.0
许可证 Apache-2.0aiai-toolsllmllm-inferencellm-tools

解读由 AI 依据项目 README 生成,生成于 2026-11-12,以 GitHub 原文为准。

∴ 在榜记录

GitHub Trending 今日榜的每日存档,日期按北京时间。2026-11-12 首次上榜,累计在榜 4 天,最高第 7 名。

[object Object]2026-11-12 +582026-11-13 +542026-11-14 +1882026-11-15 +37
每日新增 Star · 2026-11-12 至 2026-11-15 · 共 4 个在榜日峰值 +188
日期名次当日新增总 Star
#9+372,227
#9+1882,109
#7+542,040
#7+581,864