Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Paper page - Cartridges: Lightweight and general-purpose long context representations via self-study
[go: Go Back, main page]

Librarian Bot. I found the following papers similar to this paper.

\n

The following papers were recommended by the Semantic Scholar API

\n\n

Please give a thumbs up to this comment if you found it helpful!

\n

If you want recommendations for any Paper on Hugging Face checkout this Space

\n

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: \n\n@librarian-bot\n\t recommend

\n","updatedAt":"2025-06-11T01:36:17.118Z","author":{"_id":"63d3e0e8ff1384ce6c5dd17d","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1674830754237-63d3e0e8ff1384ce6c5dd17d.jpeg","fullname":"Librarian Bot (Bot)","name":"librarian-bot","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":318,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.6867257952690125},"editors":["librarian-bot"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/1674830754237-63d3e0e8ff1384ce6c5dd17d.jpeg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2506.06266","authors":[{"_id":"6847b4b43ec10bdd8ab4df33","user":{"_id":"6337537b267cee4d068f604d","avatarUrl":"/avatars/15267f0759a6570c98ee6a150558fcc0.svg","isPro":false,"fullname":"Sabri Eyuboglu","user":"sabrieyuboglu","type":"user"},"name":"Sabri Eyuboglu","status":"extracted_pending","statusLastChangedAt":"2025-06-10T04:29:41.818Z","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df34","name":"Ryan Ehrlich","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df35","user":{"_id":"62703f4bbd9c82ff64c2f99f","avatarUrl":"/avatars/8ed16c6b38a06fd009c39d26f279a6a9.svg","isPro":false,"fullname":"Simran","user":"simarora","type":"user"},"name":"Simran Arora","status":"claimed_verified","statusLastChangedAt":"2025-08-20T08:53:47.625Z","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df36","name":"Neel Guha","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df37","name":"Dylan Zinsley","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df38","name":"Emily Liu","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df39","name":"Will Tennien","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df3a","name":"Atri Rudra","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df3b","name":"James Zou","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df3c","name":"Azalia Mirhoseini","hidden":false},{"_id":"6847b4b43ec10bdd8ab4df3d","name":"Christopher Re","hidden":false}],"publishedAt":"2025-06-06T17:48:23.000Z","submittedOnDailyAt":"2025-06-10T03:02:08.278Z","title":"Cartridges: Lightweight and general-purpose long context representations\n via self-study","submittedOnDailyBy":{"_id":"6337537b267cee4d068f604d","avatarUrl":"/avatars/15267f0759a6570c98ee6a150558fcc0.svg","isPro":false,"fullname":"Sabri Eyuboglu","user":"sabrieyuboglu","type":"user"},"summary":"Large language models are often used to answer queries grounded in large text\ncorpora (e.g. codebases, legal documents, or chat histories) by placing the\nentire corpus in the context window and leveraging in-context learning (ICL).\nAlthough current models support contexts of 100K-1M tokens, this setup is\ncostly to serve because the memory consumption of the KV cache scales with\ninput length. We explore an alternative: training a smaller KV cache offline on\neach corpus. At inference time, we load this trained KV cache, which we call a\nCartridge, and decode a response. Critically, the cost of training a Cartridge\ncan be amortized across all the queries referencing the same corpus. However,\nwe find that the naive approach of training the Cartridge with next-token\nprediction on the corpus is not competitive with ICL. Instead, we propose\nself-study, a training recipe in which we generate synthetic conversations\nabout the corpus and train the Cartridge with a context-distillation objective.\nWe find that Cartridges trained with self-study replicate the functionality of\nICL, while being significantly cheaper to serve. On challenging long-context\nbenchmarks, Cartridges trained with self-study match ICL performance while\nusing 38.6x less memory and enabling 26.4x higher throughput. Self-study also\nextends the model's effective context length (e.g. from 128k to 484k tokens on\nMTOB) and surprisingly, leads to Cartridges that can be composed at inference\ntime without retraining.","upvotes":7,"discussionId":"6847b4b43ec10bdd8ab4df3e","projectPage":"https://hazyresearch.stanford.edu/blog/2025-06-08-cartridges","githubRepo":"https://github.com/HazyResearch/cartridges","githubRepoAddedBy":"user","ai_summary":"Training a smaller, offline KV cache (Cartridge) with a context-distillation objective (self-study) for large language models reduces serving costs, matches ICL performance, and extends effective context length.","ai_keywords":["KV cache","Cartridge","in-context learning (ICL)","self-study","context-distillation objective","MTOB"],"githubStars":240},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"64b764bffdb702b3d8640610","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/64b764bffdb702b3d8640610/lpHg0AX_NOmzw-ZxeOa1s.png","isPro":false,"fullname":"haoxintong","user":"haoxintong","type":"user"},{"_id":"6337537b267cee4d068f604d","avatarUrl":"/avatars/15267f0759a6570c98ee6a150558fcc0.svg","isPro":false,"fullname":"Sabri Eyuboglu","user":"sabrieyuboglu","type":"user"},{"_id":"620783f24e28382272337ba4","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/620783f24e28382272337ba4/zkUveQPNiDfYjgGhuFErj.jpeg","isPro":false,"fullname":"GuoLiangTang","user":"Tommy930","type":"user"},{"_id":"648eb1eb59c4e5c87dc116e0","avatarUrl":"/avatars/c636cea39c2c0937f01398c94ead5dad.svg","isPro":false,"fullname":"fdsqefsgergd","user":"T-representer","type":"user"},{"_id":"6478b88275a9a0cfabd21361","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/NBHs1cLh4_rd3DP19z5L_.jpeg","isPro":true,"fullname":"Michael Wellfare","user":"MikeTronix","type":"user"},{"_id":"62703f4bbd9c82ff64c2f99f","avatarUrl":"/avatars/8ed16c6b38a06fd009c39d26f279a6a9.svg","isPro":false,"fullname":"Simran","user":"simarora","type":"user"},{"_id":"629f3b18ee05727ce328ccbe","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1669189789447-629f3b18ee05727ce328ccbe.jpeg","isPro":false,"fullname":"Kashif Rasul","user":"kashif","type":"user"}],"acceptLanguages":["*"],"dailyPaperRank":0}">
Papers
arxiv:2506.06266

