引言
"Our lightning-fast inference engine."
这是"一天一个开源项目"系列的第 246 篇文章。今天带你了解的项目是 rec(recursive-oss/rec)。
本地跑模型这件事,大家已经有 llama.cpp、Ollama、LM Studio 这些成熟选项。rec 走的是另一条路:不做通用,只服务一个模型和一类场景。它是 Recursive 公司专门为自家 Flint 语言模型写的推理引擎,目标是让编码智能体在 Mac 上本地跑起来足够快。
需要先说清楚:这是一个很新、很小的项目(写作时 151 Stars、6 个 commits),对它的评价要克制。本文会重点讲它怎么用、边界在哪,以及哪些说法目前只是项目自述。
你将学到什么
- rec 的定位:为什么是"专用推理引擎"而不是又一个 llama.cpp
- 硬件要求与安装方式
- rec launch 与 rec serve 两种使用姿势
- OpenAI / Anthropic 兼容的本地 API 怎么接
- 命令一览
- 性能声明的测试条件,以及该怎么看待它
前置知识
- 用过本地 LLM 工具(Ollama、llama.cpp、LM Studio 任一)
- 了解 OpenAI 兼容 API 的基本调用方式
- 对编码智能体 harness(如 OpenCode、pi)有基本概念
项目背景
项目简介
rec 是在本机运行 Recursive 公司语言模型 Flint 的自研推理引擎,面向单会话场景。Flint 在文档里的定位是"fast, local agentic coding",即快速的本地智能体编码模型,既能本地跑,也能云端跑,再接入编码工具(harness)。
rec 的职责可以拆成三件事:
- 自动下载模型,并在 Mac 上高效推理
- 自动配置并启动编码 harness(pi 或 OpenCode)
- 对外提供本地 OpenAI / Anthropic 兼容 API,方便接入自己的客户端
作者/团队介绍
- 组织:recursive-oss(Recursive 公司)
- 文档站称 Flint 由其自研的 "autoresearch" 系统 "Eureka Machine" 构建
- 具体个人作者和贡献者名单:项目页未展示
- 项目创建时间:未提供
项目数据
- ⭐ GitHub Stars: 151
- 🍴 Forks: 16
- 📝 Commits: 6
- 🐛 Issues: 7,Pull requests: 4
- 📄 License: Apache-2.0
- 📚 文档: docs.recursive.com
主要功能
核心作用
在 Apple Silicon Mac 上,用比通用运行时更快的速度本地跑 Flint,并把它顺手接到编码智能体里。
使用场景
- 本地编码智能体
- 用 rec launch pi 一条命令起模型加 harness,代码不出本机。
- 给自己的客户端提供本地模型
- 通过 OpenAI 兼容接口 /v1/chat/completions 接入任何兼容客户端。
- 给 Anthropic 协议的工具接入本地模型
- 通过 /v1/messages 接口,把 ANTHROPIC_BASE_URL 指向本地服务。
- 对比本地推理引擎的吞吐
- 在同一台机器上与 llama.cpp 对照测试单会话解码速度。
快速开始
硬件与环境要求
- Apple Silicon Mac,型号为 M4 Pro、M5 Pro 或 M5 Max
- 至少 48 GB 统一内存
- 约 30 GB 可用磁盘空间
- 使用 pi 需要 Node.js 22 和 npm
安装
curl -fsSL https://raw.githubusercontent.com/recursive-oss/rec/main/install.sh | bash
rec 会安装到 ~/.local/bin 并加入新终端的 PATH,其余数据位于 ~/.local/share/rec。
启动
rec launch pi # 官方推荐
rec launch opencode
首次运行会下载模型和 harness。关闭终端后服务继续运行,用 rec stop 停止。rec 的 harness 与系统里自己安装的相互隔离,可用 rec exec 在其环境里运行命令:
rec exec pi install npm:PACKAGE
官方特别提醒:rec 针对单会话优化。如果要多个 agent 并行,请参考官方文档里的其他运行方式。
使用自己的 harness
先启动服务(保持终端开启,出现 flint is ready. 后即可从另一个终端连接):
rec serve
想看 rec launch 用了哪些环境变量和命令行,可以只打印不执行:
rec launch --args pi
rec launch --args opencode
把其中的 harness 路径换成你自己的。如果想保留自己的设置与会话,需要去掉指向 rec 设置和会话的那几个变量。
直接请求 OpenAI 兼容 API:
curl -fsS http://127.0.0.1:11500/v1/chat/completions \
-H "Authorization: Bearer $(rec auth token)" \
-H 'Content-Type: application/json' \
-d '{"model":"flint","messages":[{"role":"user","content":"Say hello."}],"max_tokens":128}'
其他客户端的配置:
- OpenAI 兼容:base URL http://127.0.0.1:11500/v1,模型名 flint,API key 用 rec auth token 的输出
- Anthropic 兼容:端点 http://127.0.0.1:11500/v1/messages,将 ANTHROPIC_BASE_URL 指向 http://127.0.0.1:11500,token 可作为 bearer 或 x-api-key 发送,模型名同样是 flint
核心特性
- 专用于 Flint 的推理引擎
- 不追求支持所有模型,换来针对性的优化空间。
- 一条命令的本地编码环境
- rec launch 自动下载模型、配置并启动 pi 或 OpenCode。
- 两套兼容 API
- OpenAI 与 Anthropic 协议,本地即可接入现有工具链。
- 隔离的 harness
- rec 管理的 harness 与系统安装互不干扰。
- 本地鉴权
- 服务需要 rec auth token 生成的 key,而不是裸奔的本地端口。
- 完整的命令行管理
- 启停、状态、模型下载、环境自检、升级、卸载齐全。
命令一览
各命令的选项可以用 rec COMMAND --help 查看。
项目优势
项目自述的性能声明是:在 M4 Pro 上,与 llama.cpp 相比,吞吐为其 1.4–2.6 倍,上下文长度覆盖 1K 到 252K。
测试条件如下:
与其他方案的定性对比(项目页没有给出正式对比,以下是我基于其定位的整理):
什么时候值得试?
- 你有符合要求的 Mac,想在本地跑一个编码智能体
- 你想亲自验证"专用引擎能比通用运行时快多少"
- 你需要同时提供 OpenAI 与 Anthropic 两套本地接口
项目详细剖析
设计取舍:专用而非通用
rec 最值得讨论的是它的取舍。通用推理运行时要支持大量模型结构、量化格式、后端,代价是难以对某一个模型做到极致。rec 反过来:只服务 Flint,只服务 Apple Silicon,只优化单会话解码。
这种取舍的好处和代价都很明确:
项目结构
根目录可见 cli、engine、packaging、tests 等目录,以及 go.mod、.golangci.yml、ruff.toml 等配置文件,可以看出至少有 CLI 与 engine 的分层,并涉及 Go 与 Python 的工具链。语言占比和具体的引擎实现,项目页没有给出,这只是从文件名做的推测。
引擎内部具体做了哪些优化、为什么比 llama.cpp 快,项目页和文档站都没有说明,本文也就不做臆测。如果你想知道原理,需要读 engine 目录源码或等待官方的技术说明。
怎么看待那个"1.4–2.6 倍"
这是项目自己的测试结果,几点要留意:
- 只算解码,不含 prefill。 编码智能体场景里长上下文的 prefill 往往占大头,而这个数字不包含它。
- 单一机型。 只给了 M4 Pro 48 GB 的数据。
- 对手是 llama.cpp。 版本、编译选项、量化方式的细节页面没有提供。
- 模型不同。 rec 跑的是 Flint,对比是否在同一模型、同一量化上进行,页面也没有说明。
因此更稳妥的做法是:把它当作"值得自己复测的线索",而不是定论。
局限与需要留意的点
- 硬件门槛高。 仅支持 M4 Pro、M5 Pro、M5 Max,且要 48 GB 统一内存和约 30 GB 磁盘。
- 模型绑定。 它是 Flint 的引擎,不是通用运行时。
- 单会话。 官方明确提示多 agent 并行要换运行方式。
- 项目很早期。 6 个 commits,接口和行为可能变化。
- curl | bash 安装。 生产或敏感环境建议先读 install.sh。
- 文档站的信息有限。 模型架构、上下文长度、发布日期等,当前文档站首页都没有给出,需要看模型卡。
项目地址与资源
官方资源
- 🌟 GitHub: github.com/recursive-o…
- 📚 文档: docs.recursive.com
- 🐛 Issue Tracker: github.com/recursive-o…
相关资源
- Flint 模型卡与发布状态:见文档站的 model card 与 releases 页面
- 文档站列出的其他运行 Flint 的方式:Ollama、Unsloth、LM Studio、llama.cpp,以及 Hugging Face Transformers、SGLang、vLLM
总结与展望
核心要点回顾
- 专用引擎:rec 只为 Flint、只为 Apple Silicon、只为单会话优化,用通用性换速度。
- 开箱即用:一条命令安装,rec launch pi 就能得到本地编码智能体环境。
- 接口友好:同时提供 OpenAI 与 Anthropic 兼容的本地 API,并有本地鉴权。
- 谨慎看待性能声明:1.4–2.6 倍来自项目自述,仅限解码、单机型,值得自己复测。
适用人群
- 拥有 48 GB 以上高端 Mac、想本地跑编码智能体的开发者
- 关注本地推理引擎设计取舍的工程师
- 想对比专用引擎与通用运行时差距的评测者
学习建议
先跑一遍 rec doctor 确认机器满足要求,再 rec launch pi 体验端到端流程。想验证性能声明,就在同一台机器上按它给出的条件(4-bit、1,024 输出 token、每个上下文长度五次)自己复测,并把 prefill 时间单独记录下来。
探索 PrimeSkills —— 精选 AI agent 和技能工具,每一个都经过真实工作流验证。没有炒作,只有真正好用的工具。
访问我的个人主页,获取更多见解和有趣的产品。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Introduction
"Our lightning-fast inference engine."
This is the 246th article in the "A Day Open Source Project" series. The item that I'm showing you today is rec.
This local run model thing, you've got all these mature options, llama.cpp, Ollama, LM Studio. Rec's going the other way: it's not universal, it's just a model and a set of scenarios. It's a reasoning engine written by Recursive for its own Flinterman language model. The goal is to make code AI agent run locally on Mac fast enough.
It needs to be made clear: this is a very new, very small project (151 Stars, 6 committees), which is evaluated with restraint. This paper will focus on how it is used, where the border is, and what is currently just a project statement.
What will you learn?
- Rec's location: why is it a dedicated reasoning engine instead of another llama.cpp?
- Hardware requirements and installation modalities
- rec lanch and rec serve
- Open AI / Anthropic compatible local API?
- Orders.
- The conditions of the performance declaration and how it should be viewed.
Pre-knowledge
- Used local LLM tools (Olama, llama.cpp, LM Studio)
- Know basic calls for Open AI compatible API
- There's a basic concept of coding AI agent Harness.
Project background
Project Profile
Rec is the self-research reasoning engine for the Recursive corporate language model, Flinterman, for a single session scene. The location of Flint in the document is "fast, local environmental coding", a fast local AI agent code model that runs locally and clouds and re-enters the coding tool (harness).
The duty of rec can be broken down into three things:
- Automatic download of models and efficient reasoning on Mac
- Autoconfigure and start encoded harness (pi or OpenCode)
- Externally provide local Open AI/ Anthropic compatible API to facilitate access to your client
Introduction by author/team
- Organization: Recursive-oss
- Document station name Flint is built by its self-researched "autoresearch" system "Eureka Machine"
- List of individual authors and contributors: not shown on the project page
- Project creation time: not available
Project data
- ⭐ GitHub Stars: 151
- 🍴 Forks: 16
- 📝 Commits: 6
- 🐛 Issues: 7,Pull requests: 4
- 📄 License: Apache-2.0
- 📚 Document: docs.recursive.com
Main functions
Core role
On Apple Silicon Mac, run locally at a faster rate than when running for universal use, Flint, and hand it over to code AI agent.
Use scene
- Local code AI agent.
- A rec lanch pi command model plus aharness, code not available.
- Provide local models to their clients
- Access to any compatible client via Open AI compatible interface /v1/chat/complements.
- To access local models for the Anthropic protocol.
- Point ANTHRAPIC BASE URL to local services through the /v1/messages interface.
- Compared to local reasoning engines.
- On the same machine decode with llama.cpp against a single session.
Fast start.
Hardware and environmental requirements
- Apple Silicon Mac, model M4 Pro, M5 Pro or M5 Max
- At least 48 GB Unified Memory
- About 30 GB available disk space
- Use pi requires Node.js 22 and npm
Install
curl -fsSL https://raw.githubusercontent.com/recursive-oss/rec/main/install.sh | bash
Rec will be installed at ~/.local/bin and added to the new terminal of PATH, with the remaining data at ~/.local/share/rec.
Start
# Officially recommended
rec launch opencode
The first run will download models and naturals. Continue running after closing the terminal, stop with rec stop. Rec is isolated from the system and can run commands in its environment:
rec exec pi install npm:PACKAGE
An official special reminder: rec for single session optimization. If you want multiple agents in parallel, refer to other running methods in the official document.
Use your own Harness
Start service first (maintenance terminal opening is ready.
rec serve
If you want to see what environment variables and command line are used in rec launch, you can print only not to execute:
rec launch --args pi
rec launch --args opencode
Switch one of those harness paths to your own. If you want to keep your settings for the meeting, you need to remove the variables that point to rec settings and sessions.
API:
curl -fsS http://127.0.0.1:11500/v1/chat/completions \
-H "Authorization: Bearer $(rec auth token)" \
-H 'Content-Type: application/json' \
-d '{"model":"flint","messages":[{"role":"user","content":"Say hello."}],"max_tokens":128}'
Configuration of other clients:
- Open AI compatibility: base URL http://127.0.0.1:115500/v1, model name flint, API key with output from rec south token
-Anthropic Compatibility: Endpoints http://127.0.0.1:11500/v1/messages, pointing ANTHROPIC BASE URL at http://127.0.0.1:11500, token can be sent as bearer or x-api-key, also used as flint
Core characteristics
- A reasoned engine for Flint.
- Optimizing space for targeting instead of supporting all models.
- Local code environment for an order
- rec launch autodown model, configure and start pi or OpenCode.
- Two compatible sets, API.
- Open AI and Anthropic protocols, local access to existing tool chains.
- Isolated.
- rec manage harness and system installation without interference.
- Local jurisdiction.
- The service requires rec mouth token-generated key, not a naked local port.
- Full command line management.
- Discontinuation, status, model downloads, environmental self-censorship, upgrading, unloading.
Command Summary
The command options are available in rec COMMAND-help.
Project strengths
The self-described performance statement for the project is: 1.4 to 2.6 times as high on M4 Pro as on llama.cpp, and context covers 1K to 252K.
The conditions for testing are as follows:
Qualitative comparison with other programmes (no formal comparison is given on the project page, as follows:
When is it worth trying?
- You've got what you want, Mac. You want to run a local code AI agent.
- You want to verify for yourself how fast a dedicated engine can run.
- You need to provide both Open AI and Anthropic local interfaces.
Detailed Project Profile
Design trade-offs: dedicated rather than generic
Rec's the most worth discussing is its trade-offs. The generic reasoning operates in support of a large number of model structures, quantization formats, back end, at a cost that is difficult to achieve for a particular model. rec Conversely: service only Flint, service only Apple Silicon, optimize only single session decode.
The benefits and costs of such trade-offs are clear:
Project structure
Root directories can be found in directories such as cli, engine, packaging, tests, and profiles such as go.mod,.golangci.yml, ruff.toml. It can be seen that at least CLI and engine are layered and involved Go and Python 's tool chains. Language ratio and specific engines were achieved, and the project page was not given, which was only a presumption from the file name.
This paper does not speculate about what is actually being optimized within the engine, why is it faster than llama.cpp, neither the project page nor the documentation station. If you want to know the rationale, you need to read the engine directory source code or wait for an official technical description.
What do you think of that "1.4-2.6 times"?
This is the results of the project's own tests.
- Only decode, not prefill. The coding of the AI agent scene, the prefill of context, tends to dominate, and this number does not include it.
- Single. Only M4 Pro 48 GB data were given.
- The opponent is llama.cpp. Details of the version, compilation options, quantization format are not available.
- Models are different. Rec ran by Flint, and the comparison was made on the same model, on the same quantization, and was not shown on the page.
So it's safer to think of it as a "thing worth checking" rather than a conclusion.
Limitations and points that need attention
- High hardware threshold. Only M4 Pro, M5 Pro, M5 Max is supported, with 48 GB unified memory and about 30 GB disks.
- Model binding. It's a Flinterman engine, not a universal running time.
- Single session. Officially clearly suggests that multiple parties should change the way they run in parallel.
- Project early. 6 committees, interfaces and possible changes in behaviour.
- curl |bash installation. Install.sh.
- Limited information on document stations. Model structure, context length, publish date, etc. are not given on the front page of the current document station and need to see the model card.
Project address and resources
Official resources
- 🌟 GitHub: github.com/recursive-o…
- 📚 Document: docs.recursive.com
- 🐛 Issue Tracker: github.com/recursive-o…
Related resources
- Flint model card and publish status: see Model card and releases pages of document stations
- Other ways to run Flint listed in the document station: Ollama, Unsloth, LM Studio, llama.cpp, and Hughes Face Transformers, SGLang, v LLM
Summary and outlook
Review of core elements
- Specialized engine: rec is for Flint only, Apple Silicon only, single session is optimized and universal for speed.
- Open the box with an order and rec launch pi can get a local coded AI agent environment.
- Interface friendly: also provide a local API compatible with Anthropic, with local access.
- Precautionary statements of performance: 1.4-2.6 times from the project itself, with only decoded, single-machine types, worthy of self-measurement.
Population applicable
- Developer of high-end Mac, local running code AI agent with 48 GB above
- Engineers interested in local reasoning engine design.
- Evaluators who want to compare a special engine with a universal running time gap.
Learning advice
Run rec doctor to confirm the machine meets the requirements, rec launch pi experiences end-to-end processes. In order to validate the statement of performance, it is repeated on the same machine according to the terms it gives (4-bit, 1,024 output token, five times each context length) and is recorded separately.
Explore PrimeSkills - Select AI angent and skill tools, each validated by real workflow. No tricks, only real good tools.
Visit my home page to get more insights and interesting products.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.