MemAgent

Normal
GitHub Python Apache-2.0

Description

A MemAgent framework that can extrapolate to 3.5M context tokens, along with a training framework for RL training of any agent workflow.

Key Features

  • Ultra-Long Context Processing: Extrapolate from 8K training context to 3.5M tokens with performance loss under 5%
  • Reinforcement Learning Driven: Trained with RLVR (Reinforcement Learning from Verifiable Rewards), extends DAPO algorithm for end-to-end multi-turn conversation optimization
  • Linear Time Complexity: Breaks through computational bottlenecks in long-text processing with linear resource scaling
  • Plug-and-Play Architecture: Optimize long-context tasks directly through RL training without modifying underlying model architecture
  • Open-Source Model Weights: Provides pre-trained 7B and 14B parameter models available for download on HuggingFace
  • RULER Benchmark: Achieves 95%+ accuracy on 512K RULER tests

Use Cases

💡 Ultra-Long Document QA: Multi-hop reasoning and precise question answering on million-token documents
💡 Large-Scale Codebase Analysis: Context understanding tasks for complete code repositories
💡 Academic Literature Review: Comprehensive analysis and knowledge extraction from massive academic paper collections
💡 Long Conversation Memory Management: Maintain coherence and accuracy of ultra-long contexts across multi-turn conversations

Quick Start

1. Start vLLM server: vllm serve BytedTsinghua-SIA/RL-MemoryAgent-14B --tensor_parallel_size 2
2. Run quickstart script: python quickstart.py --model BytedTsinghua-SIA/RL-MemoryAgent-14B
3. Or use online LLM service: Set URL and API_KEY environment variables and run the script

Related Projects

Related Articles