Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A MemAgent framework that can be extrapolated to 3.5M, along with a training framework for RL training of any agent workflow.
| Date | Stars |
|---|---|
| 2026-07-31 | 1087 |
| 2026-08-06 | 1089 |
Today
+2 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div style="display: flex; justify-content: space-between;">
<img src="figs/seed_logo.png" width="35%">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'/%3E" width="26%">
<img src="figs/gensi.png" width="35%">
</div>
<br>
<div align="center">
<h1 style="display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0;">
MemAgent: Reshaping Long-Context LLM with Multi-Conv RL based Memory Agent
</h1>
[](https://arxiv.org/abs/2507.02259)
[](https://memagent-sialab.github.io/)
[](https://huggingface.co/datasets/BytedTsinghua-SIA/hotpotqa)
[](https://huggingface.co/BytedTsinghua-SIA/RL-MemoryAgent-14B)
</div>
---
> [!IMPORTANT]
>
> **🔥 News!!!**
> - **[2025/07]** We provide a **quickstart** script that makes using **MemAgent** super easy, see the **Quickstart** section below.
> - **[2025/06]** We release **RL-MemAgent-14B** and **RL-MemAgent-7B** models achieving nearly lossless performance on 3.5M token contexts task.
---
## 📖Introduction
We propose a novel long-context processing framework — **MemAgent**, which directly optimizes long-context tasks through end-to-end Reinforcement Learning without altering the underlying model architecture. MemAgent has demonstrated superb long-context capabilities, being able to extrapolate from an 8K context trained on 32K text to a 3.5M QA task with performance loss < 5% and achieves 95%+ accuracy in 512K RULER test.
<div align="center">
<img src="figs/method_00.png" alt="overview" style="width: 66%; height: auto;">
</div>
### Highlights:
- **🚀 Novel memory mechanism** Introduces MemAgent architecture enabling arbitrarily long input processing within fixed context windows, overcoming traditional context window length limitations.
- **⚡ Linear time Complexity** Breaks through computational bottlenecks in long-text processing, achieving linear scaling of resources with text length.
- **🎯 RL-driven extrapolation** Through RL training with MemAgent architecture, enables models to extrapolate to vastly longer texts with minimal performance degradation.
<div align="center">
<img src="figs/main_result_00.png" alt="overview" style="width: 66%; height: auto;">
</div>
### Multi-conv RL Framework
We use Reinforcement Learning from Verifiable Rewards (RLVR) to train MemAgent, extending the DAPO algorithm to support end-to-end optimization of Agent Workflows with multi-turn context-independent conversations.
<img src="figs/algo_00.png" width="49%" style="display:inline-block"> <img src="figs/template.png" width="49%" style="display:inline-block">
### Results
**RL-MemAgent** demonstrates exceptional stability in ultra-long context processing:
- **14B model:** Performance degradation <5.5% on 3.5M token tasks, achieving truly lossless extrapolation.
- **7B model:** Only 11% performance decline in longest contexts, significantly outperforming existing long-context models

## Quickstart
`quickstart.py` offers a straightforward way to begin using MemAgent, supporting both local deployment and integration with online model services.
### vLLM Local Deployment
1. **Start the `vllm` server:**
```bash
vllm serve BytedTsinghua-SIA/RL-MemoryAgent-14B --tensor_parallel_size 2
```
2. **Run `quickstart.py`:**
```bash
python quickstart.py --model BytedTsinghua-SIA/RL-MemoryAgent-14B
```
### Online LLM Service
For online LLM services, you'll need to configure your model endpoint and API key as environment variables.
e.g. `gpt-4Excerpt of 12,181 characters
Read on GitHub11
2
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:8c5651295009f220, desc:training framework