Hopscotch: Discovering and Skipping Redundancies in Language Models

Mustafa Eyceoz, N. Nayak, Hao Wang, Ligong Han, Akash Srivastava

Introduction

Modern Large Language Models (LLMs) achieve state-of-the-art performance by stacking dozens of transformer blocks. However, this depth comes with a significant computational cost, particularly due to the self-attention mechanism, which scales quadratically with sequence length. While "scaling laws" suggest that more layers generally improve performance, recent research indicates that many of these blocks may be redundant or contribute minimally to the final output.

Simply deleting layers typically results in a "distribution shift," where the mathematical representations expected by subsequent layers are altered, leading to a catastrophic collapse in model performance. This paper introduces Hopscotch, a post-training method designed to identify and skip redundant attention blocks while maintaining model integrity through lightweight feature scaling.

The Hopscotch Framework

Hopscotch utilizes a two-stage pipeline for structural pruning that avoids the need for expensive retraining on massive datasets.

1. Greedy Iterative Selection

Rather than relying on heuristics, Hopscotch employs a "proxy" loss to determine which blocks are most expendable. The method runs a single, high-learning-rate optimization epoch to estimate the impact of removing each individual attention block. It iteratively removes the block that results in the lowest loss increase until the target pruning level is reached.

Average loss increases as more attention blocks are removed, showing a manageable linear trend before hitting a performance "elbow."

2. Learned Feature Scaling and Self-Distillation

To mitigate the distribution shift caused by missing layers, Hopscotch introduces four trainable scalar parameters to every remaining layer. These scalars adjust the attention output, the MLP output, and the two residual connections. The model is then "healed" using self-distillation, where these tiny scaling factors are trained to match the original model's greedy outputs. This process ensures the pruned model's internal representations remain aligned with the original distribution.

Experimental Results

The authors evaluated Hopscotch across several benchmarks, including GSM8K (math), ARC Challenge (reasoning), and GPQA (science). The results demonstrate that Hopscotch significantly outperforms existing pruning methods like ShortGPT and FinerCut, which often suffer from performance collapse when more than a few blocks are removed.

Comparison of Hopscotch against baselines across multiple benchmarks. Hopscotch maintains high accuracy even with 7 or 10 blocks removed.

Key Performance Metrics:

  • Efficiency: On Llama-3.1-8B, removing 7 attention blocks resulted in a 14.42% reduction in inference time and saved over 1GB of VRAM.
  • Accuracy Retention: The pruned models retained 97-99% of their baseline performance across diverse tasks.
  • Quantization Compatibility: Hopscotch is fully compatible with 4-bit quantization techniques (e.g., GPTQ, AWQ), allowing for cumulative efficiency gains.

Discussion and Insights

A key finding of this work is that how remaining layers are rescaled is often more critical than which specific layers are removed. The authors observed that even random layer removal can yield acceptable results if the Hopscotch scaling factors are applied afterward. Furthermore, analysis using Maximum Mean Discrepancy (MMD) confirmed that the scaling factors successfully "re-center" hidden representations, effectively healing the distribution shift.

Conclusion

Hopscotch provides a robust, post-training solution for increasing LLM inference speed with minimal accuracy loss. By focusing on skipping attention blocks and applying lightweight scaling, it offers a practical path toward more efficient deployment of large-scale models. Future work may extend this approach to skipping MLP blocks or exploring its efficacy on non-causal architectures like State Space Models.

Summary updated

BibTeX
@misc{eyceoz2025hopscotch,
  author = {Mustafa Eyceoz and N. Nayak and Hao Wang and Ligong Han and Akash Srivastava},
  title = {{Hopscotch: Discovering and Skipping Redundancies in Language Models}},
  year = {2025},
  eprint = {2506.03303},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.03303},
}
Figure