Efficient Contextualized Representation: Language Model Pruning for Sequence Labeling

Liyuan Liu, Xiang Ren, Jingbo Shang, Jian Peng, Jiawei Han
4/20/2018
cs.CL
quantization-pruning

Official code: LiyuanLucasLiu/LD-Net (147 stars, Python, Apache-2.0, PyTorch, last commit 2020-02-29).

Abstract

Many efforts have been made to facilitate natural language processing tasks with pre-trained language models (LMs), and brought significant improvements to various applications. To fully leverage the nearly unlimited corpora and capture linguistic information of multifarious levels, large-size LMs are required; but for a specific task, only parts of these information are useful.

Show full abstract

Such large-sized LMs, even in the inference stage, may cause heavy computation workloads, making them too time-consuming for large-scale applications. Here we propose to compress bulky LMs while preserving useful information with regard to a specific task. As different layers of the model keep different information, we develop a layer selection method for model pruning using sparsity-inducing regularization. By introducing the dense connectivity, we can detach any layer without affecting others, and stretch shallow and wide LMs to be deep and narrow. In model training, LMs are learned with layer-wise dropouts for better robustness. Experiments on two benchmark datasets demonstrate the effectiveness of our method.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

Language Model Pruning for Sequence Labeling

14712Python, ShellMar 18, 20186 years agoApache-2.0
contextualized-representationlanguage-modelmodel-compressionnamed-entity-recognitionner+2 more

Similar Papers

Cite this paper

@article{liu2018efficient,
  title  = {Efficient Contextualized Representation: Language Model Pruning for Sequence Labeling},
  author = {Liyuan Liu and Xiang Ren and Jingbo Shang and Jian Peng and Jiawei Han},
  year   = {2018},
  eprint = {1804.07827},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1804.07827}
}

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/1804.07827.svg)](https://codeofpaper.com/paper/1804.07827)

Discussion