GPT-Neo 2.7B 是一款基于 EleutherAI 对 GPT-3 架构复现所设计的 transformer 模型。GPT-Neo 指的是这类模型的总称,而 2.7B 则代表了该特定预训练模型的参数数量。
GPT-Neo 2.7B 是在 Pile 数据集上进行训练的。Pile 是一个由 EleutherAI 精心策划的大规模数据集,专门用于训练此模型。
该模型在 400,000 步训练过程中处理了 4200 亿个 token。它被训练为一个掩码自回归语言模型,采用交叉熵损失函数。
通过这种方式,模型能够学习到英语语言的内部表示,进而可用于提取对下游任务有用的特征。不过,该模型在其预训练目标上表现最佳,即根据提示生成文本。
您可以直接通过文本生成流水线使用此模型。以下示例在每次运行时都会生成不同的序列:
>>> from transformers import pipeline
>>> generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
>>> generator("EleutherAI has", do_sample=True, min_length=50)
[{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]GPT-Neo 是作为自回归语言模型进行训练的。这意味着其核心功能是接收一段文本并预测下一个标记。尽管语言模型被广泛用于此类任务之外的场景,但这项工作仍存在许多未知因素。
GPT-Neo 在 Pile 数据集上进行训练,该数据集已知包含亵渎性、低俗及其他攻击性语言。根据具体使用场景,GPT-Neo 可能会生成社会不可接受的文本。有关 Pile 数据集中偏见的更详细分析,请参见 Pile 论文的第 5 节和第 6 节。
与所有语言模型一样,很难预先预测 GPT-Neo 对特定提示的反应,且可能会在毫无预警的情况下出现冒犯性内容。我们建议在发布输出内容之前由人工进行筛选或审核,以过滤不良内容并提高结果质量。
所有评估均使用我们的评估工具包进行:https://github.com/EleutherAI/lm-evaluation-harness。GPT-2 和 GPT-3 的部分结果与各自论文中报告的值不一致。我们目前正在调查原因,并非常感谢对我们评估工具包的反馈和进一步测试。如果您想贡献自己完成的评估结果,请通过我们的 Discord 联系我们:https://discord.gg/vtRgjbM。
| 模型及规模 | Pile BPB | Pile PPL | Wikitext PPL | Lambada PPL | Lambada Acc | Winogrande | Hellaswag |
|---|---|---|---|---|---|---|---|
| GPT-Neo 1.3B | 0.7527 | 6.159 | 13.10 | 7.498 | 57.23% | 55.01% | 38.66% |
| GPT-2 1.5B | 1.0468 | ----- | 17.48 | 10.634 | 51.21% | 59.40% | 40.03% |
| GPT-Neo 2.7B | 0.7165 | 5.646 | 11.39 | 5.626 | 62.22% | 56.50% | 42.73% |
| GPT-3 Ada | 0.9631 | ----- | ----- | 9.954 | 51.60% | 52.90% | 35.93% |
| 模型及规模 | MathQA | PubMedQA | Piqa |
|---|---|---|---|
| GPT-Neo 1.3B | 24.05% | 54.40% | 71.11% |
| GPT-2 1.5B | 23.64% | 58.33% | 70.78% |
| GPT-Neo 2.7B | 24.72% | 57.54% | 72.14% |
| GPT-3 Ada | 24.29% | 52.80% | 68.88% |
待定
如需引用此模型,请使用
@software{gpt-neo,
author = {Black, Sid and
Leo, Gao and
Wang, Phil and
Leahy, Connor and
Biderman, Stella},
title = {{GPT-Neo: Large Scale Autoregressive Language
Modeling with Mesh-Tensorflow}},
month = mar,
year = 2021,
note = {{If you use this software, please cite it using
these metadata.}},
publisher = {Zenodo},
version = {1.0},
doi = {10.5281/zenodo.5297715},
url = {https://doi.org/10.5281/zenodo.5297715}
}
@article{gao2020pile,
title={The Pile: An 800GB Dataset of Diverse Text for Language Modeling},
author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and others},
journal={arXiv preprint arXiv:2101.00027},
year={2020}
}