transformers safetensors llama text-generation conversational en arxiv:2308.03279 arxiv:2406.17305 license:cc-by-nc-4.0 autotrain_compatible text-generation-inference endpoints_compatible region:us
---
language:
- en
license: cc-by-nc-4.0
---

---

# RA-IT-NER-8B

**Description**: The RA-IT-NER-8B model is trained from LLama3-8B using the proposed Retrieval Augmented Instruction Tuning (RA-IT) approach. This model can be used for English Open NER with and without RAG. The training data is the [Pile-NER-type](https://huggingface.co/datasets/Universal-NER/Pile-NER-type) presented by [UniversalNER](https://arxiv.org/abs/2308.03279). 

Check our [paper](https://arxiv.org/abs/2406.17305) for more information. Check our [github repo](https://github.com/Emma1066/Retrieval-Augmented-IT-OpenNER) about how to use the model.

## Inference
The template for inference instances is as follows:
<div style="background-color: #f6f8fa; padding: 20px; border-radius: 10px; border: 1px solid #e1e4e8; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
<strong>Prompting template:</strong><br/>
USER: Here are some examples of named entity recognition: <span style="color: #d73a49;">{Fill the NER examples here}</span><br/>
ASSISTANT: I’ve read these examples.<br/>
USER: Text: <span style="color: #d73a49;">{Fill the input text here}</span><br/>
ASSISTANT: I’ve read this text.<br/>
USER: What describes <span style="color: #d73a49;">{Fill the entity type here}</span> in the text?<br/>
ASSISTANT: <span style="color: #0366d6;">(model's predictions in JSON format)</span><br/>
</div>

Note: 
* The model can conduct inference **with and without** NER examples. If you want to conduct inference without examples, just start from the third line in the above template by directly inputting "Text: {input text}" in the "USER" role.
* Inferences are based on one entity type at a time. For multiple entity types, create separate instances for each type.

## License

This model is released under the [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) license. It is primarily used for research purposes.

