Which layer, how many times?

Per-token layer looping in a frozen LLM, routed one token early from interpretable signals.

Storyboard

  1. Fixed depth.

    Standard decoding sends every token through every layer exactly once.

  2. A second pass.

    Repeating one layer ℓ k times for a single token can lower its next-token loss without touching the weights.

  3. The oracle.

    Brute-force every (ℓ, k) per token and record ΔNLL. Hard tokens such as numbers gain from middle-layer repeats; most tokens gain nothing.

  4. Diagonal swap.

    Only position t's own key and value change; every other position keeps its base-pass K/V. One config then costs about one forward pass.

  5. Decide one token early.

    A small router reads token t−1's logit-lens entropy, update norms and attention entropy, and fixes token t's route before its pass begins.

  6. Accuracy vs compute.

    Sweeping λ in −ΔNLL − λ·(extra layers) traces a Pareto frontier for the oracle, same-token router, t−1 routers and the best static config.

Curve shapes and heatmap values are illustrative, not results.