Loading video...
Video Failed to Load
Interesting approach to long context/continual learning here from Baseten at Cursor Compact long trajectories by compressing a prefix of the KV cache using an MLP/autoencoder. You can train this "compactor" MLP by learning to reconstruct activations that the original KV cache would produce on subsequent tokens. This maximally reconstructs... show more
30,031 views • 3 months ago •via X (Twitter)
11 Comments

@cursor_ai

@cursor_ai Go @mudithj! 🚀

@baseten @cursor_ai Long context yeah, but not continual learning.

@baseten @cursor_ai what, to you, is the difference between these

I might be using “continual learning” more narrowly. To me long context is still basically memory during an episode, even if it’s compressed KV cache. Continual learning would mean the system actually changes from experience in a durable way, so future runs are different after the context is gone. This feels like a useful substrate for that, but not quite the thing itself.

@baseten @cursor_ai Both approaches attempt to use information gleaned from past tokens to refine future tokens. This is the essence of learning. They are only distinct insofar as they are different implementation methods with associated resource constraints and performance characteristics.

@baseten @cursor_ai Compressing the KV cache into a trained latent state is the right direction. The open question is whether that compactor stays stable when the task distribution shifts or whether you just trained a very expensive task-specific cache.

@baseten @cursor_ai That is the interesting target: preserve useful KV state without rebuilding the prompt prefix. On constrained GPUs, cache layout is already the practical limiter long before model weights are

@baseten @cursor_ai Training is studying before the exam. Using past tokens is checking the last few lines while writing the next answer. Similar idea, very different bill.

@baseten @cursor_ai wdym it if gets sample efficient? Cartridge training is already more sample efficient than LoRA or RL, just has to be compressed enough to allow for a "normal" context window.

@baseten @cursor_ai 这个思路实操门槛不低。压缩器训练要模型内部 KV cache,API 用户拿不到。如果 1 个月内有人把它跑在 llama.cpp 上开源,agent 长上下文成本能降一个数量级。
