Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

MERGE: Fast Private Text Generation

About

The drastic increase in language models' parameters has led to a new trend of deploying models in cloud servers, raising growing concerns about private inference for Transformer-based models. Existing two-party privacy-preserving techniques, however, only take into account natural language understanding (NLU) scenarios. Private inference in natural language generation (NLG), crucial for applications like translation and code completion, remains underexplored.In addition, previous privacy-preserving techniques suffer from convergence issues during model training and exhibit poor inference speed when used with NLG models due to the neglect of time-consuming operations in auto-regressive generations. To address these issues, we propose a fast private text generation framework for Transformer-based language models, namely MERGE.MERGE reuses the output hidden state as the word embedding to bypass the embedding computation and reorganize the linear operations in the Transformer module to accelerate the forward procedure. Extensive experiments show that MERGE achieves a 26.5x speedup to the vanilla encrypted model under the sequence length 512, and reduces 80\% communication cost, with an up to 10x speedup to state-of-the-art approximated models.

Zi Liang, Pinghui Wang, Ruofei Zhang, Nuo Xu, Lifeng Xing, Shuo Zhang• 2023

Related benchmarks

TaskDatasetResultRank
Private InferenceGPT2-base (124M)
Embed Inference Time (s)5.17
7
Private InferenceT5 138M
Embed Inference Time (s)7.62
7
Private text generationGPT2-base (124M)
Usage Fraction87.39
7
Private text generationT5 138M
Memory Fraction67.79
7
Text GenerationMultiWoz NLG (test)
BERTScore0.9268
6
Text GenerationCommonGen (test)
BERTScore0.9083
6
Text GenerationDailyDialog (test)
BERTscore0.8343
6
Showing 7 of 7 rows

Other info

Code

Follow for update