Reproduce “CoMem: Context Management with A Decoupled Long-Context Model” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yuwei Zhang, Chengyu Dong, Shuowei Jin, Changlong Yu, Hejie Cui, Hongye Jin, Xinyang Zhang, Hamed Bonab and 6 more

COMEM introduces a decoupled architecture for large language model agents, employing a lightweight memory model for asynchronous history summarization and a separate agent model for policy generation. This framework significantly reduces inference latency and GPU KV cache usage, achieving up to 2.08x speedups while preserving or improving task performance on long-horizon agentic tasks.

Key insights

  • Decoupling context summarization from agent policy generation enables the main agent model to operate with a smaller, bounded effective context, thus mitigating memory-bound inference bottlenecks.
  • Asynchronous execution of the memory model is critical for achieving net latency reductions, as it allows for the overlapping of memory processing with agent execution cycles.
  • Optimizing memory model training with an action-consistency reward ensures the compressed summaries are functionally equivalent to full context for agent decision-making, offering a practical alternative to generic summarization or online environment interactions.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.