DiJiang: Efficient Large Language Models through Compact Kernelization

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Chen, Hanting, Liu, Zhicheng, Wang, Xutao, Tian, Yuchuan, Wang, Yunhe
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929299495321600
author Chen, Hanting
Liu, Zhicheng
Wang, Xutao
Tian, Yuchuan
Wang, Yunhe
author_facet Chen, Hanting
Liu, Zhicheng
Wang, Xutao
Tian, Yuchuan
Wang, Yunhe
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2403_19928
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle DiJiang: Efficient Large Language Models through Compact Kernelization
Chen, Hanting
Liu, Zhicheng
Wang, Xutao
Tian, Yuchuan
Wang, Yunhe
Computation and Language
Machine Learning
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.
title DiJiang: Efficient Large Language Models through Compact Kernelization
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2403.19928