rec README

README проекта с github.com/recursive-oss/rec. Одним файлом markdown: README.md.

Recursive

rec is our custom inference engine for running Recursive's language models locally on your machine. It provides lightning-fast inference for single-session usage. Compared to llama.cpp, rec delivers 1.4–2.6× the token throughput across the context lengths shown below on M4 Pro. Use it with pi, OpenCode, or connect your own client through the local API.

Flint decode throughput: rec vs. llama.cpp at context lengths from 1K
    to 252K tokens

Flint on Apple M4 Pro (48 GB), 4-bit weights, 1K–252K-token prompts and 1,024 output tokens. Five runs per context; prefill excluded.

Requirements

Install

Install using:

curl -fsSL https://raw.githubusercontent.com/recursive-oss/rec/main/install.sh | bash

This installs rec in ~/.local/bin and adds it to your PATH for new terminals. All other data lives under ~/.local/share/rec.

Usage

We find the best performance from our models when paired with the pi harness. For convenience, rec provides pre-configured recipes for running pi and OpenCode harnesses. Run them using:

rec launch pi  # preferred
rec launch opencode

⚠️ rec is optimized for single-session usage. To run multiple agents at a time, see our documentation for other ways to run our models.

This starts our inference server and connects to it automatically. The first run downloads the model and harness. The model server continues to run after you close the terminal. Run rec stop to stop it.

These harnesses are kept separate from anything on your system. Use rec exec pi|opencode ARGS to run their own commands, for example:

rec exec pi install npm:PACKAGE

Use your own harness

rec exposes OpenAI and Anthropic-compatible chat-completion APIs. Start the server:

rec serve

Keep this terminal open. When flint is ready. appears, connect a client from another terminal.

To use your own install of pi or OpenCode, run:

rec launch --args pi
rec launch --args opencode

Each command prints the environment and command line that rec launch uses, instead of running it. Replace the harness path with the path to your own harness. The command also points the harness at rec's own settings and sessions; remove those variables to keep yours.

To send a request directly to the OpenAI-compatible 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}'

The response contains generated text in choices. For other clients, use base URL http://127.0.0.1:11500/v1, model flint, and the API key from rec auth token.

The Anthropic-compatible API is available at http://127.0.0.1:11500/v1/messages. Point ANTHROPIC_BASE_URL at http://127.0.0.1:11500 and send the token from rec auth token as a bearer token or as x-api-key. The model is flint.

Commands

Command What it does
rec launch pi|opencode Start the server if needed and open a harness
rec exec pi|opencode ARGS Run a harness command, such as installing a plugin
rec serve Start the model server in this terminal
rec status Show whether the server is running
rec stop Stop the server
rec auth token Print the local API key
rec pull Download the model without starting the server
rec doctor Check your hardware and installation
rec update Update rec to the latest release
rec uninstall Remove rec, its models and its settings

Run rec COMMAND --help for a command's options.

Help and contributing

rec (recursive-oss/rec)

Ищем в базе…

286 ·GitHub
Что это такое?rec — это собственный движок инференса от Recursive для локального запуска их языковых моделей на вашем Mac, оптимизированный для быстрой работы в одной сессии.
Это CLI-инструмент или фоновый сервис?Это инструмент командной строки: вы устанавливаете бинарный файл rec и запускаете его из терминала. Он поднимает локальный сервер модели, к которому вы подключаете обвязку (harness) или свой клиент.
Как установить и запустить rec?Выполните команду установки, которая поместит rec в ~/.local/bin и добавит его в PATH, а затем запустите 'rec launch pi' или 'rec launch opencode', чтобы поднять сервер и открыть обвязку.
Какое железо и программы нужны?Mac на Apple Silicon с чипом M4 Pro, M4 Max, M5 Pro или M5 Max, не менее 48 ГБ унифицированной памяти, около 30 ГБ свободного места на диске, а также Node.js 22 с npm, если вы хотите использовать обвязку pi.
Можно ли запускать несколько агентских сессий одновременно?Нет, rec рассчитан на работу в одной сессии. Для запуска нескольких агентов одновременно нужна другая конфигурация, которая описана в отдельной документации rec.
Будет ли это работать на любом Mac?Нет, только на определённых новых чипах Apple Silicon (M4 Pro/Max или M5 Pro/Max) с не менее чем 48 ГБ унифицированной памяти. Маки со слабее конфигурацией или на Intel не поддерживаются.
Нужен ли интернет для работы?Интернет нужен только при первом запуске, чтобы скачать модель и обвязку. После этого инференс полностью выполняется локально на вашем компьютере.
Что такое flint?flint — это языковая модель, которая поставляется вместе с rec. Это имя модели, которое вы указываете в своём API-клиенте при подключении к локальному серверу rec, совместимому с API OpenAI или Anthropic.
Насколько rec быстрее llama.cpp?На Apple M4 Pro с 4-битными весами rec выдаёт в 1,4–2,6 раза большую скорость генерации токенов, чем llama.cpp, при длине контекста от 1 тыс. до 252 тыс. токенов.
Можно ли подключить свой кодинг-агент вместо pi или OpenCode?Да. rec предоставляет API chat-completion, совместимые с OpenAI и Anthropic, поэтому любой совместимый клиент или ваша собственная обвязка может подключиться к локальному серверу rec, используя токен из команды 'rec auth token'.
Какие есть похожие проекты?kapitsa, Locals, apfel, ordewell, deltafin, Strata, OmniInfer, headroom
Автор
recursive-oss
Размер
0.2 MB
Звёзды
286
Возраст
28 д
Коммиты · 90 дней