Cartridges: Lightweight and general-purpose long context representations via self-study

Published on Jun 6, 2025
· Submitted by
Sabri Eyuboglu
on Jun 10, 2025
Authors:
,
,
,
,
,
,
,
,

Abstract

Training a smaller, offline KV cache (Cartridge) with a context-distillation objective (self-study) for large language models reduces serving costs, matches ICL performance, and extends effective context length.

AI-generated summary

Large language models are often used to answer queries grounded in large text corpora (e.g. codebases, legal documents, or chat histories) by placing the entire corpus in the context window and leveraging in-context learning (ICL). Although current models support contexts of 100K-1M tokens, this setup is costly to serve because the memory consumption of the KV cache scales with input length. We explore an alternative: training a smaller KV cache offline on each corpus. At inference time, we load this trained KV cache, which we call a Cartridge, and decode a response. Critically, the cost of training a Cartridge can be amortized across all the queries referencing the same corpus. However, we find that the naive approach of training the Cartridge with next-token prediction on the corpus is not competitive with ICL. Instead, we propose self-study, a training recipe in which we generate synthetic conversations about the corpus and train the Cartridge with a context-distillation objective. We find that Cartridges trained with self-study replicate the functionality of ICL, while being significantly cheaper to serve. On challenging long-context benchmarks, Cartridges trained with self-study match ICL performance while using 38.6x less memory and enabling 26.4x higher throughput. Self-study also extends the model's effective context length (e.g. from 128k to 484k tokens on MTOB) and surprisingly, leads to Cartridges that can be composed at inference time without retraining.

Community

Paper author Paper submitter

When we put lots of text (e.g. a whole code repo) into a language model’s context, generation cost soars because of the KV cache’s size. What if we trained a smaller KV cache for our documents offline? Using a test-time training recipe called self-study, we show that this simple idea can improve throughput by 26x while maintaining quality.

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2506.06266 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2506.06266 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2506.06266 in a Space README.md to link it from this page.

Collections including this paper 1