该回购包含来自AI21实验室纸的数据生成基准,用于语言模型的事实评估。
我们包括以下因素基准来评估语言模型的事实:
要在我们的存储库中安装所需的库,请运行:
pip install -r requirements.txt
要具有特定于CUDA的Pytorch版本,请在运行上述命令之前安装您的版本。
在本文中,我们为以下模型提供结果(用其中之一替换$MODEL_NAME
)。
gpt2
, gpt2-medium
, gpt2-large
, gpt2-xl
EleutherAI/gpt-neo-1.3B
, EleutherAI/gpt-neo-2.7B
, EleutherAI/gpt-j-6B
facebook/opt-125m
, facebook/opt-350m
,Facebook/ facebook/opt-2.7b
facebook/opt-1.3b
,Facebook/opt-2.7b, facebook/opt-6.7b
, facebook/opt-13b
, facebook/opt-30b
, facebook/opt-66b
要通过因子数据集对模型进行评估,请使用以下命令:
python python eval_factuality.py
--data_file ./data/wiki_factor.csv
--output_folder $OUTPUT_DIR
--model_name $MODEL_NAME
wiki_factor
, expert_factor
和代码:根据MIT许可发布。news_factor
:基准是从精制网络数据集派生的。公共摘录可根据ODC by 1.0许可提供;用户还应遵守Common Crawl Tou:https://commoncrawl.org/terms-of-use/。 如果您发现我们的论文或代码有帮助,请引用我们的论文:
@article{muhlgay2023generating,
title={Generating benchmarks for factuality evaluation of language models},
author={Muhlgay, Dor and Ram, Ori and Magar, Inbal and Levine, Yoav and Ratner, Nir and Belinkov, Yonatan and Abend, Omri and Leyton-Brown, Kevin and Shashua, Amnon and Shoham, Yoav},
journal={arXiv preprint arXiv:2307.06908},
year={2023}
}