Transformer 模型具有以下特点:
在数据转移方面,其特点包括:
你好。我是Sanjana Reddy,是Google高级解决方案实验室的机器学习工程师。生成式AI和所有新的进步,包括即将出现的新顶点AI功能,令人兴奋不已。例如Gen AI Studio、Model Garden、Gen AI API。我们在这个简短的会议中的目标是让您在一些基本概念上打下坚实的基础。[heading2]语言建模的进展[content]语言建模已经发展了多年。过去十年的最新突破包括使用神经网络用于表示文本的方法,例如2013年的Word2Vec和N-grams。2014年,序列到序列模型(例如RNN和LSTM)的开发帮助提高了ML模型在NLP任务上的性能,比如翻译和文本分类。[heading2]注意力机制的兴起[content]2015年,注意力机制和基于它构建的模型令人兴奋,例如Transformers和Bert模型。今天要讲的是Transformer模型。[heading2]Transformer模型的特点[content]Transformer基于2017年发表的一篇名为《Attention Is All You Need》的论文。尽管Transformers之前的所有模型都能够将单词表示为向量,但这些向量并不包含上下文。单词的用法会根据上下文而变化。例如,在注意力机制出现之前,"bank"和"river bank"与"bank robber"中的"bank"可能具有相同的向量表示。[heading2]Transformer的架构[content]Transformer是一种使用注意力机制的编码器解码器模型。它可以利用多元化的优势,也可以同时处理大量数据。由于其模型架构,注意力机制有助于提高机器翻译应用程序的性能。Transformer模型由编码器和解码器组成。编码器对输入序列进行编码并将其传递给解码器,解码器解码相关任务的表示。编码组件是一堆相同数量的编码器。介绍Transformers的研究论文将六个编码器堆叠在一起。六不是一个神奇的数字。它只是一个超参数。编码器在结构上都是相同的,但具有不同的权重。
In order to ensure fair and transparent processing in respect of the data subject,taking into account the specific circumstances and(a)the data subject has explicitly consented to the proposed transfer,after having been informed of the possible risks of such transfers for the data subject due to the absence of an adequacy decision and appropriate safeguards;(b)the transfer is necessary for the performance of a contract between the data subject and the controller or the implementation of pre-contractual measures taken at the data subject's request;(c)the transfer is necessary for the conclusion or performance of a contract concluded in the interest of the data subject between the controller and another natural or legal person;(d)the transfer is necessary for important reasons of public interest;(e)the transfer is necessary for the establishment,exercise or defence of legal claims;(f)the transfer is necessary in order to protect the vital interests of the data subject or of other persons,where the data subject is physically or legally incapable of giving consent;
更糟糕的是,RNN很难训练。它们很容易受到所谓的消失/爆炸梯度问题的影响(有时候你只能重新开始训练并祈祷)。更有问题的是,因为RNN是按顺序处理单词的,所以很难并行化。这意味着你不能通过添加更多GPU来加快训练速度,这也意味着你不能用那么多数据来训练它们。[heading2]进入Transformer[content]这就是Transformer大显身手的地方。它们是谷歌和多伦多大学的研究人员在2017年开发的,最初设计用于翻译。但与循环神经网络不同,Transformer可以非常有效地并行化。这就意味着,只要有合适的硬件,你就可以训练出一些非常大的模型。有多大呢?非常之巨大!GPT-3是一种特别令人印象深刻的文本生成模型,它的写作能力几乎与人类相当,它是在45TB的文本数据上训练而成,包括几乎所有的公共网络数据。所以,用一句话总结Transformer,一定是这样的:当一个扩展性极佳的模型和一个巨大的数据集邂逅,结果可能会让你大吃一惊。