📈 GH Trending Explorer 🎲 Surprise me

← all repos

fudan-generative-vision / Remory

git clone https://github.com/fudan-generative-vision/Remory.git

Remory: Learning Residual Memory for Context Compaction

+14
stars, 24h · #1,022
+~98
stars, 7 days · #1,260
+341
stars, 30 days · #1,539
367
★ total · +40% this week
39
forks · 1 open issues

Star history (as recorded here)

2026-10-20 · 327 ★ 2026-10-22 · 367 ★
LanguagePython
LicenseMIT
Created2026-10-07 (15d ago)
Last push2d ago
Watchers19
OwnerOrganization

GitHub topics

Links

README excerpt
REMORY 
 Learning Residual Memory for Context Compaction 
**Remory** supplements an agent's compaction summary with learned soft memory
from its history. The memory is conditioned on the summary and appended after
it, helping the frozen model continue its work across compactions.
## News
- **2026-10-20** — **77 hours of sustained AI research:** From an idea through
 experiments and manuscript revisions.
 With REMORY, a small open model can become a reliable research co-worker.
 https://github.com/user-attachments/assets/a69eb0ed-e65a-442d-a92a-49945f019473
 Music: Origami by Scott Buckley · CC BY 4.0 · Credits & replay details 
- **2026-10-18** — **Online training in r-codex:** `/remory train` learns from
 ongoing Qwen sessions; `/remory load` opens the memory-checkpoint picker.
 Use `/remory status` to follow progress and `/remory stop` to save and stop.
 Qwen stays frozen; selected memory weights apply at the next successful
 compaction. Setup and commands.
- **2026-10-09** — REMORY ranked **#2 Paper of the day** on
 Hugging Face Daily Papers.
https://github.com/user-attachments/assets/b83e4d92-2b32-4f7c-9a8e-cb7e44078955
 Music: Electric Dreams by Scott Buckley · CC BY 4.0 · Credits & edit details 
## Models
| Base model | Memory checkpoint | Deployment |
| --- | --- | --- |
| Qwen3.8-27B | Qwen3.8-27B-REMORY-1.9B | SGLang, Transformers |
| GLM-5.3-Flash | GLM-5.3-Flash-REMORY-1.24B | SGLang |
The GLM release is the 1.24B checkpoint used in local evaluations, distinct from
the 1.502B encoder described in the paper. Both models use the same pinned SGLang
version and launcher. The quick start below uses Qwen.
## Quick Start
Plan for **at least 2 × 80 GB GPUs** to deploy **Qwen3.8-27B + Remory** with
SGLang. The command below loads both models and serves generation and compaction
through one endpoint. See deployment for more options.
### 1. Install
 [code] 
The installer prepares a local environment with the pinned SGLang version,
Remory hook, and CUDA compiler components.
### 2. Launch SGLang with Remory
 [code] 
`--tp 2` splits the LLM across the two GPUs; each worker also loads Remory.
The context window defaults to the model maximum (256K for Qwen3.8-27B).
The first run downloads weights and compiles GPU kernels.
For an existing clone, follow the upgrade instructions.
The launcher downloads the pinned checkpoint automatically.
### 3. Open Codex
In another terminal:
 [code] 
This opens the native Codex UI with Remory compaction. Use `/compact` during a
session and `r-codex resume --last` to return later. Codex is installed on first
use. See Codex for sessions, sub-agents, and MCP tools.
For the research demo's web search and document tools, enable
`--research-tools`. This requires **`SERPER_API_KEY`** and **`MINERU_API_KEY`**
(`MINERU_API_TOKEN` is also accepted), plus the separate Docling/MinerU tool
environment. Run `r-codex tools` to check your setup. See
research tools and API keys
for installation and configuration; local chat and shell/f