點擊上方,選擇星標或置頂,每天給你送乾貨!
閱讀大概需要5分鐘
跟隨小博主,每天進步一丟丟
編輯:zenRRan
作者:brightmart
github:https://github.com/brightmart/albert_zh
海量中文語料上預訓練ALBERT模型:參數更少,效果更好
Chinese version of ALBERT pre-trained model
ALBERT模型介紹ALBERT模型是BERT的改進版,與最近其他State of the art的模型不同的是,這次是預訓練小模型,效果更好、參數更少。
預訓練小模型也能拿下13項NLP任務,ALBERT三大改造登頂GLUE基準
它對BERT進行了三個改造:
1)詞嵌入向量參數的因式分解 Factorized embedding parameterization
O(V * H) to O(V * E + E * H)如以ALBert_xxlarge為例,V=30000, H=4096, E=128那麼原先參數為V * H= 30000 * 4096 = 1.23億個參數,現在則為V * E + E * H = 30000*128+128*4096 = 384萬 + 52萬 = 436萬,詞嵌入相關的參數變化前是變換後的28倍。2)跨層參數共享 Cross-Layer Parameter Sharing
參數共享能顯著減少參數。共享可以分為全連接層、注意力層的參數共享;注意力層的參數對效果的減弱影響小一點。
3)段落連續性任務 Inter-sentence coherence loss.
使用段落連續性任務。正例,使用從一個文檔中連續的兩個文本段落;負例,使用從一個文檔中連續的兩個文本段落,但位置調換了。避免使用原有的NSP任務,原有的任務包含隱含了預測主題這類過於簡單的任務。We maintain that inter-sentence modeling is an important aspect of language understanding, but we propose a lossbased primarily on coherence. That is, for ALBERT, we use a sentence-order prediction (SOP) loss, which avoids topicprediction and instead focuses on modeling inter-sentence coherence. The SOP loss uses as positive examples thesame technique as BERT (two consecutive segments from the same document), and as negative examples the same twoconsecutive segments but with their order swapped. This forces the model to learn finer-grained distinctions aboutdiscourse-level coherence properties.發布計劃 Release Plan1、albert_base, 參數量12M, 層數12,10月5號2、albert_large, 參數量18M, 層數24,10月13號3、albert_xlarge, 參數量59M, 層數24,10月6號4、albert_xxlarge, 參數量233M, 層數12,10月7號(效果最佳的模型)
訓練語料40g中文語料,超過100億漢字,包括多個百科、新聞、互動社區、小說、評論。模型性能與對比模型參數和配置Reference1、ALBERT: A Lite BERT For Self-Supervised Learning Of Language Representationshttps://openreview.net/pdf?id=H1eA7AEtvS2、預訓練小模型也能拿下13項NLP任務,ALBERT三大改造登頂GLUE基準http://baijiahao.baidu.com/s?id=1645712785366950083&wfr=spider&for=pc3、BERT: Pre-training of Deep Bidirectional Transformers for Language Understandinghttps://arxiv.org/pdf/1810.04805.pdf4、SpanBERT: Improving Pre-training by Representing and Predicting Spanshttps://arxiv.org/abs/1907.10529實在智能算法團隊
作者介紹:
徐亮,實在智能算法專家,在深度學習、文本分類、意圖識別、問答系統方面有非常深入的研究和創新,github top10最受歡迎的文本分類項目作者。方便交流學習,備註:暱稱-學校(公司)-方向,進入DL&NLP交流群。
方向有很多:機器學習、深度學習,python,情感分析、意見挖掘、句法分析、機器翻譯、人機對話、知識圖譜、語音識別等。