Text Classification
Transformers
Safetensors
internlm2
text-generation
hallucination-detection
custom_code
Instructions to use opencompass/anah-20b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencompass/anah-20b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="opencompass/anah-20b", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opencompass/anah-20b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ANAH: Analytical Annotation of Hallucinations in Large Language Models
|
| 2 |
+
|
| 3 |
+
[](https://arxiv.org/abs/2405.20315)
|
| 4 |
+
[](./LICENSE)
|
| 5 |
+
|
| 6 |
+
This page holds the InternLM2-20B model which is trained with the ANAH dataset. It is fine-tuned to annotate the hallucination in LLM's responses.
|
| 7 |
+
|
| 8 |
+
More information please refer to our [project page](https://open-compass.github.io/ANAH/).
|
| 9 |
+
|
| 10 |
+
## 🤗 How to use the model
|
| 11 |
+
|
| 12 |
+
You have to follow the prompt in [our paper](https://arxiv.org/abs/2405.20315) to annotate the hallucination.
|
| 13 |
+
|
| 14 |
+
The models follow the conversation format of InternLM2-chat, with the template protocol as:
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
dict(role='user', begin='<|im_start|>user\n', end='<|im_end|>\n'),
|
| 18 |
+
dict(role='assistant', begin='<|im_start|>assistant\n', end='<|im_end|>\n'),
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
## 🖊️ Citation
|
| 22 |
+
|
| 23 |
+
If you find this project useful in your research, please consider citing:
|
| 24 |
+
```
|
| 25 |
+
@article{ji2024anah,
|
| 26 |
+
title={ANAH: Analytical Annotation of Hallucinations in Large Language Models},
|
| 27 |
+
author={Ji, Ziwei and Gu, Yuzhe and Zhang, Wenwei and Lyu, Chengqi and Lin, Dahua and Chen, Kai},
|
| 28 |
+
journal={arXiv preprint arXiv:2405.20315},
|
| 29 |
+
year={2024}
|
| 30 |
+
}
|
| 31 |
+
```
|