Skip to main content
QUICK REVIEW

[Paper Review] PaDeLLM-NER: Parallel Decoding in Large Language Models for Named Entity Recognition

Jinghui Lu, Ziwei Yang|arXiv (Cornell University)|Feb 7, 2024
Topic ModelingComputer Science5 citations
TL;DR

PaDeLLM-NER speeds up NER inference by parallel decoding of all label-mention pairs in LLMs, reducing output length and latency while maintaining prediction quality.

ABSTRACT

In this study, we aim to reduce generation latency for Named Entity Recognition (NER) with Large Language Models (LLMs). The main cause of high latency in LLMs is the sequential decoding process, which autoregressively generates all labels and mentions for NER, significantly increase the sequence length. To this end, we introduce Parallel Decoding in LLM for NE} (PaDeLLM-NER), a approach that integrates seamlessly into existing generative model frameworks without necessitating additional modules or architectural modifications. PaDeLLM-NER allows for the simultaneous decoding of all mentions, thereby reducing generation latency. Experiments reveal that PaDeLLM-NER significantly increases inference speed that is 1.76 to 10.22 times faster than the autoregressive approach for both English and Chinese. Simultaneously it maintains the quality of predictions as evidenced by the performance that is on par with the state-of-the-art across various datasets.

Motivation & Objective

  • Reduce generation latency for Named Entity Recognition using Large Language Models.
  • Integrate parallel decoding without adding new modules or architectural changes.
  • Maintain or surpass prediction quality across English and Chinese NER datasets.
  • Recast training to support counting mentions per label and identifying nth mentions.
  • Enable aggregation and de-duplication of parallel-decoded label-mention pairs.

Proposed method

  • Reframe instruction-tuning to train LLMs to predict the number of mentions for each label and the nth mention within the input.
  • During inference, first predict the number of mentions per label, then generate all label-mention pairs in parallel and aggregate results.
  • Deduplicate mentions across labels by keeping the highest-probability instance per unique text.
  • Use two inference modes: PaDeLLM Multi (multi-GPU, per-sequence GPU) and PaDeLLM Batch (single GPU with batching).
  • Train with cross-entropy loss over the sequence tokens following the count predictions, ignoring the mention-span tokens as appropriate based on ablation findings.
Figure 1: PaDeLLM-NER training paradigm: texts within frames of the same color represents one training example, where texts inside the solid-line frame are the input, and those inside the dashed-line frame are the output. Italic texts are prompt templates. The “entity type” signifies the label being
Figure 1: PaDeLLM-NER training paradigm: texts within frames of the same color represents one training example, where texts inside the solid-line frame are the input, and those inside the dashed-line frame are the output. Italic texts are prompt templates. The “entity type” signifies the label being

Experimental results

Research questions

  • RQ1Can parallel decoding of label-mention pairs reduce NER inference latency without sacrificing accuracy?
  • RQ2How does the two-step counting-and-mention strategy impact prediction quality for English and Chinese NER datasets?
  • RQ3What is the effect of de-duplication on precision, recall, and overall F1 in multi-label NER outputs?
  • RQ4How do PaDeLLM-NER’s speedups compare to autoregressive baselines on flat and nested NER tasks across languages?

Key findings

  • Inference latency is significantly reduced with PaDeLLM-NER compared to autoregressive baselines (1.76x to 10.22x speedups).
  • Average sequence length per example is reduced to about 13% of autoregressive methods, contributing to speedups.
  • PaDeLLM-NER achieves mean micro-F1 around 84.79, outperforming baselines on several English and Chinese datasets (best on 4 of 9 datasets).
  • Two-step counting-and-mention approach enables parallel decoding of label-mention pairs in batches.
  • Deduplication by selecting the highest-probability instance across labels improves precision without substantial loss in recall.
  • The method remains competitive with state-of-the-art methods on many datasets, particularly excelling on Weibo, Youku, and ACE2005.
Figure 2: PaDeLLM-NER inference paradigm: texts enclosed in frames with identical colors indicate sequences of the same label. Specifically, the texts within solid-lined frames represent the added templates, while those within dashed-lined frames denote the prediction. In Step 1, the model predicts
Figure 2: PaDeLLM-NER inference paradigm: texts enclosed in frames with identical colors indicate sequences of the same label. Specifically, the texts within solid-lined frames represent the added templates, while those within dashed-lined frames denote the prediction. In Step 1, the model predicts

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.