{"id":485093,"date":"2026-06-26T06:41:15","date_gmt":"2026-06-26T06:41:15","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=485093"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=485093","title":{"rendered":"\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u0430\u0434\u0438\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0437 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 LLM? \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 grokking, residual stream \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0435\u0439"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM (Large Language Models) \u2014 \u044d\u0442\u043e \u0447\u0435\u0440\u043d\u044b\u0435 \u044f\u0449\u0438\u043a\u0438. \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 <em>\u0447\u0442\u043e-\u0442\u043e<\/em> \u0443\u043c\u0435\u044e\u0442, \u043d\u043e <em>\u043a\u0430\u043a<\/em> \u043e\u043d\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u2014 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u2014 <strong>\u043c\u0435\u0445\u0430\u043d\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/strong> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Mechanistic_interpretability\" rel=\"noopener noreferrer nofollow\">(mechanistic interpretability)<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0437\u0430\u0448\u0438\u0442\u044b\u0435 \u0432 \u0432\u0435\u0441\u0430\u0445. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f: \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443), \u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0451 residual stream \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f <strong>\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/strong> \u2014 \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438, \u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044e. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0412\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438: <strong>\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0437 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u00ab\u043f\u0435\u0440\u0435\u0441\u0430\u0434\u0438\u0442\u044c\u00bb \u0435\u0433\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e LLM \u0432\u043e \u0432\u0440\u0435\u043c\u044f inference?<\/strong> \u0411\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0431\u0435\u0437 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432, \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043c\u044b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 <strong>\u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438<\/strong>, \u043c\u0438\u043d\u0443\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 fine-tuning. \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u0435\u0440\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0418 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u043e\u0442\u0432\u0435\u0442 \u2014 <strong>\u0434\u0430, \u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/strong>. \u0418 \u044d\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0438\u0440\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b LLM.<\/p>\n<h3>2. Grokking: \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/h3>\n<p>\u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443: <img decoding=\"async\" class=\"formula inline\" source=\"(a + b) \\bmod 97\" alt=\"(a + b) \\bmod 97\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e3e\/e3ea4983a6443e0c1a2a48f81c0d4dbb.svg\" width=\"112\" height=\"16\" data-width=\"14.486\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e3e\/e3ea4983a6443e0c1a2a48f81c0d4dbb.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e3e\/e3ea4983a6443e0c1a2a48f81c0d4dbb.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440 (2 \u0441\u043b\u043e\u044f, d_model=128) \u043e\u0431\u0443\u0447\u0430\u043b\u0441\u044f \u043d\u0430 30% \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0430\u0440 (9409 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432). Grokking \u2014 \u044d\u0442\u043e \u044f\u0432\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 <em>\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442<\/em> \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 (train_acc=1.0), \u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 (val_acc\u22480.01). \u0410 \u043f\u043e\u0442\u043e\u043c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e, \u0447\u0435\u0440\u0435\u0437 \u0442\u044b\u0441\u044f\u0447\u0438 \u044d\u043f\u043e\u0445, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 <em>\u0440\u0435\u0437\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a<\/em> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u043e\u0431\u0449\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.<\/p>\n<p><strong>\u041d\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p>\u042d\u043f\u043e\u0445\u0430 0-8000: Train loss \u043f\u0430\u0434\u0430\u0435\u0442, Val acc \u2248 0.01.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043f\u043e\u0445\u0430 ~13500: Val acc \u0440\u0435\u0437\u043a\u043e \u043f\u0440\u044b\u0433\u0430\u0435\u0442 \u0434\u043e 0.9994 \u0438 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u043c\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f?<\/strong> \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/p>\n<ol>\n<li>\n<p><strong>PCA \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f<\/strong> \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0447\u0438\u0441\u0435\u043b \u043e\u0442 0 \u0434\u043e 96. \u0412 2D-\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0447\u0438\u0441\u043b\u0430 \u043b\u0435\u0433\u043b\u0438 <strong>\u0440\u043e\u0432\u043d\u043e \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c<\/strong>. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0424\u0443\u0440\u044c\u0435-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (<a href=\"https:\/\/arxiv.org\/abs\/2301.05217\" rel=\"noopener noreferrer nofollow\">Neel Nanda, 2023<\/a>).<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e17\/d24\/3e5\/e17d243e534e9912da800074aa53d5a1.png\" alt=\"PCA-\u0433\u0440\u0430\u0444\u0438\u043a \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\" title=\"PCA-\u0433\u0440\u0430\u0444\u0438\u043a \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\" width=\"1600\" height=\"800\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e17\/d24\/3e5\/e17d243e534e9912da800074aa53d5a1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e17\/d24\/3e5\/e17d243e534e9912da800074aa53d5a1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>PCA-\u0433\u0440\u0430\u0444\u0438\u043a \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/em><\/figcaption><\/div>\n<\/figure>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u043d\u0438\u043a (Probe)<\/strong> \u043d\u0430 residual stream \u0441\u043b\u043e\u044f 1 \u043f\u043e\u043a\u0430\u0437\u0430\u043b accuracy = 1.0. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u043e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e <em>\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430<\/em> \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0432\u0435\u0441\u0430, \u0430 \u043d\u0435 \u0432\u044b\u0443\u0447\u0438\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<\/li>\n<\/ol>\n<h3>3. \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430<\/h3>\n<p>\u041c\u044b \u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0438 \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u0435\u0441\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u2014 \u044d\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432 residual stream (\u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0432 <img decoding=\"async\" class=\"formula inline\" source=\"R^d\" alt=\"R^d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/9c\/9c1\/9c167a10ebd19a37928aece1e6a9f456.svg\" width=\"16\" height=\"16\" data-width=\"2.737\" data-height=\"2.092\" data-vertical-align=\"-0.048\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/9c\/9c1\/9c167a10ebd19a37928aece1e6a9f456.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/9c\/9c1\/9c167a10ebd19a37928aece1e6a9f456.svg 781w\" loading=\"lazy\" decode=\"async\"\/>), \u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443, \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c <strong>\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <\/strong><img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"16\" height=\"12\" data-width=\"2.371\" data-height=\"1.595\" data-vertical-align=\"-0.05\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e.<\/p>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"h_A(a, b) \" alt=\"h_A(a, b) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/57\/573\/57328b7663f4f0c89b51a420b43a5142.svg\" width=\"56\" height=\"16\" data-width=\"7.624\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/57\/573\/57328b7663f4f0c89b51a420b43a5142.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/57\/573\/57328b7663f4f0c89b51a420b43a5142.svg 781w\" loading=\"lazy\" decode=\"async\"\/>\u2014 residual \u0432\u0435\u043a\u0442\u043e\u0440 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 <img decoding=\"async\" class=\"formula inline\" source=\"h_B(a, b) \" alt=\"h_B(a, b) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/75\/751\/7516048241b1eca890973232c23c985c.svg\" width=\"56\" height=\"16\" data-width=\"7.639\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/75\/751\/7516048241b1eca890973232c23c985c.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/75\/751\/7516048241b1eca890973232c23c985c.svg 781w\" loading=\"lazy\" decode=\"async\"\/>\u2014 residual \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"W: R^{128} \u2192 R^{2560} \" alt=\"W: R^{128} \u2192 R^{2560} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cb\/7cb6ba1e2ebffaec48c495a2bd493c9e.svg\" width=\"136\" height=\"16\" data-width=\"17.185\" data-height=\"2.05\" data-vertical-align=\"-0.05\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cb\/7cb6ba1e2ebffaec48c495a2bd493c9e.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7c\/7cb\/7cb6ba1e2ebffaec48c495a2bd493c9e.svg 781w\" loading=\"lazy\" decode=\"async\"\/>\u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e:<\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"W \u00b7 h_A(a, b) \u2248 h_B(a, b)\" alt=\"W \u00b7 h_A(a, b) \u2248 h_B(a, b)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/46\/469\/46906e340e9ca0398d731126432cb253.svg\" width=\"176\" height=\"16\" data-width=\"22.286\" data-height=\"2.262\" data-vertical-align=\"-0.566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/46\/469\/46906e340e9ca0398d731126432cb253.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/46\/469\/46906e340e9ca0398d731126432cb253.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0418 \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043f\u0440\u044b\u0441\u043d\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"W \u00b7 h_A\" alt=\"W \u00b7 h_A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5db71a75864191c3643ba2cf713d10.svg\" width=\"48\" height=\"12\" data-width=\"6.696\" data-height=\"1.916\" data-vertical-align=\"-0.345\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5db71a75864191c3643ba2cf713d10.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4f\/4f5\/4f5db71a75864191c3643ba2cf713d10.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u043e\u043d\u0430 \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0430 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e \u0431\u044b\u043b\u0430 \u0430\u043c\u0431\u0438\u0446\u0438\u043e\u0437\u043d\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430. \u0418 \u043c\u044b \u043c\u0435\u0442\u043e\u0434\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0433\u0434\u0435 \u043e\u043d\u0430 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h3>4. \u0421\u0435\u0440\u0438\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432: \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e<\/h3>\n<p>\u041c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 6 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0441\u0443\u0436\u0430\u044f \u043a\u0440\u0443\u0433 \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 1: \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f 128 \u2192 2560<\/h4>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0432\u0437\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438 \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f.<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>: cos_sim = 0.33, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 +0.005 (\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0448\u0443\u043c).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong>: \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e. \u041f\u0440\u043e\u0435\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c <em>\u043e\u0431\u0443\u0447\u0435\u043d\u0430<\/em>.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 2: \u041e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f W \u0447\u0435\u0440\u0435\u0437 MSE<\/h4>\n<p>\u041e\u0431\u0443\u0447\u0438\u043b\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439: <img decoding=\"async\" class=\"formula inline\" source=\"\\left \\lVert W\u00b7h_A - h_B\\right \\rVert^2\" alt=\"\\left \\lVert W\u00b7h_A - h_B\\right \\rVert^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f2\/f27\/f2732c1f9b9d6d5ceaea0462b0de925d.svg\" width=\"120\" height=\"16\" data-width=\"15.417\" data-height=\"2.71\" data-vertical-align=\"-0.79\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f2\/f27\/f2732c1f9b9d6d5ceaea0462b0de925d.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f2\/f27\/f2732c1f9b9d6d5ceaea0462b0de925d.svg 781w\" loading=\"lazy\" decode=\"async\"\/>.<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>: cos_sim = 0.30, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 0.00 (delta=0).<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u043b<\/strong>: MSE \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 <em>\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/em> \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u0447\u043a\u0430\u043c\u0438. \u041e\u043d\u0430 \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u0442\u043e\u044f\u043b\u0438 \u0440\u044f\u0434\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b (\u0447\u0438\u0441\u043b\u0430 0..96) \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c\u044b\u043c\u0438. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c, \u0430 \u043d\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 3: \u0427\u0438\u0441\u0442\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 (\u0435\u0434\u0438\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440)<\/h4>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (Phi-2) \u0438\u043c\u0435\u043b\u0430 BPE-\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440, \u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u0447\u0438\u0441\u043b\u043e 42 \u2192 \u0442\u043e\u043a\u0435\u043d 42). \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440, \u043e\u0431\u0443\u0447\u0438\u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0442\u0435\u043c \u0436\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u043d\u0430 97 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>: cos_sim = 0.30 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043d\u0438\u0437\u043a\u0438\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong>: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0433\u043b\u0443\u0431\u0436\u0435, \u0447\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u00ab\u0431\u0443\u043a\u0432\u0430\u0445\u00bb \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 4: inputs_embeds \u043f\u0430\u0442\u0447<\/h4>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u0434\u0430\u0442\u044c \u0432 Phi-2 \u043d\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 inputs_embeds, \u043c\u0438\u043d\u0443\u044f \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>: accuracy \u0443\u043f\u0430\u043b\u0430 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 0.24 \u0434\u043e <strong>0.01 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c)<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong>: Phi-2 \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c. \u0411\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (<code>\"What is X + Y?\"<\/code>) \u043e\u043d\u0430 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0451 \u0445\u043e\u0442\u044f\u0442. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u2014 \u044d\u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0435 \u0431\u0435\u043b\u044b\u0439 \u0448\u0443\u043c.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 5: Residual stream \u043f\u0430\u0442\u0447 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c (\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439)<\/h4>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e <strong>\u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 residual \u0432\u0435\u043a\u0442\u043e\u0440<\/strong> \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"W\u00b7h_A\" alt=\"W\u00b7h_A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6ab\/6ab641970b7a0e4e60b4ac50a90e134c.svg\" width=\"48\" height=\"12\" data-width=\"6.696\" data-height=\"1.916\" data-vertical-align=\"-0.345\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6ab\/6ab641970b7a0e4e60b4ac50a90e134c.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6ab\/6ab641970b7a0e4e60b4ac50a90e134c.svg 781w\" loading=\"lazy\" decode=\"async\"\/> (\u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 alpha). \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u043b\u0438 alpha \u043e\u0442 0.0 \u0434\u043e 1.0. <strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>: \u041f\u0438\u043a \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 alpha=0.5 \u2014 +7% \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f (\u0441 0.235 \u0434\u043e 0.305). \u041f\u0440\u0438 alpha=1.0 (\u043f\u043e\u043b\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430) \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e 0.015.<\/p>\n<ul>\n<li>\n<p><strong>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 (\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435)<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 Linear Probe \u043d\u0430 \u0441\u043b\u043e\u0435 L+1. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u0430\u043b 1.0 \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0435\u0441\u0442\u044c \u0432 residual stream \u043d\u0430 100%.<\/p>\n<\/li>\n<li>\n<p>\u041c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 Logit Lens (\u043f\u043e\u0434\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 LM head, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u043b\u043e\u0438). \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0430\u043b\u0430 \u0434\u043e 0.005.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0435<\/strong>: \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0435\u0441\u0442\u044c (probe=1.0), \u043d\u043e \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (LM head) \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0451 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c (logit=0.005)!<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong>: \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432 <strong>\u0431\u0430\u0437\u0438\u0441\u0435 \u0424\u0443\u0440\u044c\u0435<\/strong> (\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438). Phi-2 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432 <strong>\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u043c \u0431\u0430\u0437\u0438\u0441\u0435<\/strong> (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430). <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"16\" height=\"12\" data-width=\"2.371\" data-height=\"1.595\" data-vertical-align=\"-0.05\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e, \u043d\u043e LM head Phi-2 \u043e\u0431\u0443\u0447\u0435\u043d \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439 \u0440\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0438\u0441. \u041e\u043d \u0432\u0438\u0434\u0438\u0442 \u0424\u0443\u0440\u044c\u0435-\u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u0430\u043a \u00ab\u0438\u0435\u0440\u043e\u0433\u043b\u0438\u0444\u00bb \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<h3>5. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u043a\u0430: \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0441\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d<\/h3>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 5 \u0434\u0430\u043b \u043d\u0430\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. <strong>Grokking \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0432\u0435\u0441\u0430. Phi-2 \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0447\u0435\u0440\u0435\u0437 \u044f\u0437\u044b\u043a. <\/strong>\u042d\u0442\u043e \u0434\u0432\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430. \u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043c\u043e\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043d\u0435 \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (128 vs 2560) \u0438 \u043d\u0435 \u0438\u0437-\u0437\u0430 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041e\u043d \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <strong>\u043f\u0440\u0438\u0440\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0430\u044f<\/strong>. \u041c\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u0432 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<ul>\n<li>\n<p>\u0412 <em>\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439<\/em> \u043c\u043e\u0434\u0435\u043b\u0438 (grokking): \u043e\u0442\u0432\u0435\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0438\u0437\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (2D \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c). \u042d\u0442\u043e \u0447\u0438\u0441\u0442\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412 <em>\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439<\/em> \u043c\u043e\u0434\u0435\u043b\u0438 (Phi-2): \u043e\u0442\u0432\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, attention \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u042d\u0442\u043e \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>6. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442? \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0415\u0441\u043b\u0438 LM head \u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u0442 \u0424\u0443\u0440\u044c\u0435-\u0431\u0430\u0437\u0438\u0441, \u043c\u044b \u043c\u043e\u0436\u0435\u043c <strong>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c LM head \u043d\u0430 \u0441\u0432\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440<\/strong>. \u041c\u044b \u043e\u0431\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 <strong>Linear(2560 \u2192 97)<\/strong> \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u0430\u0442\u0447\u0435\u043d\u043d\u043e\u0433\u043e residual stream (\u0441\u043b\u043e\u0439 L+1).<\/p>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0423\u0441\u043b\u043e\u0432\u0438\u0435<\/p>\n<\/th>\n<th>\n<p align=\"left\">Alpha<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0411\u0435\u0437 \u043f\u0430\u0442\u0447\u0430 (baseline)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.023 (\u0448\u0443\u043c)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430)<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.999 (99.9%)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.192 (19.2%)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 alpha=1.0 (\u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u0430) \u0430\u0434\u0430\u043f\u0442\u0435\u0440 <strong>\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e (99.9%)<\/strong>. \u042d\u0442\u043e \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"16\" height=\"12\" data-width=\"2.371\" data-height=\"1.595\" data-vertical-align=\"-0.05\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437\u0443\u043f\u0440\u0435\u0447\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 alpha=0.5 (\u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442) \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 19.2%. \u042d\u0442\u043e <strong>\u0446\u0435\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/strong>. \u0427\u0442\u043e\u0431\u044b Phi-2 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0430\u0441\u044c \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0435\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0438\u0448\u044c \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e (alpha=0.5), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u043b\u044b.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/strong> \u043f\u0440\u0438 <code>alpha=1.0<\/code> \u2014 \u0447\u0438\u0441\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/p>\n<h3>7. \u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b<\/h3>\n<p>\u041c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 <strong>Residual Tool<\/strong>:<\/p>\n<ol>\n<li>\n<p>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (SLM) \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 residual \u0432\u0435\u043a\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f <strong>W<\/strong> \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u044d\u0442\u043e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM).<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0430\u043f\u0442\u0435\u0440 (<strong>Linear(2560, 97)<\/strong>) \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0441 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c: \u0447\u0442\u043e\u0431\u044b LLM \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0443\u044e \u0434\u043e\u043b\u044e \u043f\u0430\u0442\u0447\u0430 (alpha &lt; 0.5), \u0438\u043d\u0430\u0447\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u044f (alpha=1.0) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u2014 \u043e\u043d\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c.<\/p>\n<p><strong>\u0418\u0442\u043e\u0433:<\/strong> \u041c\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e residual stream \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u041d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0437\u0433 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<h4>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (A)<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (B &#8212; Phi-2)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u043b\u043e\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">32<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">d_model<\/p>\n<\/td>\n<td>\n<p align=\"left\">128<\/p>\n<\/td>\n<td>\n<p align=\"left\">2560<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0417\u0430\u0434\u0430\u0447\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">(a+b) mod 97<\/p>\n<\/td>\n<td>\n<p align=\"left\">(a+b) mod 97 (prompt)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.9994<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.235 (baseline)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">W \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">R^128 \u2192 R^2560<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0431\u0443\u0447\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 MSE + Ortho Loss<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Cos_sim<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.82 (\u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u0445)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.30 (\u043d\u0430 residual)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041b\u0443\u0447\u0448\u0438\u0439 alpha<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2014<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0410\u0434\u0430\u043f\u0442\u0435\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2014<\/p>\n<\/td>\n<td>\n<p align=\"left\">Linear(2560, 97) = 99.9%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>\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\/articles\/1052114\/\">https:\/\/habr.com\/ru\/articles\/1052114\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM (Large Language Models) \u2014 \u044d\u0442\u043e \u0447\u0435\u0440\u043d\u044b\u0435 \u044f\u0449\u0438\u043a\u0438. \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0447\u0442\u043e-\u0442\u043e \u0443\u043c\u0435\u044e\u0442, \u043d\u043e \u043a\u0430\u043a \u043e\u043d\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u2014 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c (mechanistic interpretability), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0437\u0430\u0448\u0438\u0442\u044b\u0435 \u0432 \u0432\u0435\u0441\u0430\u0445. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f: \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443), \u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0451 residual stream \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u2014 \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438, \u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044e. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0412\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438: \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0437 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u00ab\u043f\u0435\u0440\u0435\u0441\u0430\u0434\u0438\u0442\u044c\u00bb \u0435\u0433\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e LLM \u0432\u043e \u0432\u0440\u0435\u043c\u044f inference? \u0411\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0431\u0435\u0437 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432, \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043c\u044b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438, \u043c\u0438\u043d\u0443\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 fine-tuning. \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u0435\u0440\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0418 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u043e\u0442\u0432\u0435\u0442 \u2014 \u0434\u0430, \u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0418 \u044d\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0438\u0440\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b LLM.2. Grokking: \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443: . \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440 (2 \u0441\u043b\u043e\u044f, d_model=128) \u043e\u0431\u0443\u0447\u0430\u043b\u0441\u044f \u043d\u0430 30% \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0430\u0440 (9409 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432). Grokking \u2014 \u044d\u0442\u043e \u044f\u0432\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 (train_acc=1.0), \u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 (val_acc\u22480.01). \u0410 \u043f\u043e\u0442\u043e\u043c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e, \u0447\u0435\u0440\u0435\u0437 \u0442\u044b\u0441\u044f\u0447\u0438 \u044d\u043f\u043e\u0445, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u043e\u0431\u0449\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.\u041d\u0430\u0448\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:\u042d\u043f\u043e\u0445\u0430 0-8000: Train loss \u043f\u0430\u0434\u0430\u0435\u0442, Val acc \u2248 0.01.\u042d\u043f\u043e\u0445\u0430 ~13500: Val acc \u0440\u0435\u0437\u043a\u043e \u043f\u0440\u044b\u0433\u0430\u0435\u0442 \u0434\u043e 0.9994 \u0438 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u043c\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f? \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:PCA \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0447\u0438\u0441\u0435\u043b \u043e\u0442 0 \u0434\u043e 96. \u0412 2D-\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0447\u0438\u0441\u043b\u0430 \u043b\u0435\u0433\u043b\u0438 \u0440\u043e\u0432\u043d\u043e \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0424\u0443\u0440\u044c\u0435-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (Neel Nanda, 2023).PCA-\u0433\u0440\u0430\u0444\u0438\u043a \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u043d\u0438\u043a (Probe) \u043d\u0430 residual stream \u0441\u043b\u043e\u044f 1 \u043f\u043e\u043a\u0430\u0437\u0430\u043b accuracy = 1.0. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u043e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0432\u0435\u0441\u0430, \u0430 \u043d\u0435 \u0432\u044b\u0443\u0447\u0438\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.3. \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430\u041c\u044b \u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0438 \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u0435\u0441\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u2014 \u044d\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432 residual stream (\u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0432 ), \u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443, \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e.\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:\u0415\u0441\u043b\u0438 \u2014 residual \u0432\u0435\u043a\u0442\u043e\u0440 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u2014 residual \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e:\u0418 \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043f\u0440\u044b\u0441\u043d\u0435\u043c  \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u043e\u043d\u0430 \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0430 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443.\u042d\u0442\u043e \u0431\u044b\u043b\u0430 \u0430\u043c\u0431\u0438\u0446\u0438\u043e\u0437\u043d\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430. \u0418 \u043c\u044b \u043c\u0435\u0442\u043e\u0434\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0433\u0434\u0435 \u043e\u043d\u0430 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f.4. \u0421\u0435\u0440\u0438\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432: \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e\u041c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 6 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0441\u0443\u0436\u0430\u044f \u043a\u0440\u0443\u0433 \u043f\u043e\u0438\u0441\u043a\u0430.\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 1: \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f 128 \u2192 2560\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0432\u0437\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438 \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f.\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: cos_sim = 0.33, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 +0.005 (\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0448\u0443\u043c).\u0412\u044b\u0432\u043e\u0434: \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e. \u041f\u0440\u043e\u0435\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0430.\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 2: \u041e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f W \u0447\u0435\u0440\u0435\u0437 MSE\u041e\u0431\u0443\u0447\u0438\u043b\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439: .\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: cos_sim = 0.30, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 0.00 (delta=0).\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u043b: MSE \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u0447\u043a\u0430\u043c\u0438. \u041e\u043d\u0430 \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u0442\u043e\u044f\u043b\u0438 \u0440\u044f\u0434\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b (\u0447\u0438\u0441\u043b\u0430 0..96) \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c\u044b\u043c\u0438. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c, \u0430 \u043d\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 3: \u0427\u0438\u0441\u0442\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 (\u0435\u0434\u0438\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440)\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (Phi-2) \u0438\u043c\u0435\u043b\u0430 BPE-\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440, \u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u0447\u0438\u0441\u043b\u043e 42 \u2192 \u0442\u043e\u043a\u0435\u043d 42). \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442\u043e\u0440, \u043e\u0431\u0443\u0447\u0438\u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0442\u0435\u043c \u0436\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u043d\u0430 97 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: cos_sim = 0.30 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043d\u0438\u0437\u043a\u0438\u043c.\u0412\u044b\u0432\u043e\u0434: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0433\u043b\u0443\u0431\u0436\u0435, \u0447\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u00ab\u0431\u0443\u043a\u0432\u0430\u0445\u00bb \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0438.\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 4: inputs_embeds \u043f\u0430\u0442\u0447\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u0434\u0430\u0442\u044c \u0432 Phi-2 \u043d\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 inputs_embeds, \u043c\u0438\u043d\u0443\u044f \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440.\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: accuracy \u0443\u043f\u0430\u043b\u0430 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 0.24 \u0434\u043e 0.01 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c).\u0412\u044b\u0432\u043e\u0434: Phi-2 \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c. \u0411\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (&#171;What is X + Y?&#187;) \u043e\u043d\u0430 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0451 \u0445\u043e\u0442\u044f\u0442. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u2014 \u044d\u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0435 \u0431\u0435\u043b\u044b\u0439 \u0448\u0443\u043c.\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 5: Residual stream \u043f\u0430\u0442\u0447 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c (\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439)\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 residual \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043d\u0430  (\u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 alpha). \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u043b\u0438 alpha \u043e\u0442 0.0 \u0434\u043e 1.0. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u041f\u0438\u043a \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 alpha=0.5 \u2014 +7% \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f (\u0441 0.235 \u0434\u043e 0.305). \u041f\u0440\u0438 alpha=1.0 (\u043f\u043e\u043b\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430) \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e 0.015.\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 (\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435):\u041c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 Linear Probe \u043d\u0430 \u0441\u043b\u043e\u0435 L+1. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u0430\u043b 1.0 \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0435\u0441\u0442\u044c \u0432 residual stream \u043d\u0430 100%.\u041c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 Logit Lens (\u043f\u043e\u0434\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 LM head, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u043b\u043e\u0438). \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0430\u043b\u0430 \u0434\u043e 0.005.\u041f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0435: \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0435\u0441\u0442\u044c (probe=1.0), \u043d\u043e \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (LM head) \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0451 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c (logit=0.005)!\u0412\u044b\u0432\u043e\u0434: \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0431\u0430\u0437\u0438\u0441\u0435 \u0424\u0443\u0440\u044c\u0435 (\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438). Phi-2 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u043c \u0431\u0430\u0437\u0438\u0441\u0435 (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430).  \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e, \u043d\u043e LM head Phi-2 \u043e\u0431\u0443\u0447\u0435\u043d \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439 \u0440\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0438\u0441. \u041e\u043d \u0432\u0438\u0434\u0438\u0442 \u0424\u0443\u0440\u044c\u0435-\u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u0430\u043a \u00ab\u0438\u0435\u0440\u043e\u0433\u043b\u0438\u0444\u00bb \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c.5. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u043a\u0430: \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0441\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 5 \u0434\u0430\u043b \u043d\u0430\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. Grokking \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0432\u0435\u0441\u0430. Phi-2 \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0447\u0435\u0440\u0435\u0437 \u044f\u0437\u044b\u043a. \u042d\u0442\u043e \u0434\u0432\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430. \u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043c\u043e\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043d\u0435 \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (128 vs 2560) \u0438 \u043d\u0435 \u0438\u0437-\u0437\u0430 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041e\u043d \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u0440\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0430\u044f. \u041c\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u0432 \u0441\u043b\u043e\u0432\u0430.\u0412 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (grokking): \u043e\u0442\u0432\u0435\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043d\u0438\u0437\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 (2D \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c). \u042d\u0442\u043e \u0447\u0438\u0441\u0442\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430.\u0412 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (Phi-2): \u043e\u0442\u0432\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, attention \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u042d\u0442\u043e \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0430.6. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442? \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u0415\u0441\u043b\u0438 LM head \u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u0442 \u0424\u0443\u0440\u044c\u0435-\u0431\u0430\u0437\u0438\u0441, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c LM head \u043d\u0430 \u0441\u0432\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440. \u041c\u044b \u043e\u0431\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 Linear(2560 \u2192 97) \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u0430\u0442\u0447\u0435\u043d\u043d\u043e\u0433\u043e residual stream (\u0441\u043b\u043e\u0439 L+1).\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430:\u0423\u0441\u043b\u043e\u0432\u0438\u0435Alpha\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u0411\u0435\u0437 \u043f\u0430\u0442\u0447\u0430 (baseline)0.00.023 (\u0448\u0443\u043c)\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430)1.00.999 (99.9%)\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c)0.50.192 (19.2%)\u041f\u0440\u0438 alpha=1.0 (\u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u0430) \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e (99.9%). \u042d\u0442\u043e \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0447\u0435\u0440\u0435\u0437  \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437\u0443\u043f\u0440\u0435\u0447\u043d\u043e.\u041f\u0440\u0438 alpha=0.5 (\u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442) \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 19.2%. \u042d\u0442\u043e \u0446\u0435\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0427\u0442\u043e\u0431\u044b Phi-2 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0430\u0441\u044c \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0435\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0438\u0448\u044c \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e (alpha=0.5), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u043b\u044b.\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 alpha=1.0 \u2014 \u0447\u0438\u0441\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.7. \u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b\u041c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 Residual Tool:\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (SLM) \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 residual \u0432\u0435\u043a\u0442\u043e\u0440.\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f W \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u044d\u0442\u043e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM).\u0410\u0434\u0430\u043f\u0442\u0435\u0440 (Linear(2560, 97)) \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0441 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c: \u0447\u0442\u043e\u0431\u044b LLM \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0443\u044e \u0434\u043e\u043b\u044e \u043f\u0430\u0442\u0447\u0430 (alpha &lt; 0.5), \u0438\u043d\u0430\u0447\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u044f (alpha=1.0) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u2014 \u043e\u043d\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c.\u0418\u0442\u043e\u0433: \u041c\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e residual stream \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u041d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0437\u0433 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (A)\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (B &#8212; Phi-2)\u0421\u043b\u043e\u0438232d_model1282560\u0417\u0430\u0434\u0430\u0447\u0430(a+b) mod 97(a+b) mod 97 (prompt)\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c0.99940.235 (baseline)W \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044fR^128 \u2192 R^2560\u041e\u0431\u0443\u0447\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 MSE + Ortho LossCos_sim0.82 (\u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u0445)0.30 (\u043d\u0430 residual)\u041b\u0443\u0447\u0448\u0438\u0439 alpha\u20140.5\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u2014Linear(2560, 97) = 99.9%\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1052114\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-485093","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/485093","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=485093"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/485093\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=485093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=485093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=485093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}