Test a sparse-attention hypothesis with a fair baseline: each position averages only the most recent window tokens.
Required APIdef sparse_attention(values, window):
return outputsBehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
sparse_attention([1.0, 3.0, 5.0], 2)sparsity changes context width, not output length
sparse_attention([1.0, 3.0], 1)the smallest sparse window is local identity
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.