Papers
Topics
Authors
Recent
Search
2000 character limit reached

Alternating Updates for Efficient Transformers

Published 30 Jan 2023 in cs.LG and cs.CL | (2301.13310v2)

Abstract: It has been well established that increasing scale in deep transformer networks leads to improved quality and performance. However, this increase in scale often comes with prohibitive increases in compute cost and inference latency. We introduce Alternating Updates (AltUp), a simple-to-implement method to increase a model's capacity without the computational burden. AltUp enables the widening of the learned representation, i.e., the token embedding, while only incurring a negligible increase in latency. AltUp achieves this by working on a subblock of the widened representation at each layer and using a predict-and-correct mechanism to update the inactivated blocks. We present extensions of AltUp, such as its applicability to the sequence dimension, and demonstrate how AltUp can be synergistically combined with existing approaches, such as Sparse Mixture-of-Experts models, to obtain efficient models with even higher capacity. Our experiments on benchmark transformer models and language tasks demonstrate the consistent effectiveness of AltUp on a diverse set of scenarios. Notably, on SuperGLUE and SQuAD benchmarks, AltUp enables up to 87%87\% speedup relative to the dense baselines at the same accuracy.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (60)
  1. A theoretical view on sparsely activated networks. arXiv preprint arXiv:2208.04461, 2022.
  2. Improving language models by retrieving from trillions of tokens. In International Conference on Machine Learning, pages 2206–2240. PMLR, 2022.
  3. John Charles Butcher. Numerical methods for ordinary differential equations. John Wiley & Sons, 2016.
  4. Towards understanding mixture of experts in deep learning. arXiv preprint arXiv:2208.02813, 2022.
  5. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020.
  6. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022.
  7. Unified scaling laws for routed language models. In International Conference on Machine Learning, pages 4057–4086. PMLR, 2022.
  8. Funnel-transformer: Filtering out sequential redundancy for efficient language processing. Advances in neural information processing systems, 33:4271–4282, 2020.
  9. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022.
  10. Beyond english-centric multilingual machine translation. J. Mach. Learn. Res., 22(107):1–48, 2021.
  11. A review of sparse expert models in deep learning. arXiv preprint arXiv:2209.01667, 2022.
  12. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity, 2021.
  13. Deecap: dynamic early exiting for efficient image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12216–12226, 2022.
  14. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
  15. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471–476, 2016.
  16. Longt5: Efficient text-to-text transformer for long sequences. arXiv preprint arXiv:2112.07916, 2021.
  17. Retrieval augmented language model pre-training. In International Conference on Machine Learning, pages 3929–3938. PMLR, 2020.
  18. Dselect-k: Differentiable selection in the mixture of experts with applications to multi-task learning. Advances in Neural Information Processing Systems, 34:29335–29347, 2021.
  19. Scaling laws for transfer. arXiv preprint arXiv:2102.01293, 2021.
  20. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022.
  21. Dynabert: Dynamic bert with adaptive width and depth. Advances in Neural Information Processing Systems, 33:9782–9793, 2020.
  22. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991.
  23. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv:1705.03551, 2017.
  24. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
  25. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020.
  26. Reducing activation recomputation in large transformer models. Proceedings of Machine Learning and Systems, 5, 2023.
  27. Large memory layers with product keys. Advances in Neural Information Processing Systems, 32, 2019.
  28. Gshard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020.
  29. Base layers: Simplifying training of large, sparse models. In International Conference on Machine Learning, pages 6265–6274. PMLR, 2021.
  30. Cascadebert: Accelerating inference of pre-trained language models via calibrated complete models cascade. arXiv preprint arXiv:2012.14682, 2020.
  31. Lost in pruning: The effects of pruning neural networks beyond test accuracy. Proceedings of Machine Learning and Systems, 3:93–138, 2021.
  32. Deja vu: Contextual sparsity for efficient llms at inference time. In International Conference on Machine Learning, pages 22137–22176. PMLR, 2023.
  33. Sparse, dense, and attentional representations for text retrieval. Transactions of the Association for Computational Linguistics, 9:329–345, 2021.
  34. In defense of dual-encoders for neural ranking. In International Conference on Machine Learning, pages 15376–15400. PMLR, 2022.
  35. Sketch based memory for neural networks. In International Conference on Artificial Intelligence and Statistics, pages 3169–3177. PMLR, 2021.
  36. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.
  37. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(140):1–67, 2020.
  38. Deepspeed-moe: Advancing mixture-of-experts inference and training to power next-generation ai scale. In International Conference on Machine Learning, pages 18332–18346. PMLR, 2022.
  39. Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016.
  40. Scaling vision with sparse mixture of experts. Advances in Neural Information Processing Systems, 34:8583–8595, 2021.
  41. Scaling up models and data with t5x and seqio. arXiv preprint arXiv:2203.17189, 2022.
  42. How much knowledge can you pack into the parameters of a language model? arXiv preprint arXiv:2002.08910, 2020.
  43. Hash layers for large sparse models. Advances in Neural Information Processing Systems, 34:17555–17566, 2021.
  44. Confident adaptive language modeling. arXiv preprint arXiv:2207.07061, 2022.
  45. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
  46. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pages 4596–4604. PMLR, 2018.
  47. Efficient transformers: A survey. ACM Computing Surveys (CSUR), 2020.
  48. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017.
  49. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems, 32, 2019.
  50. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2018.
  51. Residual mixture of experts. arXiv preprint arXiv:2204.09636, 2022.
  52. Memformer: The memory-augmented transformer. arXiv preprint arXiv:2010.06891, 2020.
  53. Memorizing transformers. arXiv preprint arXiv:2203.08913, 2022.
  54. Feature learning in infinite-width neural networks. arXiv preprint arXiv:2011.14522, 2020.
  55. Zeroquant: Efficient and affordable post-training quantization for large-scale transformers. Advances in Neural Information Processing Systems, 35:27168–27183, 2022.
  56. Coca: Contrastive captioners are image-text foundation models. arXiv preprint arXiv:2205.01917, 2022.
  57. Twenty years of mixture of experts. IEEE transactions on neural networks and learning systems, 23(8):1177–1193, 2012.
  58. Big bird: Transformers for longer sequences. Advances in neural information processing systems, 33:17283–17297, 2020.
  59. Mixture-of-experts with expert choice routing. arXiv preprint arXiv:2202.09368, 2022.
  60. Designing effective sparse expert models. arXiv preprint arXiv:2202.08906, 2022.
Citations (4)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Tweets

Sign up for free to view the 5 tweets with 946 likes about this paper.