XMerge Compresses LLMs by Merging Layers, Retaining Quality

Jundong Hu, Shekar Ramachandran· September 3, 2026 View original

Key takeaways

  • LLM depth compression often leads to unpredictable quality loss with existing methods.
  • XMerge uses cross-axis selection and local boundary reconstruction to remove layers effectively.
  • It achieves superior performance over baselines, especially at aggressive compression levels.
  • XMerge requires no fine-tuning or architectural changes, making it practical for post-training application.

Who benefits

Cloud ComputingAI/ML DevelopmentEdge AISoftware as a ServiceTelecommunications

Summary

XMerge is a post-training method for LLM depth compression that removes transformer layers while preserving quality. It uses cross-axis selection and local boundary reconstruction to re-fit adjacent blocks, achieving superior performance over baselines without architectural changes or fine-tuning.

Reducing the number of layers in large language models (LLMs) is a common strategy for depth compression, which helps maintain a standard serving architecture and reduces inference costs. However, existing methods often lead to significant and unpredictable quality loss. This paper introduces XMerge, a novel post-training approach designed to overcome these limitations. XMerge operates with two main components. First, it employs a "cross-axis selection" mechanism to identify a block of layers with minimal relative-magnitude and angular hidden-state change, indicating it can be removed with less impact. Second, it uses "local boundary reconstruction" to re-fit the adjacent surviving block, ensuring its output closely matches the original two-block output. Crucially, XMerge requires no task labels, end-to-end fine-tuning, architectural changes, or additional inference-time parameters. Experiments across seven Llama and Qwen models (0.5B-8B) demonstrate that XMerge consistently outperforms five published baselines, especially at aggressive layer reduction levels. It ranks first on multiple aggregate benchmarks and avoids the catastrophic perplexity increases seen in competing methods, making it a robust solution for efficient LLM deployment.

Why it matters

Professionals can deploy smaller, faster, and more cost-effective LLMs without sacrificing significant performance, enabling broader application in resource-constrained environments.

How to implement this in your domain

  1. 1Evaluate current LLM deployment strategies for opportunities to reduce model depth and inference costs.
  2. 2Investigate XMerge as a post-training compression technique for existing Llama and Qwen models.
  3. 3Benchmark the performance and efficiency of XMerge-compressed models against current production models.
  4. 4Integrate layer merging into the model lifecycle management for continuous optimization of deployed LLMs.

Original post by Jundong Hu, Shekar Ramachandran

"arXiv:2609.02083v1 Announce Type: new Abstract: Removing complete transformer layers preserves a standard serving architecture, but existing depth-compression methods can lose substantial quality, and the loss varies unpredictably across models. We introduce XMerge, a post-traini…"

View on X

Originally posted by Jundong Hu, Shekar Ramachandran on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses