該回購包含來自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-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}
}