Guardado en:
Detalles Bibliográficos
Autores principales: Liu, Junzhang, Liu, Tingkai, Sui, Yueyuan, Xia, Stephen
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:https://arxiv.org/abs/2411.15281
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910710072606720
author Liu, Junzhang
Liu, Tingkai
Sui, Yueyuan
Xia, Stephen
author_facet Liu, Junzhang
Liu, Tingkai
Sui, Yueyuan
Xia, Stephen
contents We introduce ElastiFormer, a post-training technique that adapts pretrained Transformer models into an elastic counterpart with variable inference time compute. ElastiFormer introduces small routing modules (as low as .00006% additional trainable parameters) to dynamically selects subsets of network parameters and input tokens to be processed by each layer of the pretrained network in an inputdependent manner. The routing modules are trained using self-distillation losses to minimize the differences between the output of the pretrained-model and their elastic counterparts. As ElastiFormer makes no assumption regarding the modality of the pretrained Transformer model, it can be readily applied to all modalities covering causal language modeling, image modeling as well as visual-language modeling tasks. We show that 20% to 50% compute saving could be achieved for different components of the transformer layer, which could be further reduced by adding very low rank LoRA weights (rank 1) trained via the same distillation objective. Finally, by comparing routing trained on different subsets of ImageNet, we show that ElastiFormer is robust against the training domain.
format Preprint
id arxiv_https___arxiv_org_abs_2411_15281
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ElastiFormer: Learned Redundancy Reduction in Transformer via Self-Distillation
Liu, Junzhang
Liu, Tingkai
Sui, Yueyuan
Xia, Stephen
Machine Learning
Artificial Intelligence
We introduce ElastiFormer, a post-training technique that adapts pretrained Transformer models into an elastic counterpart with variable inference time compute. ElastiFormer introduces small routing modules (as low as .00006% additional trainable parameters) to dynamically selects subsets of network parameters and input tokens to be processed by each layer of the pretrained network in an inputdependent manner. The routing modules are trained using self-distillation losses to minimize the differences between the output of the pretrained-model and their elastic counterparts. As ElastiFormer makes no assumption regarding the modality of the pretrained Transformer model, it can be readily applied to all modalities covering causal language modeling, image modeling as well as visual-language modeling tasks. We show that 20% to 50% compute saving could be achieved for different components of the transformer layer, which could be further reduced by adding very low rank LoRA weights (rank 1) trained via the same distillation objective. Finally, by comparing routing trained on different subsets of ImageNet, we show that ElastiFormer is robust against the training domain.
title ElastiFormer: Learned Redundancy Reduction in Transformer via Self-Distillation
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2411.15281