magnitudedev / magnitude

magnitudedev / magnitude

Magnitude: Run your agent on local models. Free, private, and offline. Magnitude:在本地模型上运行你的 AI Agent。免费、私密且离线。

Magnitude is an open source inference server that runs the best local models for your hardware, plugged into the agent you already use. It profiles your machine, recommends the models that fit, then downloads, tunes, and runs them. Magnitude 是一个开源推理服务器,它能为你的硬件运行最合适的本地模型,并与你现有的 AI Agent 无缝集成。它会分析你的机器配置,推荐适合的模型,然后自动下载、调优并运行它们。

Works with Pi, OpenCode, Hermes, OpenClaw, Codex, Claude Code, Oh My Pi, and Cline, or use the built-in harness. ⭐ Help us reach more developers and grow the Magnitude community. Star this repo! 它支持 Pi、OpenCode、Hermes、OpenClaw、Codex、Claude Code、Oh My Pi 和 Cline,或者你也可以使用其内置的 harness。⭐ 帮助我们触达更多开发者并壮大 Magnitude 社区,请为本项目点个 Star!

Get started

开始使用

Send this to your agent to walk through models and setup: 将以下内容发送给你的 Agent,以引导其完成模型选择和设置:

Set up local models for me with the Magnitude CLI. 请使用 Magnitude CLI 为我设置本地模型。

Install it with npm i -g @magnitudedev/cli (or my package manager), then run magnitude docs onboarding and follow the instructions. Your agent will profile your hardware, walk you through the best local models for it, download the ones you pick, and switch itself over to them. 通过 npm i -g @magnitudedev/cli(或你使用的包管理器)进行安装,然后运行 magnitude docs onboarding 并按照说明操作。你的 Agent 将会分析你的硬件,引导你选择最适合的模型,下载你选定的模型,并自动切换到这些模型上。

Magnitude supports macOS and Linux. Windows is supported through WSL. Magnitude 支持 macOS 和 Linux。Windows 用户可通过 WSL 使用。

Want to browse the models directly? 想直接浏览模型吗?

npm i -g @magnitudedev/cli
magnitude setup

The interactive setup lets you browse the recommended models and choose one yourself. 交互式设置界面允许你浏览推荐的模型并自行选择。

Why Magnitude?

为什么选择 Magnitude?

  • Free to run: no token costs, API keys, or rate limits
  • 免费运行: 无 Token 费用、API Key 或速率限制
  • Fully private and offline: models, prompts, and files stay on your machine
  • 完全私密且离线: 模型、提示词和文件均保留在你的本地机器上
  • Agent-first setup: one prompt and your agent walks you through the rest
  • 以 Agent 为先的设置: 只需一个提示词,你的 Agent 就会引导你完成后续步骤
  • Knows your hardware: profiles your chip, memory, and bandwidth
  • 了解你的硬件: 分析你的芯片、内存和带宽
  • Recommends what fits: the best models for your machine, with estimated tok/s
  • 推荐最适配的模型: 为你的机器提供最佳模型,并附带预估的 tok/s(每秒 Token 数)
  • Tuned end to end: speculative decoding, concurrency, all set for your machine
  • 端到端调优: 针对你的机器配置了推测解码(speculative decoding)和并发处理
  • Models on demand: loaded on request, unloaded when idle or memory fills
  • 按需加载模型: 请求时加载,空闲或内存不足时自动卸载
  • Open source: Apache 2.0, yours to modify
  • 开源: 采用 Apache 2.0 协议,你可以自由修改

FAQ

常见问题解答

What is Magnitude? 什么是 Magnitude? An open source inference server that runs the best local models for your hardware, plugged into the agent you already use. It profiles your machine, recommends the models that fit, then downloads, tunes, and runs them. 一个开源推理服务器,它能为你的硬件运行最合适的本地模型,并与你现有的 Agent 集成。它会分析你的机器,推荐适合的模型,然后下载、调优并运行它们。

What hardware do I need? 我需要什么硬件? There’s no fixed minimum. Magnitude profiles your hardware and recommends the best models for your machine. More memory lets you run larger models. 没有固定的最低要求。Magnitude 会分析你的硬件并推荐最适合你机器的模型。内存越大,能运行的模型就越大。

Why not just have my agent set up Ollama? 为什么不直接让我的 Agent 设置 Ollama? Your agent would be guessing. It doesn’t know your hardware, which quant fits, or how fast it’ll run. Magnitude gives it a catalog with recommendations computed for your machine, an onboarding flow that writes your harness config, and inference built for agent workloads. Models load just in time and unload when idle or memory gets tight. 你的 Agent 只能靠猜。它不知道你的硬件配置、哪种量化版本合适,或者运行速度如何。Magnitude 为其提供了一个基于你机器计算出的推荐目录、一个自动写入 harness 配置的引导流程,以及专为 Agent 工作负载构建的推理引擎。模型会即时加载,并在空闲或内存紧张时自动卸载。

Which harnesses work with it? 它支持哪些 Harness? Pi, OpenCode, Hermes, OpenClaw, Codex, Claude Code, Oh My Pi, and Cline. During setup, your agent connects your harness to the model you pick. Or use Magnitude’s built-in harness. Pi、OpenCode、Hermes、OpenClaw、Codex、Claude Code、Oh My Pi 和 Cline。在设置过程中,你的 Agent 会将你的 harness 连接到你选择的模型。或者,你也可以使用 Magnitude 内置的 harness。

Do I need to manage Magnitude after setup? 设置完成后我还需要管理 Magnitude 吗? No. It runs in the background, loads models when your agent needs them, and unloads them when idle or memory gets tight. Your agent can install or switch models through the Magnitude CLI anytime. 不需要。它在后台运行,在 Agent 需要时加载模型,在空闲或内存紧张时卸载模型。你的 Agent 可以随时通过 Magnitude CLI 安装或切换模型。

Does my data go to the cloud? 我的数据会上传到云端吗? No. Prompts, files, and models stay on your machine. 不会。提示词、文件和模型都保留在你的机器上。

Can it run completely offline? 它可以完全离线运行吗? Yes. Once Magnitude and a model are downloaded, no internet connection needed. 可以。一旦 Magnitude 和模型下载完成,就不再需要互联网连接。

Can I use models outside the catalog? 我可以使用目录之外的模型吗? Yes. You can download compatible GGUF models from Hugging Face and use them in Magnitude. 可以。你可以从 Hugging Face 下载兼容的 GGUF 模型并在 Magnitude 中使用。


Learn more | Documentation | CLI reference | Discord | Report an issue 了解更多 | 文档 | CLI 参考 | Discord | 报告问题

License 许可证 Magnitude is licensed under the Apache License 2.0. Magnitude 采用 Apache License 2.0 协议授权。