{"id":346766,"date":"2023-03-15T15:06:56","date_gmt":"2023-03-15T15:06:56","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346766"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-03-15T15:06:56","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346766","title":{"rendered":"<span>\u041a\u0430\u043a \u0432\u043e\u0441\u043f\u0438\u0442\u0430\u0442\u044c GPT-3 \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c90\/e79\/121\/c90e79121c6be5565f88ee6142bfbb1e.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c90\/e79\/121\/c90e79121c6be5565f88ee6142bfbb1e.png\"\/><\/figure>\n<p>\u0427\u0430\u0442-\u0431\u043e\u0442 ChatGPT \u043d\u0430\u0434\u0435\u043b\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430: \u043b\u044e\u0434\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0443\u0434\u0438\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b\u00a0\u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0438\u0448\u0443\u0442 \u0434\u0438\u043f\u043b\u043e\u043c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430 \u00ab\u0421\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 ChatGPT \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440\u043e\u0432?\u00bb. <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u043d ChatGPT, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 open-source GPT-3-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c GPT-3-like \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445?<\/p>\n<p>\u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 GPT-J \u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u041f\u041a \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u043e\u0439 Nvidia GTX 1080TI \u0441 11 GB VRAM. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u043e \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c\u00a0\u0435\u0435 (fine-tune). \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u2014 \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e GPT-J <\/h3>\n<p>GPT (\u0430\u043d\u0433\u043b. Generative\u00a0Pre-trained\u00a0Transformer \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439\u00a0\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440) \u2014 \u044d\u0442\u043e \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043b\u043e\u0432\u043e. GPT \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u043e\u043c\u043d\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u044b. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 GPT, \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 [<span><u>1<\/u><\/span>] \u0438 [<span><u>15<\/u><\/span>].<\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 GPT-J \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b EleutherAI \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u0441\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0435\u0435 \u0432 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041f\u043e\u043b\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 [<span><u>2<\/u><\/span>].<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ac\/3eb\/d07\/3ac3ebd0715af23417ed59494ead9d61.png\" alt=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \" title=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \" width=\"846\" height=\"525\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ac\/3eb\/d07\/3ac3ebd0715af23417ed59494ead9d61.png\"\/><\/p>\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439. <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>LAMBADA <\/strong>\u2014 \u044d\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0434\u0432\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: \u043f\u0435\u0440\u043f\u043b\u0435\u043a\u0441\u0438\u044f\u00a0<strong>PPl\u00a0<\/strong>(\u043c\u0435\u043d\u044c\u0448\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435) \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>Acc\u00a0<\/strong>(\u0432\u044b\u0448\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435);<\/p>\n<\/li>\n<li>\n<p><strong>Winorgande\u00a0<\/strong>\u2014 \u044d\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p><strong>Hellaswag\u00a0<\/strong>\u2014 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043d\u0430 \u0437\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b;<\/p>\n<\/li>\n<li>\n<p><strong>PIQA <\/strong>\u2014 \u0442\u0430\u043a\u0436\u0435 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0437\u0434\u0440\u0430\u0432\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u2013 \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u043e\u0446\u0435\u043d\u043a\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 public-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 GPT-J \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0445. \u0410 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u043e\u0442 OpenAI GPT-J \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Curie \u0438 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0439 Davinci. \u041e\u0431\u044a\u0435\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 GPT-J \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u0435\u043d \u2014 825 GB [<span><u>4<\/u><\/span>], \u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0432\u0435\u0441\u043e\u0432) \u043c\u043e\u0434\u0435\u043b\u0438 ~ 6 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432. <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GPT-J \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Python, transformers \u0438 pytorch\u00a0lightning. GPT-J \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f open\u00a0source-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Hugging\u00a0Face\u00a0Hub\u00a0[<span><u>5<\/u><\/span>]. <\/p>\n<h3>8 bit GPT-J<\/h3>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 EleutherAI \u0441 float16 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 21 GB VRAM \u2014 \u0430 \u044d\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0427\u0442\u043e\u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043d\u0441\u0442\u0440\u0430 \u043d\u0430 \u043d\u0430\u0448 \u041f\u041a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 [<span><u>6<\/u><\/span>, <span><u>7<\/u><\/span>] \u2014 \u0445\u0438\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 float16 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 int8 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u044f \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0443\u0434\u044f \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f GPT-J \u0438 GPT-J-8bit, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438 [<span><u>8<\/u><\/span>].<\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c GPT-J [<span><u>3<\/u><\/span>] \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0435\u0431\u044f\u0442\u0430\u043c \u0438\u0437 <span><u>Training\u00a0Transformers\u00a0Together<\/u><\/span>\u00a0[<span><u>9<\/u><\/span>] \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 6 GB \u043d\u0430 GTX 1080 TI. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441 \u043d\u0435\u0439 \u043f\u043e\u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0435\u043c\u0441\u044f.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5a\/434\/2bf\/c5a4342bf3b48d6b076f810f40ee76d4.png\" width=\"597\" height=\"289\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c5a\/434\/2bf\/c5a4342bf3b48d6b076f810f40ee76d4.png\"\/><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u2014 input \u0438 output \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043a\u0430\u043a\u0430\u044f \u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. GPT \u043e\u0447\u0435\u043d\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u0440\u0438\u0432\u0435\u0442, attention!) \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0443\u0441\u043b\u044b\u0448\u0430\u0432 \u0441\u043b\u043e\u0432\u043e, \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.  <\/p>\n<h3>Input<\/h3>\n<p>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cd9\/65f\/122\/cd965f12248197356e6c911ff2a5d028.png\" width=\"890\" height=\"229\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd9\/65f\/122\/cd965f12248197356e6c911ff2a5d028.png\"\/><\/figure>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<strong>input_ids<\/strong>) \u0438 <strong>attention\u00a0mask<\/strong>.\u00a0\u041e\u0431\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043e\u0439 2048. <\/p>\n<ul>\n<li>\n<p><strong>\u0412\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/strong> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b:\u00a0id\u00a0\u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 50257 \u0442\u043e\u043a\u0435\u043d\u043e\u0432;\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Attention\u00a0mask<\/strong>: \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u043d\u0443\u043b\u044f\u043c\u0438 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 (1), \u0430 \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u2014 \u043d\u0435\u0442 (0).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 GPT \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0431\u0435\u0441\u0435\u0434\u044b \u0441\u043b\u043e\u0432\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 0 \u0432 attention\u00a0mask. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 0 \u0434\u043b\u044f \u043f\u0430\u0434\u0434\u0438\u043d\u0433-\u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u044d\u043c\u043f\u043b\u044b \u0432 \u0431\u0430\u0442\u0447 (\u043f\u043e\u0440\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f) \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0434\u0434\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u0434\u043b\u0438\u043d\u044b \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0441\u044d\u043c\u043f\u043b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c). <\/p>\n<p>\u041d\u0430 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0448\u0435 \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a sample_text \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 input_ids \u0438 attention_mask.<\/p>\n<h3>Output\u00a0<\/h3>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 GPT \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u043d\u043e \u043a\u0440\u043e\u043c\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<strong>logits<\/strong>) \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 (<strong>past_key_values<\/strong>). \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 output \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21f\/99e\/019\/21f99e019601451d43a5b4a8207907fe.png\" width=\"859\" height=\"558\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21f\/99e\/019\/21f99e019601451d43a5b4a8207907fe.png\"\/><\/figure>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u00a0\u0442\u0435\u043d\u0437\u043e\u0440\u0430\u00a0<strong>logits <\/strong>\u2014 (batch_size, sample_len, vocab_size). \u041d\u0430\u0448 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b\u00a0&#8216;Hello, GPT-J! How\u00a0are\u00a0you?&#8217; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 12 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 logits \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 (1, 12, 50400). <\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u044d\u043c\u043f\u043b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u0412 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. <\/p>\n<ul>\n<li>\n<p><strong>past_key_value<\/strong> \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0420\u0430\u0437\u043c\u0435\u0440\u00a0\u0442\u0435\u043d\u0437\u043e\u0440\u0430: (n_layers, key_value, batch, n_attention_heads, sample_len, head_embedding_dimension);<\/p>\n<\/li>\n<li>\n<p><strong>n_layers\u00a0<\/strong>\u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 GPT-J;<\/p>\n<\/li>\n<li>\n<p><strong>key_value<\/strong> \u2014 \u043a\u043e\u0440\u0442\u0435\u0436 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (Attention) [<span><u>10<\/u><\/span>];<\/p>\n<\/li>\n<li>\n<p><strong>batch<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447\u0430;\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>n_attention_heads<\/strong> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u00a0\u0433\u043e\u043b\u043e\u0432 attention;<\/p>\n<\/li>\n<li>\n<p><strong>sample_len\u00a0<\/strong>\u2014 \u0434\u043b\u0438\u043d\u0430 \u0441\u044d\u043c\u043f\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>head_embedding_dimension<\/strong> \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u00a0attention head;<\/p>\n<\/li>\n<li>\n<p><strong>n_layers, key_value, n_attention_heads, head_embedding_dimension<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435\u00a0\u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f\u00a0\u043a\u00a0\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438\u00a0\u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT\u00a0\u043c\u043e\u0434\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0442\u044b \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 3 \u043a\u043b\u0430\u0441\u0441\u0430: hate (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u043d\u0435\u043d\u0430\u0432\u0438\u0441\u0442\u044c), offensive (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0443\u0433\u0440\u043e\u0437\u0443), neutral (\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435). <\/p>\n<p>\u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e\u00a0\u0431\u0443\u0434\u0435\u043c\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Hate Speech and Offensive Language Dataset [<span><u>11<\/u><\/span>]. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 GPT \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0435\u0442 \u043e \u044f\u0437\u044b\u043a\u0435 \u0438 \u0441\u043b\u043e\u0432\u0430\u0445, \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043b\u0438\u0448\u044c 1000 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0432 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c 200 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. \u041d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0443\u0447\u0438\u0442\u044c GPT-J-8bit \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<h4>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435?<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0440\u0430\u0437\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0444\u0440\u0430\u0437\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438 \u2014 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u044d\u043c\u043f\u043b\u0430 \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b, \u043a\u0440\u043e\u043c\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441\u044d\u043c\u043f\u043b\u0430 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0446\u0435\u043b\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438. \u041a \u0432\u0430\u0436\u043d\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443 \u043e\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f (\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0435\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u044b \u043a\u0430\u043a \u0431\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u00a0\u2013  \u043a\u043e\u0433\u0434\u0430 \u0436\u0434\u0435\u043c \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e GPT \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e.\u00a0 <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f8a\/e01\/0d7\/f8ae010d70d27c8754d42562f0a5a112.png\" width=\"874\" height=\"209\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f8a\/e01\/0d7\/f8ae010d70d27c8754d42562f0a5a112.png\"\/><\/figure>\n<p>\u041d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0430\u043c\u0438-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438, \u0442\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u0442\u0440\u0430\u0432\u043e\u043a, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c. <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u044d\u043c\u043f\u043b\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u0438\u043d\u043d\u0435\u0435. \u041d\u043e \u0437\u0430\u0442\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c, \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u2013 \u0447\u0435\u0433\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0435 \u0445\u043e\u0442\u0438\u043c: GPT \u0432\u0438\u0434\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438, \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u044f \u0435\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT \u0440\u0435\u0448\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. <\/p>\n<h4>\u0427\u0442\u043e\u00a0\u043e\u0431\u0443\u0447\u0430\u0442\u044c? (Low-Rank Adapters)<\/h4>\n<p>\u0412 GPT-J-8bit \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u044b. \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c cross\u00a0entropy\u00a0loss \u043b\u0435\u0436\u0438\u0442 \u0432 [0, 1]. \u041d\u043e \u0434\u0430\u0436\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 <em>LoRA: Low-Rank\u00a0Adaption\u00a0of\u00a0Large\u00a0Language\u00a0Models<\/em>\u00a0[<span><u>12<\/u><\/span>] \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0417\u0430\u0447\u0435\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u043c \u0432\u0441\u0435 \u0441\u043b\u043e\u0438 \u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e. \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u043b\u043e\u044f A \u0438 B \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (d, r) \u0438 (r, d). \u0418 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u00ab\u0440\u043e\u0434\u043d\u043e\u0433\u043e\u00bb \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438 W \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (d,d) (\u0430 \u0443\u00a0 GPT-J d \u0440\u0430\u0432\u0435\u043d 4096) \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435. \u0410\u0432\u0442\u043e\u0440\u044b LoRA \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 r \u0440\u0430\u0432\u0435\u043d 2, \u0447\u0435\u043c \u043e\u043f\u0440\u0430\u0432\u0434\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Low-Rank\u00a0Adaption. \u0415\u0433\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd6\/82f\/df8\/bd682fdf853c1546488055f9afe606c6.png\" alt=\"LoRA\" title=\"LoRA\" width=\"292\" height=\"255\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd6\/82f\/df8\/bd682fdf853c1546488055f9afe606c6.png\"\/><\/p>\n<div><figcaption>LoRA<\/figcaption><\/div>\n<\/figure>\n<h4>\u041a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u0442\u044c? (Adam8bit)<\/h4>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u2014 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u0438\u0440\u0443\u0447\u0438\u0442\u044c \u0435\u0435. \u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GPT \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430, \u043d\u043e \u043c\u044b \u043e\u0431\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u0435 \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. <\/p>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Adam. \u041d\u0430\u043c \u0436\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <em>8-Bit Optimizers\u00a0via\u00a0Block-wise\u00a0Quantization<\/em>\u00a0[<span><u>13<\/u><\/span>] \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430\u043c (\u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0430\u043c) \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u0447\u043d\u0430\u044f (block-wise) \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u0442\u044c \u044d\u0442\u043e\u0433\u043e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dd4\/77c\/578\/dd477c57808073c4fc001dc9f4fd8101.png\" width=\"667\" height=\"319\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd4\/77c\/578\/dd477c57808073c4fc001dc9f4fd8101.png\"\/><\/figure>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\u00a0bitsandbytes\u00a0[<span><u>14<\/u><\/span>]\u00a0\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430. <\/p>\n<h4>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u0440\u0443\u0447\u0438\u0442\u044c GPT-J. \u041d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u0430\u043a-\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0430 \u0435\u0433\u043e \u043e\u0448\u0438\u0431\u043a\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <strong>loss\u00a0mask<\/strong> \u0432 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u044d\u0442\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u0430\u043c. \u0422\u0430\u043a \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0435, \u0430 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c loss \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0438. \u0418 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0435 \u0445\u043e\u0442\u0438\u043c. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0448\u0430\u0433 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dab\/b03\/6df\/dabb036df12a0f8f9d521b2f66bb947e.png\" width=\"560\" height=\"392\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dab\/b03\/6df\/dabb036df12a0f8f9d521b2f66bb947e.png\"\/><\/figure>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0438 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0442\u0447\u0438. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u0435 \u0432\u0441\u0435 \u0441\u044d\u043c\u043f\u043b\u044b \u2014 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0434\u0434\u0438\u043d\u0433 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0438 \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435. \u0411\u0430\u0442\u0447\u0438\u043d\u0433 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 GPT-J \u0441 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u043c\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u0430, \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0438 \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b, \u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Adam8bit \u043d\u0430\u0433\u043e\u0442\u043e\u0432\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a fine-tuning\u2019\u0443\u00a0\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. <\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0442\u0440\u0451\u0445 \u044d\u043f\u043e\u0445. \u0422\u0430\u043a\u0436\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 1D \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0442\u0435 \u0441\u043b\u043e\u0438, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e) \u2014 861 K \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f attention \u0441\u043b\u043e\u0435\u0432 \u2014 2.7 M \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432 \u2014 5.2 \u041c \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>Few-shot \u2014 \u0431\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u00ab\u0443\u043c\u043d\u043e\u0439\u00bb \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0435\u0442 \u043e \u044f\u0437\u044b\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c. Few-shot \u043f\u043e\u0434\u0445\u043e\u0434, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b OpenAI\u00a0[<span><u>15<\/u><\/span>], \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0432 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. <\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b <\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043e\u0442\u0447\u0435\u0442 [<span><u>16<\/u><\/span>] \u043f\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 GPT-J. \u0413\u0440\u0430\u0444\u0438\u043a \u0441 <strong>loss\u00a0<\/strong>\u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438 loss \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043e\u0442 \u044d\u043f\u043e\u0445\u0438 \u043a \u044d\u043f\u043e\u0445\u0435. \u0410 \u043e\u0442 <strong>accuracy\u00a0<\/strong>\u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a3\/8c3\/3d6\/8a38c33d6362b78738016fe49b59fbeb.png\" alt=\"GPT-J fine-tuning report \" title=\"GPT-J fine-tuning report \" width=\"764\" height=\"602\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a3\/8c3\/3d6\/8a38c33d6362b78738016fe49b59fbeb.png\"\/><\/p>\n<div><figcaption>GPT-J fine-tuning report <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u044b\u0442\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 OpenAI \u0447\u0435\u0440\u0435\u0437 API \u0432 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412\u043e\u0442 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e fine-tuning\u2019\u0443 GPT-3 Ada \u0438 GPT-3 Davinci\u00a0[<span><u>17<\/u><\/span>]. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 loss \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u0442\u0435\u0440\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e cross\u00a0entropy. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/296\/183\/1c5\/2961831c58cc711297ac1415e35cea76.png\" alt=\"OpenAI\u2019s models fine-tuning report \" title=\"OpenAI\u2019s models fine-tuning report \" width=\"720\" height=\"569\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/296\/183\/1c5\/2961831c58cc711297ac1415e35cea76.png\"\/><\/p>\n<div><figcaption>OpenAI\u2019s models fine-tuning report <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c44\/0e0\/313\/c440e0313411d4b96a92bace0feebf55.png\" alt=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-J \u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 OpenAI\" title=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-J \u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 OpenAI\" width=\"514\" height=\"235\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c44\/0e0\/313\/c440e0313411d4b96a92bace0feebf55.png\"\/><\/p>\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-J \u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 OpenAI<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0432\u0437\u043e\u0439\u0442\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0442 OpenAI \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0438 \u0447\u0435\u043c \u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. Few-shot \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e. \u0410 ChatGPT (GPT-3.5-turbo) \u0434\u0430\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0445\u043e\u0442\u044f \u0438 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c GPT-J \u0431\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c  GPT-J \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c\u00a0OpenAI GPT-3 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 API \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u044b\u0440\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c \u2014 \u0442\u043e Davinci \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u2014 84 %. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 OpenAI \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0434\u0435\u043d\u0435\u0433: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0432\u0443\u0445 \u043f\u0435\u0447\u0430\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0442\u0435\u043a\u0441\u0442\u0430 \u043c\u044b \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u043c 12 \u0446\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0439 \u043a\u0440\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0442 \u0438 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ea\/f1f\/860\/4eaf1f86037ed3530ee32f2c02858914.png\" alt=\"\u0426\u0435\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\" title=\"\u0426\u0435\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\" width=\"611\" height=\"238\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ea\/f1f\/860\/4eaf1f86037ed3530ee32f2c02858914.png\"\/><\/p>\n<div><figcaption>\u0426\u0435\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0430\u0445<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u2014 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0441 \u0441\u0430\u0439\u0442\u0430 BBC.<\/p>\n<p>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c \u0432 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0430\u0445 \u043e\u043d\u0430 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0435 \u0445\u043e\u0442\u0438\u043c, \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u0445. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/411\/ad0\/838\/411ad08383e96d9500db5d33e27bd961.png\" alt=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\" title=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\" width=\"1203\" height=\"524\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/411\/ad0\/838\/411ad08383e96d9500db5d33e27bd961.png\"\/><\/p>\n<div><figcaption>\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, OpenAI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a API ChatGPT \u2014 gpt-3.5-turbo. \u0417\u0430\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u044b\u0437\u0432\u0430\u043b\u0438 \u043e\u043f\u0430\u0441\u0435\u043d\u0438\u0435, \u0447\u0442\u043e gpt-3.5-turbo \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0435\u0441\u0446\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u041d\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0443\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u044b\u0448\u0435. ChatGPT \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0442\u0430\u043a \u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043a\u0430\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>\u041d\u0430\u043c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u044f\u043d\u044c\u043a\u043e\u0439 \u0434\u043b\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430: \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041e\u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0435\u0449\u0430\u044e\u0449\u0443\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e GPT \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432 \u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c\u00a0[<span><u>18<\/u><\/span>], \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.\u00a0 <\/p>\n<p><strong>\u0421\u0441\u044b\u043b\u043a\u0438<\/strong><\/p>\n<ol>\n<li>\n<p><span><u>Building a GPT-like Model from Scratch with Detailed Theory and Code Implementation \/ \u0425\u0430\u0431\u0440 (habr.com)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>EleutherAI\/gpt-j-6B \u00b7 Hugging Face<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>hivemind\/gpt-j-6B-8bit \u00b7 Hugging Face<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>The\u00a0Pile (eleuther.ai)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>Models &#8212; Hugging\u00a0Face<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>How to accelerate and compress neural networks with quantization | by Tivadar Danka | Towards Data Science<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>Achieving FP32 Accuracy for INT8 Inference Using Quantization Aware Training with NVIDIA TensorRT | NVIDIA Technical Blog<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>Jupyter Notebook Viewer (nbviewer.org)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p>https:\/\/training-transformers-together.github.io<\/p>\n<\/li>\n<li>\n<p><span><u>[1706.03762] Attention Is All You Need (arxiv.org)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>Hate Speech and Offensive Language Dataset | Kaggle<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>[2106.09685] LoRA: Low-Rank Adaptation of Large Language Models (arxiv.org)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>[2110.02861] 8-bit Optimizers via Block-wise Quantization (arxiv.org)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>TimDettmers\/bitsandbytes: 8-bit CUDA functions for PyTorch (github.com)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>[2005.14165] Language Models are Few-Shot Learners (arxiv.org)<\/u><\/span><\/p>\n<\/li>\n<li>\n<p><span><u>https:\/\/api.wandb.ai\/links\/vetka925\/d7bb74kg<\/u><\/span>\u00a0<\/p>\n<\/li>\n<li>\n<p>https:\/\/api.wandb.ai\/links\/vetka925\/krtz93ul<\/p>\n<\/li>\n<li>\n<p><span><u>vetka925\/gpt-j-8bit-lightning-finetune (github.com)<\/u><\/span><\/p>\n<\/li>\n<\/ol>\n<p>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438: \u0412\u0438\u0442\u0430\u043b\u0438\u0439 \u0413\u0440\u0435\u0447\u0430\u0447\u0438\u043d, Data Scientist \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Neoflex.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/neoflex\/blog\/722584\/\"> https:\/\/habr.com\/ru\/company\/neoflex\/blog\/722584\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0430\u0442-\u0431\u043e\u0442 ChatGPT \u043d\u0430\u0434\u0435\u043b\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430: \u043b\u044e\u0434\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0443\u0434\u0438\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b\u00a0\u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0438\u0448\u0443\u0442 \u0434\u0438\u043f\u043b\u043e\u043c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430 \u00ab\u0421\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 ChatGPT \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440\u043e\u0432?\u00bb. <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u043d ChatGPT, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 open-source GPT-3-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c GPT-3-like \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445?<\/p>\n<p>\u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 GPT-J \u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u041f\u041a \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u043e\u0439 Nvidia GTX 1080TI \u0441 11 GB VRAM. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u043e \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c\u00a0\u0435\u0435 (fine-tune). \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u2014 \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e GPT-J <\/h3>\n<p>GPT (\u0430\u043d\u0433\u043b. Generative\u00a0Pre-trained\u00a0Transformer \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439\u00a0\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440) \u2014 \u044d\u0442\u043e \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043b\u043e\u0432\u043e. GPT \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u043e\u043c\u043d\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u044b. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 GPT, \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 [<span><u>1<\/u><\/span>] \u0438 [<span><u>15<\/u><\/span>].<\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 GPT-J \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b EleutherAI \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u0441\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0435\u0435 \u0432 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041f\u043e\u043b\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 [<span><u>2<\/u><\/span>].<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 GPT-like \u043c\u043e\u0434\u0435\u043b\u0435\u0439. <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>LAMBADA <\/strong>\u2014 \u044d\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0434\u0432\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: \u043f\u0435\u0440\u043f\u043b\u0435\u043a\u0441\u0438\u044f\u00a0<strong>PPl\u00a0<\/strong>(\u043c\u0435\u043d\u044c\u0448\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435) \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>Acc\u00a0<\/strong>(\u0432\u044b\u0448\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435);<\/p>\n<\/li>\n<li>\n<p><strong>Winorgande\u00a0<\/strong>\u2014 \u044d\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p><strong>Hellaswag\u00a0<\/strong>\u2014 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043d\u0430 \u0437\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b;<\/p>\n<\/li>\n<li>\n<p><strong>PIQA <\/strong>\u2014 \u0442\u0430\u043a\u0436\u0435 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0437\u0434\u0440\u0430\u0432\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u2013 \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u043e\u0446\u0435\u043d\u043a\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 public-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 GPT-J \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0445. \u0410 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u043e\u0442 OpenAI GPT-J \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Curie \u0438 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0439 Davinci. \u041e\u0431\u044a\u0435\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 GPT-J \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u0435\u043d \u2014 825 GB [<span><u>4<\/u><\/span>], \u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0432\u0435\u0441\u043e\u0432) \u043c\u043e\u0434\u0435\u043b\u0438 ~ 6 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432. <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GPT-J \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Python, transformers \u0438 pytorch\u00a0lightning. GPT-J \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f open\u00a0source-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Hugging\u00a0Face\u00a0Hub\u00a0[<span><u>5<\/u><\/span>]. <\/p>\n<h3>8 bit GPT-J<\/h3>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 EleutherAI \u0441 float16 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 21 GB VRAM \u2014 \u0430 \u044d\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0427\u0442\u043e\u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043d\u0441\u0442\u0440\u0430 \u043d\u0430 \u043d\u0430\u0448 \u041f\u041a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 [<span><u>6<\/u><\/span>, <span><u>7<\/u><\/span>] \u2014 \u0445\u0438\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 float16 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 int8 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u044f \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0443\u0434\u044f \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f GPT-J \u0438 GPT-J-8bit, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438 [<span><u>8<\/u><\/span>].<\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c GPT-J [<span><u>3<\/u><\/span>] \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0435\u0431\u044f\u0442\u0430\u043c \u0438\u0437 <span><u>Training\u00a0Transformers\u00a0Together<\/u><\/span>\u00a0[<span><u>9<\/u><\/span>] \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 6 GB \u043d\u0430 GTX 1080 TI. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441 \u043d\u0435\u0439 \u043f\u043e\u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0435\u043c\u0441\u044f.<\/p>\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u2014 input \u0438 output \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043a\u0430\u043a\u0430\u044f \u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. GPT \u043e\u0447\u0435\u043d\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u0440\u0438\u0432\u0435\u0442, attention!) \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0443\u0441\u043b\u044b\u0448\u0430\u0432 \u0441\u043b\u043e\u0432\u043e, \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.  <\/p>\n<h3>Input<\/h3>\n<p>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<strong>input_ids<\/strong>) \u0438 <strong>attention\u00a0mask<\/strong>.\u00a0\u041e\u0431\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043e\u0439 2048. <\/p>\n<ul>\n<li>\n<p><strong>\u0412\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/strong> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b:\u00a0id\u00a0\u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 50257 \u0442\u043e\u043a\u0435\u043d\u043e\u0432;\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Attention\u00a0mask<\/strong>: \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u043d\u0443\u043b\u044f\u043c\u0438 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 (1), \u0430 \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u2014 \u043d\u0435\u0442 (0).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 GPT \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0431\u0435\u0441\u0435\u0434\u044b \u0441\u043b\u043e\u0432\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 0 \u0432 attention\u00a0mask. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 0 \u0434\u043b\u044f \u043f\u0430\u0434\u0434\u0438\u043d\u0433-\u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u044d\u043c\u043f\u043b\u044b \u0432 \u0431\u0430\u0442\u0447 (\u043f\u043e\u0440\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f) \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0434\u0434\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u0434\u043b\u0438\u043d\u044b \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0441\u044d\u043c\u043f\u043b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c). <\/p>\n<p>\u041d\u0430 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0448\u0435 \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a sample_text \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 input_ids \u0438 attention_mask.<\/p>\n<h3>Output\u00a0<\/h3>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 GPT \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u043d\u043e \u043a\u0440\u043e\u043c\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<strong>logits<\/strong>) \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 (<strong>past_key_values<\/strong>). \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 output \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u00a0\u0442\u0435\u043d\u0437\u043e\u0440\u0430\u00a0<strong>logits <\/strong>\u2014 (batch_size, sample_len, vocab_size). \u041d\u0430\u0448 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b\u00a0&#8216;Hello, GPT-J! How\u00a0are\u00a0you?&#8217; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 12 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 logits \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 (1, 12, 50400). <\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u044d\u043c\u043f\u043b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u0412 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. <\/p>\n<ul>\n<li>\n<p><strong>past_key_value<\/strong> \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0420\u0430\u0437\u043c\u0435\u0440\u00a0\u0442\u0435\u043d\u0437\u043e\u0440\u0430: (n_layers, key_value, batch, n_attention_heads, sample_len, head_embedding_dimension);<\/p>\n<\/li>\n<li>\n<p><strong>n_layers\u00a0<\/strong>\u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 GPT-J;<\/p>\n<\/li>\n<li>\n<p><strong>key_value<\/strong> \u2014 \u043a\u043e\u0440\u0442\u0435\u0436 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (Attention) [<span><u>10<\/u><\/span>];<\/p>\n<\/li>\n<li>\n<p><strong>batch<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447\u0430;\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>n_attention_heads<\/strong> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u00a0\u0433\u043e\u043b\u043e\u0432 attention;<\/p>\n<\/li>\n<li>\n<p><strong>sample_len\u00a0<\/strong>\u2014 \u0434\u043b\u0438\u043d\u0430 \u0441\u044d\u043c\u043f\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>head_embedding_dimension<\/strong> \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u00a0attention head;<\/p>\n<\/li>\n<li>\n<p><strong>n_layers, key_value, n_attention_heads, head_embedding_dimension<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435\u00a0\u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f\u00a0\u043a\u00a0\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438\u00a0\u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT\u00a0\u043c\u043e\u0434\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0442\u044b \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 3 \u043a\u043b\u0430\u0441\u0441\u0430: hate (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u043d\u0435\u043d\u0430\u0432\u0438\u0441\u0442\u044c), offensive (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0443\u0433\u0440\u043e\u0437\u0443), neutral (\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435). <\/p>\n<p>\u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e\u00a0\u0431\u0443\u0434\u0435\u043c\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Hate Speech and Offensive Language Dataset [<span><u>11<\/u><\/span>]. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 GPT \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0435\u0442 \u043e \u044f\u0437\u044b\u043a\u0435 \u0438 \u0441\u043b\u043e\u0432\u0430\u0445, \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043b\u0438\u0448\u044c 1000 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0432 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c 200 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. \u041d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0443\u0447\u0438\u0442\u044c GPT-J-8bit \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<h4>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435?<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0440\u0430\u0437\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0444\u0440\u0430\u0437\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438 \u2014 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u044d\u043c\u043f\u043b\u0430 \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0441\u044d\u043c\u043f\u043b, \u043a\u0440\u043e\u043c\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441\u044d\u043c\u043f\u043b\u0430 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0446\u0435\u043b\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438. \u041a \u0432\u0430\u0436\u043d\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443 \u043e\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f (\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0435\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u044b \u043a\u0430\u043a \u0431\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u00a0\u2013  \u043a\u043e\u0433\u0434\u0430 \u0436\u0434\u0435\u043c \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e GPT \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e.\u00a0 <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0430\u043c\u0438-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438, \u0442\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u0442\u0440\u0430\u0432\u043e\u043a, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c. <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u044d\u043c\u043f\u043b\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u0438\u043d\u043d\u0435\u0435. \u041d\u043e \u0437\u0430\u0442\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c, \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u2013 \u0447\u0435\u0433\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0435 \u0445\u043e\u0442\u0438\u043c: GPT \u0432\u0438\u0434\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438, \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u044f \u0435\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT \u0440\u0435\u0448\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. <\/p>\n<h4>\u0427\u0442\u043e\u00a0\u043e\u0431\u0443\u0447\u0430\u0442\u044c? (Low-Rank Adapters)<\/h4>\n<p>\u0412 GPT-J-8bit \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u044b. \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c cross\u00a0entropy\u00a0loss \u043b\u0435\u0436\u0438\u0442 \u0432 [0, 1]. \u041d\u043e \u0434\u0430\u0436\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 <em>LoRA: Low-Rank\u00a0Adaption\u00a0of\u00a0Large\u00a0Language\u00a0Models<\/em>\u00a0[<span><u>12<\/u><\/span>] \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0417\u0430\u0447\u0435\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u043c \u0432\u0441\u0435 \u0441\u043b\u043e\u0438 \u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e. \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u043b\u043e\u044f A \u0438 B \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (d, r) \u0438 (r, d). \u0418 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u00ab\u0440\u043e\u0434\u043d\u043e\u0433\u043e\u00bb \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438 W \u0440\u0430\u0437\u043c\u0435\u0440\u0430 (d,d) (\u0430 \u0443\u00a0 GPT-J d \u0440\u0430\u0432\u0435\u043d 4096) \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435. \u0410\u0432\u0442\u043e\u0440\u044b LoRA \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 r \u0440\u0430\u0432\u0435\u043d 2, \u0447\u0435\u043c \u043e\u043f\u0440\u0430\u0432\u0434\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 Low-Rank\u00a0Adaption. \u0415\u0433\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<figure class=\"bordered\">\n<div><figcaption>LoRA<\/figcaption><\/div>\n<\/figure>\n<h4>\u041a\u0430\u043a \u043e\u0431\u0443\u0447\u0430\u0442\u044c? (Adam8bit)<\/h4>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u2014 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u0438\u0440\u0443\u0447\u0438\u0442\u044c \u0435\u0435. \u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GPT \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430, \u043d\u043e \u043c\u044b \u043e\u0431\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u0435 \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. <\/p>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Adam. \u041d\u0430\u043c \u0436\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <em>8-Bit Optimizers\u00a0via\u00a0Block-wise\u00a0Quantization<\/em>\u00a0[<span><u>13<\/u><\/span>] \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430\u043c (\u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0430\u043c) \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u0447\u043d\u0430\u044f (block-wise) \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u0442\u044c \u044d\u0442\u043e\u0433\u043e:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\u00a0bitsandbytes\u00a0[<span><u>14<\/u><\/span>]\u00a0\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430. <\/p>\n<h4>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u0440\u0443\u0447\u0438\u0442\u044c GPT-J. \u041d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u044c GPT \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u0430\u043a-\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0430 \u0435\u0433\u043e \u043e\u0448\u0438\u0431\u043a\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <strong>loss\u00a0mask<\/strong> \u0432 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u044d\u0442\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u0430\u043c. \u0422\u0430\u043a \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0435, \u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-346766","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=346766"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346766\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}