GithubHelp home page GithubHelp logo

universal-ner's Introduction

UniversalNER ๐Ÿš€

UniversalNER: Targeted Distillation from Large Language Models for Open Named Entity Recognition
Wenxuan Zhou*, Sheng Zhang*, Yu Gu, Muhao Chen, Hoifung Poon (*Equal Contribution)

[Project Page] [Demo] [Paper] [Data] [Model]

Release

  • [8/11] We release two more UniNER models, UniNER-7B-type-sup and UniNER-7B-all, which were finetuned on ChatGPT-generated data and 40 supervised datasets of various domains and offers better NER performance.
  • [8/10] We have released the inference code for running the model checkpoints. The code for pretraining and evaluation will be released soon.

Model License Data License Usage and License Notices: The data, code, and model checkpoints are intended and licensed for research use only. They are also restricted to uses that follow the license agreement of LLaMA, Vicuna, and ChatGPT.

Install

  1. Clone this repository and navigate to the folder
git clone https://github.com/universal-ner/universal-ner.git
cd universal-ner
  1. Install the required packages
pip install -r requirements.txt

Demo

We use vllm for inference. The inference can be run with a single V100 16G GPU.

Gradio Web UI

To launch a Gradio demo locally, run the following command:

python -m src.serve.gradio_server \
    --model_path Universal-NER/UniNER-7B-type \
    --tensor_parallel_size 1 \
    --max_input_length 512

CLI Inference

Run the following command:

python -m src.serve.cli \
    --model_path Universal-NER/UniNER-7B-type \
    --tensor_parallel_size 1 \
    --max_input_length 512

Citation

If you find UniversalNER helpful for your research and applications, please cite using this BibTeX:

@article{zhou2023universalner,
      title={UniversalNER: Targeted Distillation from Large Language Models for Open Named Entity Recognition}, 
      author={Wenxuan Zhou and Sheng Zhang and Yu Gu and Muhao Chen and Hoifung Poon},
      year={2023},
      eprint={2308.03279},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

universal-ner's People

Contributors

universal-ner avatar wzhouad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.