Selecting and Merging: Towards Adaptable and Scalable Named Entity Recognition with Large Language Models

Zhuojun Ding, Wei Wei, Chenghao Fan
6/28/2025
cs.CL

No official code found. Best implementation: Ding-ZJ/SaM (5 stars, last commit 2025-05-18).

Abstract

Supervised fine-tuning (SFT) is widely used to align large language models (LLMs) with information extraction (IE) tasks, such as named entity recognition (NER). However, annotating such fine-grained labels and training domain-specific models is costly. Existing works typically train a unified model across multiple domains, but such approaches lack adaptation and scalability since not all training data benefits target domains and scaling trained models remains challenging. We propose the SaM framework, which dynamically Selects and Merges expert models at inference time. Specifically, for a target domain, we select domain-specific experts pre-trained on existing domains based on (i) domain similarity to the target domain and (ii) performance on sampled instances, respectively. The experts are then merged to create task-specific models optimized for the target domain. By dynamically merging experts beneficial to target domains, we improve generalization across various domains without extra training. Additionally, experts can be added or removed conveniently, leading to great scalability. Extensive experiments on multiple benchmarks demonstrate our framework's effectiveness, which outperforms the unified model by an average of 10%. We further provide insights into potential improvements, practical experience, and extensions of our framework.

View on arXivView PDF

Code Implementations(1)

Ding-ZJ/SaMCommunity100%
50May 18, 20251 years ago

Similar Papers

Cite this paper

@article{ding2025selecting,
  title  = {Selecting and Merging: Towards Adaptable and Scalable Named Entity Recognition with Large Language Models},
  author = {Zhuojun Ding and Wei Wei and Chenghao Fan},
  year   = {2025},
  eprint = {2506.22813},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.22813v1}
}

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

Discussion