Skip to Main Content

Small code models forget distant code, and keeping every token in memory is expensive. scopesum asks a simple question: can a learned summary token at the end of every function and class let Gemma 4 reach far-away code cheaply? We retrofitted summary tokens into Gemma 4 E2B without changing its vocabulary, using custom attention masks and LoRA fine-tuning, backed by 123 tests. We then ran a controlled study: ten model variants, matched for token count and memory, two training seeds each, 20 training runs in total, all on free Kaggle GPUs. The results were clear. The model ignores the summaries, because Gemma's global layers already read distant code directly. When we removed that shortcut, long-range accuracy dropped sharply and the summaries still did not bring it back. Keeping real tokens worked better: function signatures helped a little, and keeping separator tokens, as SepLLM does, worked best, at a higher memory cost. Our wins: a working retrofit, a precise explanation of why summaries fail in hybrid models, a memory design that cuts the cache 34 times at 128k tokens, and summaries that describe functions far better than fixed chunks. The demo shows every model's answer to the same real bug report.

Team

saurav12367

More from Meta Global AI Developer Hackathon

Cardo turns the world around you into Kurdish flashcards. Kurdish is spoken by tens of millions of people, but it has very few learning tools, and most…

Kurdolingo project preview

oqed is an LLM-guided superoptimizer for x86-64. You point it at a C or C++ project and it does the rest: - builds the project and runs its workload…

oqed project preview

Playtest Agent plays a game from screenshots, looks for bugs, then replays each report and has a judge check it. I make games alone. Solo developers and…

Adrian project preview

Open-source npm malware detection on Meta's models: a live monitor that flags new malware about a day before the public lists, a Muse agent that investigates…

Gatekeeper project preview

Video2URDF turns one short phone video of a real articulated object (a laptop lid, a drawer, a desk lamp, a microwave door) into a measured URDF/MJCF a robot…

Video2URDF project preview

Glimmer Scope opens up Muse Glimmer 30B so you can see and steer the concepts it thinks with. I trained sparse autoencoders on nine layers of Glimmer's…

Kroonen AI project preview