English

Dynamic Layer Tying for Parameter-Efficient Transformers

Machine Learning 2024-01-24 v1 Artificial Intelligence

Abstract

In the pursuit of reducing the number of trainable parameters in deep transformer networks, we employ Reinforcement Learning to dynamically select layers during training and tie them together. Every few iterations, the RL agent is asked whether to train each layer ii independently or to copy the weights of a previous layer j<ij<i. This facilitates weight sharing, reduces the number of trainable parameters, and also serves as an effective regularization technique. Experimental evaluations validate that our model modestly outperforms the baseline transformer model with regard to perplexity and drastically reduces the number of trainable parameters. In particular, the memory consumption during training is up to one order of magnitude less than the conventional training method.

Keywords

Cite

@article{arxiv.2401.12819,
  title  = {Dynamic Layer Tying for Parameter-Efficient Transformers},
  author = {Tamir David Hay and Lior Wolf},
  journal= {arXiv preprint arXiv:2401.12819},
  year   = {2024}
}