MoDification: Mixture of Depths Made Easy

Chen Zhang, Meizhi Zhong, Qimeng Wang, Xuantao Lu, Zheyu Ye +6 more
10/18/2024
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Long-context efficiency has recently become a trending topic in serving large language models (LLMs). And mixture of depths (MoD) is proposed as a perfect fit to bring down both latency and memory. In this paper, however, we discover that MoD can barely transform existing LLMs without costly training over an extensive number of tokens. To enable the transformations from any LLMs to MoD ones, we showcase top-k operator in MoD should be promoted to threshold-p operator, and refinement to architecture and data should also be crafted along. All these designs form our method termed MoDification. Through a comprehensive set of experiments covering model scales from 3B to 70B, we exhibit MoDification strikes an excellent balance between efficiency and effectiveness. MoDification can achieve up to ~1.2x speedup in latency and ~1.8x reduction in memory compared to original LLMs especially in long-context applications.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2024modification,
  title  = {MoDification: Mixture of Depths Made Easy},
  author = {Chen Zhang and Meizhi Zhong and Qimeng Wang and Xuantao Lu and Zheyu Ye and Chengqiang Lu and Yan Gao and Yao Hu and Kehai Chen and Min Zhang and Dawei Song},
  year   = {2024},
  eprint = {2410.14268},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.14268v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.14268.svg)](https://codeofpaper.com/paper/2410.14268)

Discussion