# GPT演化之路: GPT, GPT-2, GPT-3 # 什麼是GPT? - GPT (Generative Pre-trained Transformer) 是一個生成式的預訓練語言模型,能夠 fine-tune 到很多種如文章生成、程式生成以及機器翻譯或是問答等等常見的 NLP 任務之上 - 他最大的特點就是大,有多大呢,號稱全世界最大的語言模型,今年聽說會出 GPT-4 - 可以發現從 GPT-3 開始超乎人類想像了,原來這就是鈔能力 ![1_C-KNWQC_wXh-Q2wc6VPK1g](https://hackmd.io/_uploads/SkKMKQ1G1l.png) ![螢幕擷取畫面_2022-05-26_012439](https://hackmd.io/_uploads/ryYmKmkzyg.png) ## 這次不是芝麻街美語的角色了,那為什麼是獨角獸? 在 OpenAI 的 [GPT-2 blog](https://openai.com/blog/better-language-models/) 中展示了一個例子,他給模型一段人類寫的文章,而 GPT-2 在閱讀完之後就開始自己產生了下面那一堆文章,使得文章本來只是在說科學家在安地斯山發現會說英文的獨角獸變成把整個發現獨角獸的過程都詳細寫了出來。這就是一本正經的瞎掰。 ![1653557777705](https://hackmd.io/_uploads/ryH4YQ1M1g.jpg) 之後只要看到安地斯山上面有一堆獨角獸,那就是在說 GPT 模型![Dzak2U-VYAA1b3J](https://hackmd.io/_uploads/HJgSFmkGkx.jpg) # GPT-1, 無監督學習, 2018 當時的背景是 Attention Is All You Need 出現之後,才剛證明完 Transformer 在處理 NLP task 上有卓越的表現,而 BERT 當時也還沒出現,因此 NLP 還未擁有一個具有泛化能力的模型,也苦於缺乏高品質且大量的標籤資料來做訓練。 因此,GPT-1 希望通過在沒有標籤的資料上學習一個生成式的預訓練語言模型,在盡量不改變太多架構的情況下,能夠 fine-tune 到下游的任務以增加 NLP 模型的泛化能力。 然而由於當時 GPT-1 發布後不久就出現了 BERT 蓋過了他的名聲,直到 GPT-2 出現之後才再次聲名大噪 ## 如何訓練 GPT-1 Two-stage Frameworks: Unsupervised pre-training + Supervised fine-tuning ### Unsupervised pre-training - 以 maximize likelihood 作為 objective,預測第 i 個詞的時候就會使用第 i 個詞之前的k個詞的資訊,參數 $\Theta$ 是 SGD 的參數 (init value) - $k$ = size of context window ![螢幕擷取畫面_2022-05-27_002017](https://hackmd.io/_uploads/SJx8YmyMkx.png) 把文字轉成 embedding 之後丟入 position-wise feedforward layers 再輸入多層的 transformer decoder,出來之後用 softmax 產生出目標 token 的機率分布 - $U$ = context vector of tokens, $W_e^T$= token embedding matrix, $W_p$ = position embedding matrix ![螢幕擷取畫面_2022-05-27_005511](https://hackmd.io/_uploads/HJK8Ymkfyx.png) ```python class PositionWiseFFN(nn.Block): def __init__(self, units, hidden_size, **kwargs): super(PositionWiseFFN, self).__init__(**kwargs) self.ffn_1 = nn.Dense(hidden_size, flatten=False, activation='relu') self.ffn_2 = nn.Dense(units, flatten=False) def forward(self, X): return self.ffn_2(self.ffn_1(X)) ``` ### **Supervised fine-tuning** fine-tuning 階段就會有 labeled dataset $C$ 和 input token $x$ 與 label $y$,並新增了一個 linear output layer ($W_y$) 來預測出 $y$ ![螢幕擷取畫面_2022-05-27_012112](https://hackmd.io/_uploads/BkVvFQkGye.png) $L_2$ 為 fine-tuning 的 objective ![螢幕擷取畫面_2022-05-27_011456](https://hackmd.io/_uploads/ry0vYQ1fyl.png) 除此之外,他們發現將 pre-training 的結果作為輔助 objective 也有助於 fine-tuning,所以最終的 objective 變成 $L_1(C)$ 乘上一個 weight $\lambda$ 後再與 fine-tune objective 相加 ![螢幕擷取畫面_2022-05-27_010758](https://hackmd.io/_uploads/BJaOFXyM1l.png) ![螢幕擷取畫面_2022-05-27_012905](https://hackmd.io/_uploads/SJVttmkfkg.png) **整個 fine-tuning 流程其實只需要 1.) $W_y$ 2.) embeddings for delimiter tokens,其他的東西全部都是從 pre-training 或是要 fine-tuning 的資料本身而來** ## GPT-1 的任務 為了能方便將 GPT fine-tune 到下游任務,他對模型的輸入方式建立了一個規範 分別有文字分類、推理(文字蘊涵)、語義相似度、問答四種任務 - **文字分類 (Text Classification**): 把 BOS 和 EOS 放到序列兩端輸入模型之後得到預測的類別機率分布 - **推理 (Textual Entailment)**: 將前提(Premise)與假設(Hypothesis)以分隔符(Delimiter)隔開,兩端加上 BOS 與 EOS,得到預測結果 - **語義相似度 (Similarity)**: 輸入兩個句子正反拼接,以分隔符分開並在兩端加上 BOS, EOS,分別輸入給模型之後做 concat 後得到預測結果 - **問答 (Question Answering and Commonsense Reasoning):** 把文件與問題 concat 在一起,答案用 delimiter 和兩者分割,並將 n 個選項的選擇題變成 n 個二分類問題,分別輸入模型之後分別輸出那一個選項可能是答案的機率 ![螢幕擷取畫面_2022-05-26_013955](https://hackmd.io/_uploads/ryD5K7JMJe.png) ## GPT-1 的模型 - 把 Transformer Decoder 一直疊疊疊,疊越多模型就越大,是一個只有 12層 Transformer Decoder 的模型 ![gpt2-sizes-hyperparameters-3](https://hackmd.io/_uploads/H1bit7kzJe.png) 模型會從 <BOS> 開始產生出第一個字,之後根據過往所產生過的所有東西循序產生出下一個字,而且模型不會知道接下來的字彙是什麼,這是**單向的 attention 模型** ![截圖_2022-05-27_上午10.47.49](https://hackmd.io/_uploads/H1ioKmJfkx.png) ### Model specifications - 12 layer transformer decoder (LayerNorm) + masked self-attention head (768 dimensional states and 12 attention heads) - 為什麼是用 LN?可以改成 BN, IN, GN 嗎? - [transformer 为什么使用 layer normalization,而不是其他的归一化方法?](https://www.zhihu.com/question/395811291) - 3072 position-wise Feedforward dimensional - train for 100 epochs on minibatches of 64 randomly sampled, contiguous sequences of 512 tokens - 值得一提的是他說大部分任務的 fine-tune 只需要 3 個 epochs - Adam optimizer + 2000 warmup update and anneal to 0 with cosine schedule, and **GELU** as activation function - Attention, residual, and embedding dropouts were used for regularization, with dropout rate of 0.1. Modified version of L2 regularization was also used for non-bias weights. - [Look ahead bias in the skip connection of the Transformer-decoder/GPT2 architecture](https://stats.stackexchange.com/questions/548505/look-ahead-bias-in-the-skip-connection-of-the-transformer-decoder-gpt2-architect) - Use **Byte Pair Encoding (BPE)** as Subword algo - BPE 就是將序列中最常見的連續字替換為序列中還不存在的新字,以前用來做資料壓縮,現在也常見於 NLP Model 當中用來建立字典做斷詞 - [Byte pair encoding - Wikipedia](https://en.wikipedia.org/wiki/Byte_pair_encoding) - [深入理解NLP Subword算法:BPE、WordPiece、ULM](https://zhuanlan.zhihu.com/p/86965595) BPE 流程: 1. 首先計算每個詞出現的頻率,然後將將單詞字典裡的單詞都分割為字母大小的長度(byte 長度),並使用 </W> token 來表示單詞結尾。(Segment Criterion) ![螢幕擷取畫面_2022-05-26_181826](https://hackmd.io/_uploads/SJwy97yGyl.png) 2. 建立一個記錄「字母對」與出現頻率的 dictionary。這個 dictionary 的鍵值是在步驟一產生在同一個單詞內**相鄰的**「字母對」,而值的部分則是該鍵值的出現頻率。 ![螢幕擷取畫面_2022-05-26_181910](https://hackmd.io/_uploads/rkQxc7JMyl.png) 3. 合併出現頻率最高的「字母對」將會被優先合併成一個新的 subword,並以該 subword 取代原來的字母對。(Merge Criterion) ![螢幕擷取畫面_2022-05-26_181948](https://hackmd.io/_uploads/By3x5QkGyl.png) 4. 重複步驟 2 和 3,直到達到所設下的 vocabulary size。 5. 最後得到的那個字典就已經代表了一整串的 merge rule,接下來就是利用這些 rule 來製作 subwords。 ![螢幕擷取畫面_2022-05-26_182957](https://hackmd.io/_uploads/SkIb9XkGkl.png) - GPT-1 中使用了 40,000 個 merges 來建立這個字典 - 英文常用字詞共有大約有30000~50000個,台灣的中文常用字詞共有4808個 - 如果遇上 unknown token 怎麼辦呢? ![螢幕擷取畫面_2022-05-26_182841](https://hackmd.io/_uploads/HklMcQ1Myg.png) ## 與 BERT 的差別 - GPT 與 BERT 的主要差別在於 **GPT 的訓練是單向的,而 BERT 則是雙向的** - GPT 只在 fine-tune 的時候使用 [SEP] 和 [CLS],而 BERT 則是預訓練的時候就在使用 - GPT-1 的訓練語料較小,只使用了 BooksCorpus (800M words),而 BERT 則是用 BooksCorpus (800M words) + Wikipedia (2500M words) - GPT 的 fine-tuning learning rate 一律使用 5e-5,而 BERT 則會根據下游任務去調整 fine-tuning learning rate ![1653533239457](https://hackmd.io/_uploads/HyqN571zkg.jpg) 後來的發展證明,只預測下一個詞作為目標的單向預訓練沒辦法很好的 encode 上下文資訊,雙向的預訓練效果較好,不過 BERT 沒辦法做文本生成任務而 GPT 可以 ![self-attention-vs-masked-version](https://hackmd.io/_uploads/HJHBc71fkl.jpg) ## Results of GPT-1 他們在這12個 dataset 上的其中9個得到了SOTA成績, ![螢幕擷取畫面_2022-05-27_013003](https://hackmd.io/_uploads/Sy1Icm1M1e.png) # GPT-2, 多任務學習, 2019 在一代證明了 NLP pre-training model 有強大的泛化能力之後,二代基本上沿用了一代的架構,但使用10倍的資料、10倍參數的模型,總的來說做了以下的微調而最後發生了一些非常神奇的事情 1. **移除掉 fine-tuning 層**,GPT-2 不再限制模型應該做什麼任務,而是讓模型自己判斷需要做什麼任務。objective 從 P(output|input) → P(output|input, task),也就是說模型會在相同的輸入但遇上不同任務的時候自動輸出不同的結果。 - 雖然說是完全不 fine-tuning,但要做任務的時候他們實際上還是會給模型一些任務的描述或是加入提示字來告訴模型要做什麼任務,比如加入 “TL;DR”,模型就會知道是要做摘要任務 2. 最大的 GPT-2 的網路變成了 48 層的 Transformer Decoder,最大的模型參數共有 15 億,是 BERT 的 5 倍之多,而 Token Embeddings 則有 1600 維之多加上同樣維度的位置編碼。 - GPT-2 當時發表的時候只公佈了前三個較小的模型,因為他們宣稱最後一個 1.5 B的模型有可能會危害社會,最後這個模型在九個月後才開源 ![截圖_2022-05-27_上午11.23.12](https://hackmd.io/_uploads/B1u89XkM1e.png) ![gpt2-token-embeddings-wte-2](https://hackmd.io/_uploads/Hylwq7kM1e.png) ![gpt2-positional-encoding](https://hackmd.io/_uploads/BytD5m1zyg.png) ![gpt2-model-sizes](https://hackmd.io/_uploads/ByWdcmkM1l.jpg) [GPT-2: 1.5B Release](https://openai.com/blog/gpt-2-1-5b-release/) 1. 相較於一代的 BooksCorpus (800M),二代從網路上選了幾個高品質的網站,並從中爬取文字以及網站中所連到的外部網站文字,比如他們一開始就從 Reddit 上選擇 karma > 3 的網頁來爬,最後他們得到一個有 4500萬 個連結的資料集。 經過 de-duplication 和人類手工過濾之後得到 800萬個網頁,大小為 40G 的資料。值得一提的是由於 Wikidata 很常被放在其他常見的資料集之中,所以他們為了避免資料的重複,把所有維基的資料都從這個 WebText 上移除。 - 常見資料集的 test data 大約與 WebText train 重複 1~6 % (平均3.2%)的文本,而許多常見資料集 test data 其實自身也與他們的 train 有更高的重疊率(平均5.9%) ![截圖_2022-05-27_下午1.40.23](https://hackmd.io/_uploads/rkC_5QJGJl.png) - 最大的 GPT-2 甚至可能還只處於 underfit 這個資料集的狀態 ![截圖_2022-05-27_上午11.37.56](https://hackmd.io/_uploads/r15YqX1Myl.png) ## Zero-Shot Tasks 這就是 GPT-2 最神奇的地方之一,模型完全沒有被訓練過做任何的任務,經過 WebText 上的預訓練之後,直接丟進去測試在跟 WebText 完全無關的任務上,就可以逐漸達到或是超越以往為那些專門為特定任務設計的網路。 雖然他們宣稱這很厲害,不過我覺得結果是見仁見智。 ![截圖_2022-05-27_上午10.39.22](https://hackmd.io/_uploads/Sk799QkzJl.png) ## Model spec of GPT-2 - GPT-2 had 48 layers and used 1600 dimensional vectors for word embedding. - The larger vocabulary of 50,257 tokens was used. - A larger batch size of 512 and a larger context window of 1024 tokens were used. - BPE as subword algo - 這邊有特別提到他們為了避免 limited vocabulary slots and model capacity 而把跨字元種類的 merge 禁用了 - 舉例來說, Dog 可能會有 Dog. Dog? Dog! Dog, 等等變種,如果 BPE 因為其中某一個變形出現比較多次而 merge 就會使得字典被限制 - Layer normalization 被移到 input of each sub-block 的輸入,在 final self-attention block 之後額外增加了一次的 Layer norm - At initialization, the weight of residual layers was scaled by 1/√N, where N was the number of residual layers. - 沒有很懂為什麼要這樣 scale,但看得出他會讓越深的網路權重越低 - [transformers/modeling_gpt2.py at 0932adb3e860086dabeee88ebc34f1e6550321b5 · huggingface/transformers](https://github.com/huggingface/transformers/blob/0932adb3e860086dabeee88ebc34f1e6550321b5/src/transformers/models/gpt2/modeling_gpt2.py#L478) ## WebText data cleaning - Use Bloom Filter (8-grams of WebText training set token) to calculate the data overlapping ratio as a de-duplication check - 先把全部資料轉為 lower-cased alphanumeric words with a single space as a delimiter (為了提高 recall) - 8-grams 模型產生出 1M strings,看他的 false-positive rate 是多少,並設定一個 $\frac{1}{10^8}$的 false-positive rate upper-bound - These Bloom filters let us calculate, given a dataset, the percentage of 8-grams from that dataset that is also found in the WebText training set ## Result of GPT-2 - 在這八個資料中,只有在 text summarization 上比以往的專門模型還差 ![截圖_2022-05-27_上午11.51.10](https://hackmd.io/_uploads/Hkd29mkMkl.png) 以下是一些應用 demo,包含寫作展示、自動產生出動漫老婆的背景故事以及 AI 自動補全工具 tabNine 都是 GPT-2 的結果 - [Write With Transformer](https://transformer.huggingface.co/) - [InferKit](https://app.inferkit.com/demo) - [This Waifu Does Not Exist v3.5 (TWDNEv3.5) - Gwern](https://www.thiswaifudoesnotexist.net/) - [Code Faster with AI Code Completions](https://www.tabnine.com/) ### Summary 實際上 GPT-2 是真的沒什麼創新點,主要都著墨在更大的資料與更大參數的模型上,但這樣暴力的方式就真的能得到一個神奇模型 # GPT-3, 來自暗黑大陸, 2020 ![螢幕擷取畫面_2022-05-28_131316](https://hackmd.io/_uploads/H1MR9mkMyx.png) 簡單來說,這是在當時一個超乎人類想像的模型,聽說如果你租用雲端資源來訓練一個GPT-3會需要1200萬美金,不過現在的語言模型已經更超乎人類想像,比如 Switch Transformer (2021) 的參數量已經到達 16000 億 (9個 GPT-3)。 GPT-3 (Language Models are Few-Shot Learners) 有了比 GPT-2 更瘋狂的想法,他現在不只是 fine-tuning 不做了,連梯度更新都不做了,希望透過只輸入一些少量的例子 (few-shot) 或是只輸入一個例子(one-shot)、完全只描述任務要做什麼不給例子(zero-shot)來完成任務,他們稱這為 in-context learning ## **In-context learning** - 需要注意的是這些 shot 不是在作 fine-tune,而是直接給他看過這些文字,完全沒有 gradient update,完全沒有再重新訓練,只是丟進去做 inference ![截圖_2022-05-27_下午3.25.18](https://hackmd.io/_uploads/BkjR57yG1g.png) ## Data of GPT-3 - 他使用了以下幾個資料集,並根據資料集的品質給予不同的權重來混合,並且有故意讓這個權重跟資料個數不一樣 - 這裡的 tokens 數量是 byte-pair-encoded tokens - 可以注意到有些資料 (Wiki, WebText2, Books1) 是在多個 epochs 中都有被使用到的 ![螢幕擷取畫面_2022-05-28_142918](https://hackmd.io/_uploads/HJ7ysX1zye.png) 這邊他當然做了一些事情來清理這些資料, 1. 計算和高品質參考語料的相似度來清理 Common Crawl dataset (這個資料集原本有一兆個字) - 高品質語料: WebText2, Books1 and 2, Wikipedia data 2. 利用 fuzzy deduplication at the document level, within and across dataset 來避免 redundancy 並保存 held-out validation set 的完整性,好用來評估模型是否 overfit - [pandas-dedupe](https://github.com/Lyonk71/pandas-dedupe) 可以迅速幫忙 match 可能是重複資料的資料,並交由人類判斷是否是重複資料 ![螢幕擷取畫面_2022-05-29_031657](https://hackmd.io/_uploads/BybgjXkf1l.png) - 另一個可以做到一樣事情的 repo 是 [dedupe](https://github.com/dedupeio/dedupe) 3. 增加一些剛剛提到的高品質語料到 Common Crawl Dataset 中以增加資料多樣性,然後就沒了,我本來期望看到更多操作,但就沒了 ### 藏在論文中的小故事 - 雖然 OpenAI 一開始是希望讓下游任務的資料與預訓練的資料不要重複,但他們後來發現程式有 bug,可是模型已經 train 下去了,沒辦法重 train,所以…只能就這樣了 - 原文: Unfortunately, a bug in the filtering caused us to ignore some overlaps, and **due to the cost of training** it was not feasible to retrain the model - 為了彌補錯誤,他們就把 test data 分為 clean data 和 dirty data,前者是 GPT-3 沒看過的,後者是 GPT-3 有看過的 ![螢幕擷取畫面_2022-05-28_142507](https://hackmd.io/_uploads/SyDXi7kMkl.png) ## Model Spec of GPT-3 文中有提到訓練大模型的時候通常 batch size 要更大, learning rate 要更小,根據 [**Scaling Laws for Neural Language Models](https://arxiv.org/abs/2001.08361)。** ![螢幕擷取畫面_2022-05-28_143223](https://hackmd.io/_uploads/rk-4sXyGJl.png) - GPT-3 has 96 layers with each layer having 96 attention heads. - The size of word embeddings was increased to 12888 for GPT-3 from 1600 for GPT-2. - The context window size was increased from 1024 for GPT-2 to 2048 tokens for GPT-3. - Adam optimizer was used with $\beta_1$= 0.9, $\beta_2$= 0.95 and ε= $10^{-8}$. - Alternating dense and locally banded sparse attention patterns were used. - 這是從 [Generating Long Sequences with Sparse Transformers](https://arxiv.org/abs/1904.10509) 借鑒而來的操作,透過稀疏化 attention matrix 可以減少需要的 memory 與計算力,而他提出了兩種稀疏化的方式,strided and fixed,總之就是可以更有效率的去做 transformer 的 sliding window - 下圖表示的是一張 6x6 images 輸入兩個 attention heads,以及所有 output 和 input 的connectivity matrix ![1653721877447](https://hackmd.io/_uploads/SyK4o7Jfkg.jpg) 更多 sparse transformer 介紹有興趣可以自行研究: [Sparse Transformer](https://zhuanlan.zhihu.com/p/84802318) ## Result ### GPT-3 能做到什麼 - 這篇所用到的 42 tasks 的平均 benchmarks ![螢幕擷取畫面_2022-05-28_133601](https://hackmd.io/_uploads/H1GIo7kM1g.png) - Close book QA: 在回答問題的時候模型不能存取任何外部資源,也就是只能靠自己去做到問答 - more challenging than SQuAD (Extraction-based QA) ![2020092007571855](https://hackmd.io/_uploads/BktUiX1GJe.png) ![螢幕擷取畫面_2022-05-28_140502](https://hackmd.io/_uploads/B1ZDim1f1g.png) - 在當時, GPT-3 以 Few-Shot Learning 的方式超越了 Fine-tuned SOTA ![螢幕擷取畫面_2022-05-28_133853](https://hackmd.io/_uploads/BkXus7JG1g.png) ![螢幕擷取畫面_2022-05-28_140527](https://hackmd.io/_uploads/ryddjX1Gke.png) - Few-Shot 可以超越 Fine-tuned BERT ![螢幕擷取畫面_2022-05-28_135122](https://hackmd.io/_uploads/S15YoX1fyg.png) - 由 GPT-3 所產生出來的新聞隨著參數量越來越大,越來越能騙過人類 ![螢幕擷取畫面_2022-05-28_135410](https://hackmd.io/_uploads/rkMcsQkzyg.png) - GPT-3 可以照樣造句 ![螢幕擷取畫面_2022-05-28_135538](https://hackmd.io/_uploads/rJp5jXyMye.png) - GPT-3 可以做數學問題 - 但頂多只能做三位數的加減,更難就不行了 ![螢幕擷取畫面_2022-05-28_135930](https://hackmd.io/_uploads/Bk02oXkfyl.png) ![螢幕擷取畫面_2022-05-28_140002](https://hackmd.io/_uploads/SyoTimkfke.png) ![螢幕擷取畫面_2022-05-28_140310](https://hackmd.io/_uploads/BJM0imJfJg.png) - GPT-3 可以產生程式碼 [GitHub Copilot · Your AI pair programmer](https://copilot.github.com/) - 催生出 DALL-E, Imagen 等模型 [DALL·E 2](https://openai.com/dall-e-2/) [Imagen](https://imagen.research.google/) - 更多相關應用 [GitHub - elyase/awesome-gpt3](https://github.com/elyase/awesome-gpt3#awesome-gpt-3) ### GPT-3 不能做到甚麼 - ANLI (Adversarial Natural Language Inference): 給模型兩個句子,讓他判斷兩句子是矛盾、互相包含還是中立 ![螢幕擷取畫面_2022-05-28_140759](https://hackmd.io/_uploads/HyL-nmJzyx.png) - WiC (Word-in-Context Dataset): 比較一個字在兩個句子中的用法是否一樣,GPT-3 在這項任務上同樣表現得不太好 ![螢幕擷取畫面_2022-05-28_144434](https://hackmd.io/_uploads/SkyMh7Jzke.png) - 其他 GPT-3 的限制 (官方說法) - GPT-3 在 text synthesis 上所產生出的文字品質雖然很好,但仍看得出來會有重複的部分,並在文章很長的時候會逐漸失去連貫性 - 在 domain knowledge 相關的 task 中,GPT-3 對於 common sense physics 特別無法理解,或許連機器也無法參透物理之美 (大型的預訓練模型缺少對於一般世界的常識,這在 [Experience Grounds Language](https://arxiv.org/abs/2004.10151) 中,就有被提到) - 由於 GPT-3 是單向的模型,對於那些用雙向訓練更好的任務沒辦法表現得很好,例如填空題任務或是一些閱讀理解的任務 (RACE, QuAC) - pre-training 的時候把每一個 token 都當作同等重要的非常沒有效率,根據 [**How Much Knowledge Can You Pack Into the Parameters of a Language Model?](https://arxiv.org/abs/2002.08910)** 的研究,為每個任務去訂製一個 pre-training objective 會在任務上表現更好 - Expensive and inconvenient to perform inference,這麼大的模型當然什麼都很麻煩,而他們覺得未來可以朝模型蒸餾這方面去解決,畢竟我們也從未蒸餾過一個幾百億參數的模型 - 還有一個限制是 NLP 模型的共同限制,也就是 **poor sample efficiency during pre-training**,相較於影像模型或是人類來說,NLP 模型因為沒有辦法很好的做到特徵擷取,你必須將所有文字都讀過一遍,沒辦法只讀重點來獲取對文字的理解 - 最後是有關可解釋性的事情,想必這麼巨大的模型根本沒辦法去解釋他的產出,也很難去微調他的產出,他們就連 few shot learning 是怎麼 work 的也不知道,OpenAI 覺得理解 few shot 會是未來的研究方向之一 # References * [【機器學習2021】自督導式學習 (Self-supervised Learning) (四) - GPT的野望](https://www.youtube.com/watch?v=WY_E0Sd4K80) * [The Illustrated GPT-2 (Visualizing Transformer Language Models)](https://jalammar.github.io/illustrated-gpt2/) * [直觀理解 GPT-2 語言模型並生成金庸武俠小說](https://leemeng.tw/gpt2-language-model-generate-chinese-jing-yong-novels.html) * [[预训练语言模型专题] 银色独角兽GPT家族](https://cloud.tencent.com/developer/article/1618359) * [词向量之GPT-1,GPT-2和GPT-3](https://zhuanlan.zhihu.com/p/350017443) * [GPT-1,GPT-2和GPT-3发展历程及核心思想,GTP-4展望_yimenren的博客-CSDN博客_gpt网络](https://blog.csdn.net/yimenren/article/details/122286135) * [[DLHLP 2020] 來自獵人暗黑大陸的模型 GPT-3](https://www.youtube.com/watch?v=DOG1L9lvsDY) * [The Journey of Open AI GPT models](https://medium.com/walmartglobaltech/the-journey-of-open-ai-gpt-models-32d95b7b7fb2) * [The Annotated GPT-2](https://amaarora.github.io/2020/02/18/annotatedGPT2.html)