Skip to content

Commit 86be876

Browse files
committed
add docs
1 parent e9e472a commit 86be876

29 files changed

Lines changed: 4704 additions & 17 deletions

‎.github/workflows/docs.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'npm'
33+
cache-dependency-path: docs/package-lock.json
34+
35+
- name: Install dependencies
36+
working-directory: docs
37+
run: npm ci
38+
39+
- name: Build
40+
working-directory: docs
41+
run: npm run build
42+
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: docs/out
50+
51+
deploy:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4
61+

‎README.md‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,6 @@
2525
</a>
2626
</p>
2727

28-
## Table of Contents
29-
30-
- [Overview](#overview)
31-
- [Quick Setup](#quick-setup)
32-
- [REPL Environments](#repl-environments)
33-
- [Local Environments](#local-environments)
34-
- [Docker](#docker-img-srcgithubcomdockerpng-altdocker-height20-stylevertical-align-middle-requires-docker-installed)
35-
- [Isolated Environments](#isolated-environments)
36-
- [Modal Sandboxes](#modal-sandboxes-img-srcgithubcommodal-labspng-altmodal-height20-stylevertical-align-middle)
37-
- [Prime Intellect Sandboxes](#prime-intellect-sandboxes-img-srcgithubcomprimeintellect-aipng-altprime-intellect-height20-stylevertical-align-middle)
38-
- [Model Providers](#model-providers)
39-
- [Relevant Reading](#relevant-reading)
40-
- [Optional Debugging: Visualizing RLM Trajectories](#optional-debugging-visualizing-rlm-trajectories)
41-
4228
## Overview
4329
Recursive Language Models (RLMs) are a task-agnostic inference paradigm for language models (LMs) to handle near-infinite length contexts by enabling the LM to *programmatically* examine, decompose, and recursively call itself over its input. RLMs replace the canonical `llm.completion(prompt, model)` call with a `rlm.completion(prompt, model)` call. RLMs offload the context as a variable in a REPL environment that the LM can interact with and launch sub-LM calls inside of.
4430

@@ -70,16 +56,16 @@ The default RLM object uses a REPL environment that runs on the host process thr
7056
from rlm import RLM
7157

7258
rlm = RLM(
73-
backend="portkey",
74-
backend_kwargs={"model_name": "@openai/gpt-5-nano"},
59+
backend="openai",
60+
backend_kwargs={"model_name": "gpt-5-nano"},
7561
verbose=True, # For printing to console with rich, disabled by default.
7662
)
7763

7864
print(rlm.completion("Print me the first 100 powers of two, each on a newline.").response)
7965
```
8066

8167
## REPL Environments
82-
We support two types of REPL environments -- isolated, and non-isolated. Non-isolated environments (default) run code execution on the same machine as the RLM (e.g. through `exec`), which is relatively safe but can potentially be problematic. Fully isolated environments used Cloud-based sandboxes (e.g. Prime Sandboxes, [Modal Sandboxes](https://modal.com/docs/guide/sandboxes)) to run code generated by the RLM, ensuring completely isolation from the host process. Environments can be added, but we natively support the following: `local` (default), `modal`, `prime`.
68+
We support two types of REPL environments -- isolated, and non-isolated. Non-isolated environments (default) run code execution on the same machine as the RLM (e.g. through `exec`), which is pretty reasonable for some local low-risk tasks, like simple benchmarking, but can be problematic if the prompts or tool calls can interact with malicious users. Fully isolated environments used Cloud-based sandboxes (e.g. Prime Sandboxes, [Modal Sandboxes](https://modal.com/docs/guide/sandboxes)) to run code generated by the RLM, ensuring completely isolation from the host process. Environments can be added, but we natively support the following: `local` (default), `modal`, `prime`.
8369

8470
```python
8571
rlm = RLM(

‎docs/.gitignore‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# dependencies
2+
node_modules/
3+
/.pnp
4+
.pnp.js
5+
6+
# testing
7+
/coverage
8+
9+
# next.js
10+
/.next/
11+
/out/
12+
13+
# production
14+
/build
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
20+
# debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# local env files
26+
.env*.local
27+
.env
28+
29+
# vercel
30+
.vercel
31+
32+
# typescript
33+
*.tsbuildinfo
34+
next-env.d.ts
35+

0 commit comments

Comments
 (0)