{"id":4390,"date":"2023-05-29T17:28:27","date_gmt":"2023-05-29T09:28:27","guid":{"rendered":"http:\/\/www.sniper97.cn\/?p=4390"},"modified":"2023-05-29T17:48:31","modified_gmt":"2023-05-29T09:48:31","slug":"%e3%80%90%e8%ae%ba%e6%96%87%e3%80%91general-language-model-pretraining-with-autoregressive-blank-infilling%ef%bf%bc","status":"publish","type":"post","link":"http:\/\/www.sniper97.cn\/index.php\/note\/deep-learning\/paper-deep-learning\/4390\/","title":{"rendered":"\u3010\u8bba\u6587\u3011General Language Model Pretraining with Autoregressive Blank Infilling"},"content":{"rendered":"\n<p><a href=\"https:\/\/arxiv.org\/pdf\/2103.10360.pdf\">https:\/\/arxiv.org\/pdf\/2103.10360.pdf<\/a><\/p>\n\n\n\n<div class=\"wp-block-aioseo-table-of-contents\"><ul><li><a href=\"#aioseo-1\">1.\u52a8\u673a<\/a><\/li><li><a href=\"#aioseo-2\">2.\u6a21\u578b\u7ed3\u6784\u4e0e\u6570\u636e\u6784\u9020<\/a><ul><li><a href=\"#aioseo-2-1\">2.1 \u6570\u636e\u6784\u9020<\/a><\/li><li><a href=\"#aioseo-2-2\">2.2 \u6a21\u578b\u7ec6\u8282<\/a><\/li><\/ul><\/li><li><a href=\"#aioseo-3\">3.\u8bad\u7ec3\u7b56\u7565<\/a><ul><li><a href=\"#aioseo-3-1\">3.1 \u6570\u636e\u7b56\u7565<\/a><\/li><li><a href=\"#aioseo-3-2\">3.2 \u6a21\u578b\u8bad\u7ec3<\/a><ul><li><a href=\"#aioseo-3-2-1\">3.2.1 \u5982\u4f55\u589e\u9879\u8bad\u7ec3\u7a33\u5b9a\u6027<\/a><\/li><\/ul><\/li><\/ul><\/li><li><a href=\"#aioseo-4\">4.\u5b9e\u9a8c\u6548\u679c<\/a><\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"aioseo-1\">1.\u52a8\u673a<\/h2>\n\n\n\n<p>&#8211;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"aioseo-2\">2.\u6a21\u578b\u7ed3\u6784\u4e0e\u6570\u636e\u6784\u9020<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aioseo-2-1\">2.1 \u6570\u636e\u6784\u9020<\/h3>\n\n\n\n<p>GLM\u901a\u8fc7\u8bbe\u8ba1\u81ea\u56de\u5f52\u7684\u5b8c\u5f62\u586b\u7a7a\u4efb\u52a1\uff0c\u5c06NLU\u548cNLG\u8f83\u597d\u7684\u7edf\u4e00\u5230\u4e86\u4e00\u4e2a\u6a21\u578b\u4e0b\uff0c\u5341\u5206\u7c7b\u4f3c\u4e8eUniLM\uff0c\u6216\u8005\u8bf4\u5c31\u662fUniLM\uff0cinput\u90e8\u5206\u4e3a\u53cc\u5411attention\uff0c\u800cmask\u548c\u751f\u6210\u90e8\u5206\u4e3a\u5355\u9879attention\u3002\u6a21\u578b\u7ed3\u6784\u5982\u4e0b\u56fe\u6240\u793a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"324\" src=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-1024x324.png\" alt=\"\" class=\"wp-image-4406\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-1024x324.png 1024w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-300x95.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-768x243.png 768w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-1536x487.png 1536w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-31-2048x649.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u5728\u8bad\u7ec3\u7b56\u7565\u4e0a\uff0c\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n\n\n\n<ul><li>GLM\u628a\u9884\u8bad\u7ec3\u4efb\u52a1\u8bbe\u8ba1\u6210\u5b8c\u5f62\u586b\u7a7a\u5f62\u5f0f\u7684\u7075\u611f\u6765\u6e90\u4e8ePattern-Exploiting Training\uff08<a href=\"https:\/\/aclanthology.org\/2021.eacl-main.20.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">PET<\/a>\uff09<\/li><li>GLM\u4ece\u8f93\u5165\u6587\u672c\u4e2d\u968f\u673a\u6316\u51fa\u51e0\u4e2a\u5305\u542b\u8fde\u7eedtoken\u7684span\u540e\u7684Mask\uff0c\u7136\u540e\u518d\u53e5\u5b50\u672b\u5c3e\u901a\u8fc7\u81ea\u56de\u5f52\u7684\u65b9\u5f0f\u751f\u6210\u88ab\u6316\u51fa\u7684span\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/li><li>\u539f\u59cb\u7684\u8f93\u5165\u90e8\u5206\u91c7\u7528\u53cc\u5411\u6ce8\u610f\u529b\u673a\u5236\u3002<\/li><li>\u8f93\u5165\u53e5\u5b50\u540e\u9762\u7684\u586b\u7a7a\u548c\u751f\u6210\u90e8\u5206\u91c7\u7528\u5355\u9879\u6ce8\u610f\u673a\u5236\u3002<\/li><li>\u76f8\u5bf9Prefix LM\uff08UniLM\uff09\uff0c\u65b0\u589e\u4e862D position embedding\u3002<\/li><\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-32.png\" alt=\"\" class=\"wp-image-4407\" width=\"660\" height=\"94\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-32.png 938w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-32-300x43.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-32-768x110.png 768w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/figure><\/div>\n\n\n<p>\u5982\u4e0a\u56fe\uff0cMask\u4e86pos4\u548cpos5\uff0c\u5176\u4e2dpos4 MASK\u7684\u8bcd\u957f\u5ea6\u4e3a2\uff0cpos5 \u957f\u5ea6\u4e3a2\u30022D position\u7684embedding\u6837\u4f8b\u5982\u56fe\u6240\u793a\u3002 <\/p>\n\n\n\n<p>\u5bf9\u4e8eNLU\u4efb\u52a1\uff0c\u6309\u7167PET\u7684\u505a\u6cd5\uff0c\u5c06NLU\u4efb\u52a1\u91cd\u65b0\u5b9a\u4e49\u6210\u81ea\u56de\u5f52\u7684\u586b\u7a7a\u751f\u6210\u4efb\u52a1\u3002<\/p>\n\n\n\n<p>eg:  a sentiment classification task can be formulated as \u201c{SENTENCE}. It\u2019s really [MASK]\u201d.<\/p>\n\n\n\n<p>\u5bf9\u4e8eNLG\u4efb\u52a1\uff0c\u5728\u8f93\u5165\u7684\u53e5\u5b50\u672b\u5c3e\u6dfb\u52a0Mask\u6807\u8bb0\uff0c\u8981\u6c42\u6a21\u578b\u7d27\u63a5\u7740\u751f\u6210\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aioseo-2-2\">2.2 \u6a21\u578b\u7ec6\u8282<\/h3>\n\n\n\n<p>\u4f4d\u7f6e\u7f16\u7801\u4f7f\u7528RoPE\uff0c\u540c\u65f6\u524d\u9988\u5c42\u4f7f\u7528\u4e86\u57fa\u4e8eGELU\u7684GLU-GeGLU\u3002\u4f5c\u4e3a\u5bf9\u6bd4\uff0cPaLM\u4f7f\u7528SwiGLU\uff0cOPT\u3001GPT\u3001BLOOM\u4f7f\u7528\u7684\u662f\u539f\u59cb\u7684FFN\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"aioseo-3\">3.\u8bad\u7ec3\u7b56\u7565<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aioseo-3-1\">3.1 \u6570\u636e\u7b56\u7565<\/h3>\n\n\n\n<p>GLM\u7684\u9884\u8bad\u7ec3\u90e8\u5206\u5305\u542b\u4e86\u4e24\u79cd\u6570\u636e\uff1a<\/p>\n\n\n\n<ul><li>95%\u7684\u81ea\u56de\u5f52\u6587\u672c\u751f\u6210\u4efb\u52a1<\/li><li>5%\u7684\u4efb\u52a1\u578b\u5bf9\u8bdd<\/li><\/ul>\n\n\n\n<p>\u540c\u65f6\uff0c\u4e3a\u4e86\u540c\u65f6\u652f\u6301NLU\u548cNLG\uff0c\u8bbe\u8ba1\u4e862\u79cdmask\u4efb\u52a1\u3002<\/p>\n\n\n\n<ul><li>[MASK] \u9605\u8bfb\u7406\u89e3\u4efb\u52a1\u7684MASK\uff0cmask\u6bd4\u4f8b\u548cbert\u4e00\u6837\uff0c15%mask\u3002<\/li><li>[gMASK] \u6587\u672c\u751f\u6210\u7684mask\uff0c\u5728\u8f93\u5165\u672b\u5c3e\u62fc\u63a5gmask\uff0c\u968f\u540e\u5f00\u59cb\u81ea\u56de\u5f52\u7eed\u5199\u3002<\/li><\/ul>\n\n\n\n<p>\u4e24\u79cdmask\u7684\u6570\u636e\u6bd4\u4f8b\u4e3a3:7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aioseo-3-2\">3.2 \u6a21\u578b\u8bad\u7ec3<\/h3>\n\n\n\n<p>GLM130B\u4f7f\u7528\u4e8696\u5f20A100*40G\u8bad\u7ec3\u4e8660\u5929\uff0c\u7d2f\u8ba1\u4f7f\u7528\u4e86600B token\uff0c\u5176\u4e2d\u4e2d\u82f1\u6587\u5404200B\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"aioseo-3-2-1\">3.2.1 \u5982\u4f55\u589e\u9879\u8bad\u7ec3\u7a33\u5b9a\u6027<\/h4>\n\n\n\n<p>\u5bf9\u6bd4\u4e86Pre-Norm\u3001Post-Norm \u7d2f\u8ba1\u8bad\u7ec3\u4e8630\u591a\u6b21\u90fd\u6ca1\u6709\u529e\u6cd5\u6709\u6bd4\u8f83\u597d\u7684\u7a33\u5b9a\u6027\uff0c\u6700\u7ec8\u9009\u62e9\u4e86<a href=\"http:\/\/www.sniper97.cn\/index.php\/note\/deep-learning\/note-deep-learning\/4401\/\" target=\"_blank\" rel=\"noopener\" title=\"\u3010\u6df1\u5ea6\u5b66\u4e60\u7b14\u8bb0\u3011Pre-Norm\u3001Post-Norm\u4e0eDeepNorm\">DeepNorm<\/a>\uff0c\u83b7\u5f97\u4e86\u8f83\u4e3a\u7a33\u5b9a\u7684\u8bad\u7ec3\u8fc7\u7a0b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"320\" src=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-33-1024x320.png\" alt=\"\" class=\"wp-image-4408\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-33-1024x320.png 1024w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-33-300x94.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-33-768x240.png 768w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-33.png 1406w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u8bad\u7ec3\u65f6\uff0c\u4e5f\u4f9d\u7136\u4f7f\u7528\u4e86\u6df7\u5408\u7cbe\u5ea6\u6765\u4fdd\u8bc1\u8bad\u7ec3\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n\n\n\n<p>\u4e0d\u8fc7\u4f9d\u7136\u53d1\u73b0\uff0c\u4f1a\u51fa\u73b0loss spike\uff0c\u8bad\u7ec3\u4e0d\u7a33\u5b9a\u3002\u7ed3\u5408DeepNorm\u7684\u7ed3\u8bba\uff0c\u672c\u6587\u7ee7\u7eed\u63a2\u7d22\u4e86\u5404\u5c42\u4e4b\u95f4\u7684\u68af\u5ea6\uff0c\u6700\u7ec8\u786e\u5b9a\u4e3b\u8981\u539f\u56e0\u662fembedding\u7684\u68af\u5ea6\u76f8\u5bf9\u8f83\u5927\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-34.png\" alt=\"\" class=\"wp-image-4409\" width=\"428\" height=\"312\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-34.png 670w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-34-300x219.png 300w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/figure><\/div>\n\n\n<p>\u4f7f\u7528\u4e86\u4e00\u4e2a\u03b1\u7684\u5e73\u6ed1\uff08EGS\uff09\uff0c\u6765\u4eba\u4e3a\u7684\u964d\u4f4e\u68af\u5ea6\u7684\u66f4\u65b0\u8303\u56f4\uff0c\u4f7f\u5f97\u8bad\u7ec3\u66f4\u4e3a\u7a33\u5b9a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-35.png\" alt=\"\" class=\"wp-image-4410\" width=\"464\" height=\"336\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-35.png 674w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2023\/05\/image-35-300x217.png 300w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/figure><\/div>\n\n\n<p>\u540c\u65f6\uff0c\u7531\u4e8e\u521d\u59cb\u5316\u4ee5\u53ca\u68af\u5ea6\u76f8\u5bf9\u8f83\u5c0f\uff0c\u4f7f\u5f97\u6a21\u578b\u7684\u6700\u7ec8\u7684\u53c2\u6570\u5206\u5e03\u66f4\u52a0\u96c6\u4e2d\uff0c\u66f4\u5bb9\u6613\u8fdb\u884c\u91cf\u5316\u3002GLM\u751a\u81f3\u53ef\u4ee5\u8fdb\u884cINT4\u7684\u91cf\u5316\u3002\u51cf\u8f7b\u4e86\u63a8\u7406\u6210\u672c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"aioseo-4\">4.\u5b9e\u9a8c\u6548\u679c<\/h2>\n\n\n\n<p>&#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/arxiv.org\/pdf\/2103.10360.pdf 1.\u52a8\u673a &#8211;  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16],"tags":[],"views":6225,"_links":{"self":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/4390"}],"collection":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4390"}],"version-history":[{"count":2,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/4390\/revisions"}],"predecessor-version":[{"id":4412,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/4390\/revisions\/4412"}],"wp:attachment":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4390"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}