title: DiJiang: Efficient Large Language Models through Compact Kernelization
summary: In an effort to reduce the computational load of Transformers, research on
  linear attention has gained significant momentum. However, the improvement
  strategies for attention mechanisms typically necessitate extensive retraining,
  which is impractical for large language models with a vast array of parameters.
  In this paper, we present DiJiang, a novel Frequency Domain Kernelization
  approach that enables the transformation of a pre-trained vanilla Transformer
  into a linear complexity model with little training costs. By employing a
  weighted Quasi-Monte Carlo method for sampling, the proposed approach
  theoretically offers superior approximation efficiency. To further reduce the
  training computational complexity, our kernelization is based on Discrete
  Cosine Transform (DCT) operations. Extensive experiments demonstrate that the
  proposed method achieves comparable performance to the original Transformer,
  but with significantly reduced training costs and much faster inference speeds.
  Our DiJiang-7B achieves comparable performance with LLaMA2-7B on various
  benchmark while requires only about 1/50 training cost. Code is available at
  https://github.com/YuchuanTian/DiJiang.
paper_authors._id: 660a3f8ac50f8393c512058a
paper_authors.name: Hanting Chen
paper_authors._id: 660a3f8ac50f8393c512058b
paper_authors.name: Zhicheng Liu
paper_authors._id: 660a3f8ac50f8393c512058c
paper_authors.name: Xutao Wang
paper_authors._id: 660a3f8ac50f8393c512058d
paper_authors.name: Yuchuan Tian
paper_authors._id: 660a3f8ac50f8393c512058e
paper_authors.name: Yunhe Wang
paper_title: DiJiang: Efficient Large Language Models through Compact Kernelization
paper_summary: In an effort to reduce the computational load of Transformers, research on
  linear attention has gained significant momentum. However, the improvement
  strategies for attention mechanisms typically necessitate extensive retraining,
  which is impractical for large language models with a vast array of parameters.
  In this paper, we present DiJiang, a novel Frequency Domain Kernelization
  approach that enables the transformation of a pre-trained vanilla Transformer
  into a linear complexity model with little training costs. By employing a
  weighted Quasi-Monte Carlo method for sampling, the proposed approach
  theoretically offers superior approximation efficiency. To further reduce the
  training computational complexity, our kernelization is based on Discrete
  Cosine Transform (DCT) operations. Extensive experiments demonstrate that the
  proposed method achieves comparable performance to the original Transformer,
  but with significantly reduced training costs and much faster inference speeds.
  Our DiJiang-7B achieves comparable performance with LLaMA2-7B on various
  benchmark while requires only about 1/50 training cost. Code is available at
  https://github.com/YuchuanTian/DiJiang.
paper_ai_summary: DiJiang, a Frequency Domain Kernelization approach, reduces the computational load of pre-trained Transformers with little additional training, achieving comparable performance to vanilla Transformers with significantly lower costs and faster inference.
paper_ai_keywords: linear attention Quasi-Monte Carlo method Discrete Cosine Transform (DCT) Frequency Domain Kernelization DiJiang LLaMA2-7B