Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Flashloop Lazy Updates

ASecurity

FlashLoop methodology — training-free inference acceleration for Looped Transformers via lazy/sparse updates and KV-residual quantization. Use when: (1) accelerating looped/recurrent Transformer inference that re-runs shared blocks, (2) KV-cache memory grows linearly with loop depth, (3) reducing cross-loop computational redundancy without retraining. Keywords: looped transformer, lazy update, KV-cache compression, sparse attention, inference speedup.

3 stars
0 votes
0 copies
0 views
Added 9/28/2026
research

Security Analysis

A100/100

Scanned 9/28/2026

$npx -y skills add hiyenwong/ai_collection --skill flashloop-lazy-updates --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flashloop Lazy Updates?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Flashloop Lazy Updates
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hiyenwong-flashloop-lazy-updates/badge)](https://www.skillsdirectory.com/skills/hiyenwong-flashloop-lazy-updates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Files
SKILL.md
---
name: flashloop-lazy-updates
version: v1.0.0
last_updated: 2026-09-26
description: "FlashLoop methodology — training-free inference acceleration for Looped Transformers via lazy/sparse updates and KV-residual quantization. Use when: (1) accelerating looped/recurrent Transformer inference that re-runs shared blocks, (2) KV-cache memory grows linearly with loop depth, (3) reducing cross-loop computational redundancy without retraining. Keywords: looped transformer, lazy update, KV-cache compression, sparse attention, inference speedup."
arxiv_id: "2609.29812"
authors: "Wanqi Yang, Shiwei Liu"
tags: [looped-transformer, inference-efficiency, kv-cache, sparse-attention, quantization]
---

# FlashLoop: Lazy Updates for Looped Transformers

From arXiv:2609.29812 (2026-09-24).

## Problem

Looped Transformers reuse shared blocks to trade parameters for compute depth. But naive looping multiplies cost: each loop iteration is another full Transformer pass requiring another set of cached KV states, so **inference FLOPs and KV-cache memory grow linearly with loop depth**. Parameter efficiency never translates into inference efficiency.

## Core Insight: Cross-Loop Redundancy

As recurrence proceeds, three empirical regularities emerge:

1. **Token-sparse state changes**: hidden-state deltas between adjacent loops concentrate on a small subset of tokens. Most tokens' states stabilize after a few loops.
2. **Sparse stable attention keys**: attention-output differences between loops are dominated by a small, stable subset of key columns — most key columns contribute nearly identically across loops.
3. **Low-bit-friendly KV residuals**: KV-cache residuals between adjacent loops become progressively more amenable to low-bit quantization as loops proceed (the residual magnitude distribution sharpens).

## Method: Three Training-Free Components

### 1. Token-Sparse Updates
- Track per-token state-change magnitude between loop `t-1` and `t`
- Only re-run the block for tokens whose change exceeds threshold; carry frozen states for the rest
- Threshold can adapt per loop: early loops update most tokens, late loops update few

### 2. Sparse Attention
- Identify the stable key-column set across adjacent loops
- Only recompute attention against changed key columns; reuse cached outputs for stable ones

### 3. KV-Residual Quantization
- Instead of caching full KV per loop, store `KV_t - KV_{t-1}` residuals
- Quantize residuals to low-bit (aggressiveness increases with loop index)
- Reconstruct any loop's KV by accumulating quantized residuals

## Results

- Up to **1.64× end-to-end speedup** and **6× KV-cache memory reduction**
- Lossless accuracy across several Looped Transformer models
- Scales looped models to greater depth and longer context

## Reusable Pattern

**Lazy recomputation for iterative inference**: whenever an architecture iterates a function over the same state (loops, recurrent depth, iterative refinement, diffusion steps), audit *what actually changes between iterations*. If deltas concentrate on a sparse subset (tokens, positions, components), you can skip stable regions, cache residual diffs instead of full states, and quantize late-stage residuals more aggressively. The general recipe: measure inter-iteration delta distribution → threshold-gate recomputation → store deltas rather than snapshots.

## Resources

- Paper: https://arxiv.org/abs/2609.29812
- Contrast with `training-free-looped-transformers` skill (that one adds loops to frozen LLMs for reasoning; this one makes existing loops cheap)

Attribution

hiyenwonghiyenwong
View sourceSee grades on GitHubMore from hiyenwong →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Competitor Analysis

This skill provides comprehensive analysis of competitor SEO and GEO strategies, revealing what's working in your market and identifying opportunities to outperform the competition.

1823 votes

Deep Research

Universal deep research agent team. 13-agent pipeline for rigorous academic research on any topic. 8 modes: full research, quick brief, paper review, lit-review, fact-check, three-way literature scan, Socratic guided research dialogue, and systematic review with optional meta-analysis. Covers research question formulation, Socratic mentoring, methodology design, systematic literature search, source verification, cross-source synthesis, risk of bias assessment, meta-analysis, APA 7.0 report co...

502942 votes

Paperclip Distill

Use when an operation issue is a Paperclip cursor-window, distill, or backfill — `operationType: "distill"` or `"backfill"` and the body references a Paperclip source bundle for a project or root issue. Turn raw Paperclip activity into a wiki-insightful project page, decisions log, and history note. This skill exists specifically to replace the stiff, datestamp-heavy templated output that the deterministic distiller produces.

953191 votes

Academic Pipeline

Orchestrator for the full academic research pipeline: research -> write -> integrity check -> review -> revise -> re-review -> re-revise -> final integrity check -> finalize. Coordinates deep-research, academic-paper, and academic-paper-reviewer into a seamless 10-stage workflow with mandatory, coverage-bounded integrity checks, two-stage peer review, and auditable quality-assurance artifacts. Triggers on: academic pipeline, research to paper, full paper workflow, paper pipeline, end-to-end p...

502941 votes

Literature Review

Assistance with writing literature reviews by searching for academic sources via Semantic Scholar, OpenAlex, Crossref and PubMed APIs. Use when the user needs to find papers on a topic, get details for specific DOIs, or draft sections of a literature review with proper citations.

6511 votes
View all in research →