MERGE: Fast Private Text Generation

Zi Liang, Pinghui Wang, Ruofei Zhang, Nuo Xu, Lifeng Xing +1 more
5/25/2023
cs.CLcs.AI

No official code found. Best implementation: liangzid/MERGE (8 stars, last commit 2023-12-11).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

liangzid/MERGECommunity100%

A fast private inference framework for LMs and LLMs. AAAI'24

80C, C++Feb 7, 20232 years ago

Cite this paper

@article{liang2023merge,
  title  = {MERGE: Fast Private Text Generation},
  author = {Zi Liang and Pinghui Wang and Ruofei Zhang and Nuo Xu and Lifeng Xing and Shuo Zhang},
  year   = {2023},
  eprint = {2305.15769},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.15769v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.15769.svg)](https://codeofpaper.com/paper/2305.15769)

Discussion