XR

xiaoconstantine/rlm-go

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

21 stars 품질 54 트렌드 14MIT

Recursive Language Models (RLM)의 구현 - arbitrarily long contexts에 대한 방해 시간 스케일링

개요

Recursive Language Models (RLM)의 Go 구현 - LLM을 처리 할 수있는 의도적 인 스케일링 전략은 프로그래밍 가능한 검사 및 반복적으로 처리 할 수있는 외부 객체로 신속한 처리로 신속한 처리로 신속한 처리 할 수 있습니다. RLM-go는 LLM-generated 코드가 있을 수 있는 Go REPL 환경을 제공합니다. - 변수로 저장된 액세스 컨텍스트 - Query() 및 QueryBatched()를 통해 recursive sub-LLM 호출을 만드십시오. - 텍스트 처리에 대한 표준 이동 작업을 사용합니다. FINAL() 또는 FINAL VAR() 소켓 IPC를 사용하는 파이썬 RLM과는 달리, Yaegi를 통해 rlm-go 사용 - Go 해석기. 이 삭제: - 소켓 서버 오버헤드 - Serialization/deserialization - 프로세스 경계 결과는 소켓 IPC와 비교된 sub-LLM 통화 당 ~100x 더 적은 지연시간입니다. - 이동 1.

개요(AI 번역)

Recursive Language Models (RLM)의 Go 구현 - LLM을 처리 할 수있는 의도적 인 스케일링 전략은 프로그래밍 가능한 검사 및 반복적으로 처리 할 수있는 외부 객체로 신속한 처리로 신속한 처리로 신속한 처리 할 수 있습니다.

개요

RLM-go는 LLM-generated 코드가 가능한 Go REPL 환경을 제공합니다.

  • 변수에 저장된 Access context
  • Query() 및 QueryBatched()]를 통해 반복적인 서브-LLM 호출
  • 텍스트 처리를위한 표준 이동 작업
  • FINAL()] 또는 FINAL_VAR()로 신호 완료

키 디자인 결정

소켓 IPC를 사용하는 파이썬 RLM과는 달리, rlm-go는 direct function injection by Yaegi - a Go 해석기를 사용합니다. 이 제거:

  • 소켓 서버 오버 헤드
  • 직렬화/멸균
  • 프로세스 경계

결과는 소켓 IPC와 비교된 sub-LLM 통화 당 ~100x 더 적은 지연시간입니다.

요구 사항

  • 1.23 이상 (원출시)
  • LLM API 키:
  • ANTHROPIC_API_KEY 클로드 모델 (기본)
  • Gemini 모델의 [T5]
  • OPENAI_API_KEY OpenAI 모델
  • (선택 사항) 파드만 또는 도커 격리 샌드박스 실행

지원된 모형

| 제공자 | 모델 | Env 가변 |

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

rlm-go

A Go implementation of Recursive Language Models (RLM) - an inference-time scaling strategy that enables LLMs to handle arbitrarily long contexts by treating prompts as external objects that can be programmatically examined and recursively processed.

Overview

RLM-go provides a Go REPL environment where LLM-generated code can:

  • Access context stored as a variable
  • Make recursive sub-LLM calls via Query() and QueryBatched()
  • Use standard Go operations for text processing
  • Signal completion with FINAL() or FINAL_VAR()

Key Design Decisions

Unlike the Python RLM which uses socket IPC, rlm-go uses direct function injection via Yaegi - a Go interpreter. This eliminates:

  • Socket server overhead
  • Serialization/deserialization
  • Process boundaries

The result is ~100x less latency per sub-LLM call compared to socket IPC.

Requirements

  • Go 1.23 or later (for building from source)
  • An LLM API key:
    • ANTHROPIC_API_KEY for Claude models (default)
    • GEMINI_API_KEY for Gemini models
    • OPENAI_API_KEY for OpenAI models
  • (Optional) Podman or Docker for isolated sandbox execution

Supported Models

Provider Models Env Variable
Anthropic claude-sonnet-4-20250514, claude-opus-4-20250514, etc. ANTHROPIC_API_KEY
Google gemini-3-flash-preview, gemini-3-pro-preview GEMINI_API_KEY
OpenAI gpt-5, gpt-5-mini OPENAI_API_KEY

The provider is auto-detected based on model name. Anthropic is the default.

Installation

# Download and install the latest release
curl -fsSL https://raw.githubusercontent.com/XiaoConstantine/rlm-go/main/install.sh | bash

This installs the rlm binary to ~/.local/bin/rlm.

Go Install

go install github.com/XiaoConstantine/rlm-go/cmd/rlm@latest

From Source

git clone https://github.com/XiaoConstantine/rlm-go.git
cd rlm-go
go build -o rlm ./cmd/rlm

As a Library

go get github.com/XiaoConstantine/rlm-go

Claude Code Integration

RLM includes a skill for Claude Code that provides documentation and usage guidance for large context processing.

Install the Skill

rlm install-claude-code

This creates a skill at ~/.claude/skills/rlm/SKILL.md that teaches Claude Code:

  • When to use RLM (contexts >50KB, token efficiency needed)
  • Command usage and options
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add xiaoconstantine/rlm-go
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →