GPT-2: OpenAI of NLP commercial Wildness

The article reviews the process of upgrading NLP in recent years, from the development of the three stages of evolution took us to sort out the NLP context.

All aspects of natural language processing (NLP) technology is changing the lives of our lives. Smart living room speakers rapid progress on a daily dialogue with you, the even begin to tell you "gag" to suit your hobby habit.

  • Electric business customer service always reply in the first time, may have been processed to your question, you also did not find TA may just be a smart customer service. Reality version of "Turing test" on a daily basis.
  • Always check foreign information you might have been accustomed to a web page or search engine a few key translation, translation quality good enough to make you feel like learning a foreign language is a waste of time.
  • Free, bored when you brush or a short video stream, always addicted later found more and more time, in fact, behind it is a natural language algorithm platform recommendations based on optimizing your browsing habits, attention long time carried out.

If the abduction, we want to briefly review the transition of upgrades in recent years, NLP has been traceability along this torrent technology. Back abundant water, water everywhere technical source to understand the context of the evolution of NLP.

NLP two-hegemony: OpenAI and "stubborn" GPT-2 onslaught

NLP attention must know, 2018 was a bumper year development NLP field. June 2018, OpenAI published a report entitled "Improving Language Understanding by Generative Pre-Training" thesis put forward based on the "pre-trained language model" GPT, it first use of the network instead of Transformer LSTM as a language model, and at 12 a NLP task 9 task of getting the SOTA performance. GPT but for various reasons did not get more attention.

The basic approach is to GPT unsupervised pre-trained on a large scale corpus, and then fine adjustment (fine-tune) way for specific tasks in a much smaller data set supervised, model-independent designed for individual tasks tips can be achieved very good performance in the one-time multiple tasks.

Until October, Google's BERT (Bidirectional Encoder Representation from Transformers) come out, once released they will have wide attention. BERT model won the SOTA performance in the 11 NLP tasks, is that Google technical staff declared "BERT opened a new era of NLP" declaration.

In fact, while the BERT and GPT uses exactly the same two-stage model, the first it is pre-trained language model unsupervised; followed by the use Fine-Tuning mode to solve the downstream task. The difference is that BERT uses a dual language model similar ELMO in the pre-training phase, and the use of larger scale data for pre-training.

BERT in the transformation NLP downstream tasks (including sequence labeling, such as Chinese word, speech tagging, named entity recognition, the semantic role labeling and the like; the second is classification tasks, such as text classification, affective computing; sentence relationship determination, such Entailment, QA , semantic rewrite, natural language reasoning; generative tasks, such as machine translation, text summarization, poetry sentence, plug-speak, etc.) above, powerful and universal mission dazzling performance, it became emboldened bursts of NLP .

After only four months, OpenAI release GPT-2. This massive unsupervised NLP model, can generate coherent paragraphs of text, setting a 7 SOTA performance for large data sets, and can without the pre-trained to complete the reading comprehension, questions and answers, and many machine translation in different languages modeling tasks.

First, CPT-2, BERT and GPT, as a continuation of the Transformer Self-Attention (from Note) as the underlying structure. OpenAI researchers insist on unsupervised training data may come from such a thought: supervised learning a language model will cause only deal with specific tasks performed well, while poor performance in generalization; but simply increasing the training sample, it is difficult task to achieve effective expansion.

Therefore, they chose to use the module to migrate attention from learning to build models capable of performing a number of different NLP tasks in zero-shot case of a more general set of data basis.

与BERT的不同在于,CPT-2模型结构仍然延续了GPT1.0的“单向语言模型”。GPT-2似乎只有一个目标:给定一个文本中前面的所有单词,预测下一个单词。这一点倔强坚持,可以看出OpenAI的解决思路。它选择把Transformer模型参数扩容到48层,包含15亿参数的Transformer模型,找到一个800 万网页(WebText)数据集作为无监督训练数据。

简单说,GPT-2 就是对 GPT 模型的直接扩展,在超出 10 倍的数据量上进行训练,参数量也多出了 10 倍。这让GPT-2采用更加直接“暴力”的方式,单靠提升模型参数容量和增加训练数据的数量来超过BERT。

GPT-2作为一个文本生成器,只要在开始输入只言片语,这个程序会根据自己的判断,决定接下来应该如何写作。简言之,GPT-2作为通用语言模型,可以用于创建AI 写作助手、更强大的对话机器人、无监督语言翻译以及更好的语音识别系统。OpenAI 设想,人们可能出于恶意目的利用GPT-2来生成误导性新闻、网上假扮他人欺诈、在社交媒体自动生产恶意或伪造内容、自动生产垃圾或钓鱼邮件等内容。

所以,OpenAI在发布GPT2的同时就宣称“这种强力的模型有遭到恶意滥用的风险”,选择不对训练模型做完整开源,这一举动引来机器学习&自然语言处理界研究人员的激烈讨论。无论是被外界嘲讽为对自家产品的“过分自负”,还是OpenAI出于PR目的的“故意炒作”,GPT-2 “刻意制造假新闻”的实力确实惊艳到了业内众人。各位吃瓜群众一边实力吐槽,一边又迫不及待想探究GPT-2的强大生成能力。

经过将近一年时间, GPT-2在谨慎开源和开发者的“尝鲜”参与中,进行着眼花缭乱的更新演进。

GPT-2阶段开源:带给开发者的土味狂欢

伴随争议和开发者高涨的呼声,OpenAI仍然出于谨慎考虑,选择了分阶段开源。8月以后,它分阶段发布了“小型的”1.24 亿参数模型(有 500MB 在磁盘上),“中型的”3.55 亿参数模型(有 1.5GB 在磁盘上 ),以及 7.74 亿参数模型(有 3GB 在磁盘上 )。

直到11月6日,它正式放出GPT-2最后一个部分的包含15亿参数的最大版本的完整代码。一直到完整版本公布,OpenAI并未发现任何明确的代码、文档或者其他滥用实证,也就是说一直担心的“GPT-2遭到滥用”的结果并没有发生,但OpenAI仍然认为,全面版本发布同时也会让恶意人士有机会进一步提高检测逃避能力。

所以,伴随着GPT-2不同版本的陆续公布,OpenAI自身与多家复现GPT-2模型的团队进行交流,验证GPT-2的使用效果,同时也在避免滥用语言模型的风险,完善检测文本生成的检测器。

同时,OpenAI也还在与多家研究机构合作,比如对人类对语言模型产生的数字信息的敏感性的研究,对恶意利用GPT-2的可能性的研究,对GPT-2生成文本的统计可检测性的研究。无论OpenAI出于怎样的谨慎,随着不同容量参数模型的发布,外界开发人员已经迫不及待进行各种方向的探索了。

2019年4月,Buzzfeed 数据科学家 Max Woolf使用Python封装了具有 1.17 亿超参数的“较小”版本的 OpenAI GPT-2 文本生成模型进行微调和生成脚本,开源了一个“GPT-2 精简版”,从而更好地帮助人们生成一段文本,里面可以给出很多出人意料的内容。

在OpenAI逐步开源的过程里,来自布朗大学的两位研究生就率先自己动手复制出一个 15 亿参数量的 GPT-2,并将其命名为 OpenGPT-2。过程中,他们使用自己的代码从零开始训练 GPT-2 模型大约只花费了 5 万美元。所用的数据集也尽可能参照OpenAI论文里公开的方法。

有很多热心网友的测试后表示,OpenGPT-2 的输出文本效果优于 OpenAI 的 GPT-2 7.74 亿参数版本。当然,也有人认为,并没有比GPT-2模型生成的文本效果更好。

同时在国内,一个位于南京名叫“Zeyao Du”的开发者,在GitHub上开源了的GPT-2 Chinese,可以用来写诗、新闻、小说和剧本,或是训练通用语言模型。这一能够实现逆天效果GPT-2模型,用到了15亿个参数。目前他开源了预训练结果与 Colab Demo 演示,只需要单击三次,人们就可以生成定制的中文故事。

GPT-2模型还有更多尝试。一个新加坡高中生Rishabh Anand开源了一个轻量级GPT-2“客户端”——gpt2-client,它是一个GPT-2 原始仓库的包装器,只需5行代码就可以实现文本生成。

来自中国的几个研究者正在用GPT模型生成高质量的中国古典诗歌。比如论文里提到的一首《七律·一路平安》:“一声天际雁横秋,忽梦青城旧友游。路入青林无去马,手携黄牒有归舟。平生志业商山老,何日公卿汉署留。安得相从话畴昔,一樽同醉万山头”。

一场平平淡淡的送别,写得就饱含沧桑、充满离愁。不难让人怀疑:这个语言模型是否真的有了感情?

GPT-2模型还可以用在音乐创作上。OpenAI推出一种用于生成音乐作品的深层神经网络——MuseNet,正是GPT-2语言模型Sparse Transformer相同的通用无监督技术,允许MuseNet根据给定的音符组预测下一个音符。该模型能够用10种不同的乐器制作4分钟的音乐作品,并且能够从巴赫,莫扎特,披头士乐队等作曲家那里了解不同的音乐风格。它还可以令人信服地融合不同的音乐风格,以创造一个全新的音乐作品。

最让笔者感兴趣的是一位开发者通过GPT-2做出的一款AI文字冒险游戏——“AI地牢”。通过多轮文本对话, AI就可以帮你展开一段意想不到的“骑士屠龙”征途或者“都市侦探”之旅。在未来的游戏产业中,AI创造的故事脚本,也许可能更具想象力?

GPT-2发布的一年里,以上开源带来的应用足以称之为眼花缭乱。喧闹与繁荣背后,除了在在开源风险上的小心谨慎,OpenAI还面临着哪些难题?

NLP的土豪赛:OpenAI联姻微软后的 GPT-2商业化

其实,我们从BERT和GPT-2的演进趋势,可以看出人类利用更大容量的模型、无监督的无限训练,可以去创造更多更好的合乎人类语言知识的内容。但这也同样意味着要依靠超级昂贵的GPU计算时间、超大规模GPU机器学习集群、超长的模型训练过程。这意味着这种“烧钱”模式,使得NLP的玩家最终会更加向头部公司聚集,成为少数土豪玩家的赛场。

可以预见,如果今年OpenAI再推出GPT-3.0,大概率还是会选择单向语言模型,但会采取更大规模的训练数据和扩充模型,来与BERT硬刚。NLP应用领域的成绩也会再次刷新。

但从另一个侧面看到,如此“烧钱”的语言训练模型的研发,尚无清晰的商业化应用前景。OpenAI也不得不面临着“遵循技术情怀的初衷”还是“为五斗米折腰”的商业化的艰难选择。

答案应该已然明了。就在2019年7月,OpenAI接受了微软的10亿美元投资。根据官方说法,OpenAI将与微软合作,共同为微软Azure云平台开发新的人工智能技术,并将与微软达成一项排他性协议,进一步扩展大规模人工智能能力,“兑现通用人工智能(AGI)的承诺”。

其实质正是OpenAI在人工智能研究上的“烧钱”与其商业化的尴尬,使得它更需要这样一笔来自微软的“赞助”。就以拥有15亿参数的GPT-2模型为例,它使用256块TPU v3训练,每小时都要花费2048美元。可以预见,如果我们还想期待GPT-3.0的发布,其费用将主要就花在云端的计算资源上面。

微软将成为OpenAI独家云计算供应商,OpenAI的人工智能技术也要通过Azure云输出。未来,OpenAI将把部分技术授权给微软,然后由微软把这些技术商业化,并将其出售给合作伙伴。

这笔巨额费用的支持,让OpenAI有了更充足的底气。如上面所总结的,GPT-2在8月份后继续开始分步骤发布不同量级的参数模型,并在11月全部开源。显然GPT-2未来在商业化方向上,可以更多的借助微软Azure的加持。比如可以未来更好的与Office365协作,参与到办公协助的自动化文本写作当中,参与语法错误修复,也可以建立更自然真实的问答系统。

曾经年少爱追梦,一心只想往前飞。AGI的理想也需要在商业实践中照进现实。可以预见,2020年,谷歌面对微软&OpenAI的组合,将给NLP商业化带来更多波澜。

发布了431 篇原创文章 · 获赞 683 · 访问量 140万+

Guess you like

Origin blog.csdn.net/weixin_42137700/article/details/104231936