CLLGMar 29, 2024

DiJiang: Efficient Large Language Models through Compact Kernelization

arXiv:2403.19928v212 citationsh-index: 27Has CodeICML
Originality Incremental advance
AI Analysis

This addresses the problem of impractical retraining costs for large language models, offering an incremental efficiency improvement for AI practitioners.

The paper tackles the high computational cost of training large language models by introducing DiJiang, a method that transforms pre-trained Transformers into linear complexity models with minimal retraining, achieving comparable performance to LLaMA2-7B with about 1/50 the training cost.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes