2019-02-19 GPT-2.0 Language Models are Unsupervised Multitask Learners

这两天能一本正经胡说的语言模型GPT-2.0大火,官方OPENAI以模型太强大担心被坏人使用为由,也只公布了117M的模型,是不到号称的15亿参数的十分之一,同时牵起了OPENAI VS CLOSEAI的口水战,看热闹的总是不会闲事大,2019春节刚过,AI领域就一片喧哗,注定今年AI将继续高歌猛进,希望自己能在其中,跟上大部队。

好了,废话不多说,看完热闹,就迫不及待下载了GPT-2.0公布的117M模型跑跑。同时把官方发布的paper Language Models are Unsupervised Multitask Learners拜读了一下,但论文中对如何训练模型介绍得相对较少,重点是在炫各种实验数据。以下是论文摘要:

1. 训练数据:为了获取多样、体量庞大且又有质量的数据作为训练样本,作者 only scraped web pages which have been curated/filtered by humans,但人工筛选是非常expensive,所以作者scraped all outbound links from Reddit, a social media platform, which received at least 3 karma.最终得到over 8 million documents for a total of 40 GB of text的数据作为训练样本

2. 输入模型表示方法:作者没有采用word-level or character-level,而是采用了Byte Pair Encoding (BPE),作者 prevent BPE from merging across character categories for any byte sequence. And add an exception for spaces which significantly improves the compression efficiency while adding only minimal fragmentation of words across multiple vocab tokens. 因为这种方法可以对任何一个Unicode string计算概率,所以该语言模型对任何数据集都不用做预处理。

3.模型:论文写得比较简单,首先指出采用了Transformer,然后是基于OPENAI  GPT model稍做修改,下图是OPENAI  GPT model模型:

在这基础上做的少量修改包括:

(1) 将layer normalization移到每个sub-block入口 ;

(2)在每个self-attention block后加normaliztion; 

(3)修改residual layers的weights(initialization by a factor of 1/√N where N is the number of residual layers); 

(4)词汇量增加到50257;

(5)上下文大小从512增加到1024tokens; 

(6)batchsize增加到512

4.实验:这是这篇论文重点展示的部分,分别在以下实验中展示了GPT 2.0 模型的强大

(1) zero-shot domain transfer

(2)  Children’s Book Test :  examine the performance of LMs on different categories of words: named entities, nouns, verbs, and prepositions.

(3)LAMBADA: tests the ability of systems to model long-range dependencies in text.

(4)Winograd Schema Challenge: measure the capability of a system to perform commonsense reasoning by measuring its ability to resolve ambiguities in text.

(5) Reading Comprehension:CoQA tests reading comprehension capabilities and also the ability of models to answer questions that depend on conversation history.

(6)Summarization:  test GPT-2’s ability to perform summarization on the CNN and Daily Mail dataset.

(7)Translation: 完成english-french任务

(8) Question Answering:evaluate how often it generates the correct answer to factoid-style questions

最后推荐一篇张俊林博士新鲜出炉的剖析文章:效果惊人的GPT 2.0模型:它告诉了我们什么

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 我没有很想你,过了那么久时间我都没有联系过你,我只是看到你送我的东西时会自动回忆起那些过往的场景。 我没有很想你,...
    Thepeat阅读 3,211评论 2 1
  • 舒服的生活里掺不了假,也不刻意低调,质感与触觉的碰撞会说话,眼之所见,鼻之所嗅,肤之所切,一切尽可感受,在...
    蜜桃玄学阅读 1,937评论 0 1
  • undefined undefined类型只有undefined一个值.表示变量已经定义,但是没有值或者变量未定义...
    Renderz_干了这碗口嚼酒阅读 2,828评论 0 0
  • 竹炭面膜不同于传统的面膜贴,传统面膜只能起保水和补充营养的效果,但是起不到深层吸附的作用。现在的气候污染很严重,到...
    俏颜工作室阅读 1,820评论 0 0
  • 一、学习与实践 1.付出不亚于任何人的努力 2.要谦虚,不要骄傲 3.要每天反省 4.活着,就要感谢 5.积善行,...
    万里晴空_498b阅读 988评论 0 0