TaskFusion: An Efficient Transfer Learning Architecture with Dual Delta Sparsity for Multi-Task Natural Language Processing
Open Access
- 17 June 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-14
Abstract
The combination of pre-trained models and task-specific fine-tuning schemes, such as BERT, has achieved great success in various natural language processing (NLP) tasks. However, the large memory and computation costs of such models make it challenging to deploy them in edge devices. Moreover, in real-world applications like chatbots, multiple NLP tasks need to be processed together to achieve higher response credibility. Running multiple NLP tasks with specialized models for each task increases the latency and memory cost latency linearly with the number of tasks. Though there have been recent works on parameter-shared tuning that aim to reduce the total parameter size by partially sharing weights among multiple tasks, computation remains intensive and redundant despite different tasks using the same input. In this work, we identify that a significant portion of activations and weights can be reused among different tasks, to reduce cost and latency for efficient multi-task NLP. Specifically, we propose TaskFusion, an efficient transfer learning software-hardware co-design that exploits delta sparsity in both weights and activations to boost data sharing among tasks. For training, TaskFusion uses ℓ1 regularization on delta activation to learn inter-task data redundancies. A novel hardware-aware sub-task inference algorithm is proposed to exploit the dual delta sparsity. We then designed a dedicated heterogeneous architecture to accelerate multi-task inference with an optimized scheduling to increase hardware utilization and reduce off-chip memory access. Extensive experiments demonstrate that TaskFusion can reduce the number of floating point operations (FLOPs) by over 73% in multi-task NLP with negligible accuracy loss, while adding a new task at the cost of only < 2% parameter size increase. With the proposed architecture and optimized scheduling, Task-Fusion can achieve 1.48--2.43× performance and 1.62--3.77× energy efficiency than those using state-of-the-art single-task accelerators for multi-task NLP applications.Keywords
This publication has 21 references indexed in Scilit:
- Tensaurus: A Versatile Accelerator for Mixed Sparse-Dense Tensor Computations2020
- Neural Network Acceptability JudgmentsTransactions of the Association for Computational Linguistics, 2019
- ExTensor2019
- SparTen2019
- OuterSPACE: An Outer Product Based Sparse Matrix Multiplication Accelerator2018
- In-Datacenter Performance Analysis of a Tensor Processing Unit2017
- Cambricon-X: An accelerator for sparse neural networks2016
- EIEACM SIGARCH Computer Architecture News, 2016
- A Survey on Transfer LearningIEEE Transactions on Knowledge and Data Engineering, 2009
- Regression Shrinkage and Selection Via the LassoJournal of the Royal Statistical Society Series B: Statistical Methodology, 1996