Entity Recognition with Fine-Tuned LLaMA 2 7B

414 11 months ago

Readme

UniversalNER

UniversalNER is a LLaMA 2 7B model fine tuned with UniversalNER data for Entity Extraction tasks.

This repository is the port of the Universal-NER/UniNER-7B-type from HuggingFace using llama.cpp with no changes made except q4_1 quantization.

CLI

Open the terminal and run ollama run zeffmuks/universal-ner

Example

>>> Alex, Jake and Charlie walk into a bar. People
 ["Alex", "Jake", "Charlie"]

>>> Alex, Jake and Charlie walk into a bar. Women
 ["Charlie"]

>>> Alex, Jake and Charlie walk into a bar Women
 ["Charlie"]

>>> Alex, Jake and Charlie walk into a bar Places
 ["bar"]

Make sure to write the entity that you want to extract at the end of your prompt

Output:

 ["Amazon", "Blue Origin"]

Memory requirements

  • 7b models generally require at least 8GB of RAM

References

Universal-NER/UniNER-7B-type

UniversalNER: Targeted Distillation from Large Language Models for Open Named Entity Recognition

License

Model License

Data License