{"id":371074,"date":"2024-05-21T04:39:52","date_gmt":"2024-05-21T04:39:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371074"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:39:52","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371074","title":{"rendered":"<span>Quantization Deep Dive, \u0438\u043b\u0438 \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/hj\/qv\/t3\/hjqvt3ri1vxdkfdwjbd6blrdcd8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/hj\/qv\/t3\/hjqvt3ri1vxdkfdwjbd6blrdcd8.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u0417\u0435\u043c\u043b\u044f\u043d\u043e\u0432, \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 ML-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u044f \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043f\u043e\u0442\u0442\u0435\u0440 \u2014 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0436\u0438\u0432\u0451\u0442 \u0432 \u0443\u043c\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 \u042f\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0436\u0434\u0451\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043b\u043e\u0432\u0430 \u00ab\u0410\u043b\u0438\u0441\u0430\u00bb. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043c\u0430\u043b\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0437\u0430 \u0441\u0447\u0451\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u2014 \u0442\u0430\u043a \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u0432\u044b\u0448\u043b\u043e.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u044f \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 YandexGPT. \u0412\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u044f \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438. \u041c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (LLM). \u0415\u0449\u0451 \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043b\u044e\u0434\u0438 \u0431\u0435\u0440\u0443\u0442 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0432 4 \u0431\u0438\u0442\u0430 \u0438 \u0443\u043c\u0443\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430\u0445. \u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f, \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043d\u0430 \u0434\u043e\u043a\u043b\u0430\u0434 \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433 \u0438 \u0434\u0440\u0443\u0437\u0435\u0439. \u0410 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u043e\u0444\u043e\u0440\u043c\u0438\u0432 \u0438\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u044e. \u0422\u0430\u043a \u044f \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \ud83d\ude42<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c, \u0442\u0430\u043a \u0438 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c \u0432 \u0441\u0444\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0430\u043c, \u043a\u043e\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435. \u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0430 \u0435\u0449\u0451 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h2>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430) \u0432 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0437 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u041d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mb\/lv\/6l\/mblv6lhwiimus2rxo_zfygcftkk.png\" alt=\"\u0414\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430\" data-src=\"https:\/\/habrastorage.org\/webt\/mb\/lv\/6l\/mblv6lhwiimus2rxo_zfygcftkk.png\"\/><\/p>\n<div><figcaption>\u0414\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0431\u0438\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 float32, \u043a \u0442\u0438\u043f\u0443 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c, \u0442\u0430\u043a\u043e\u043c\u0443 \u043a\u0430\u043a int8. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u0440\u0438\u0446\u0435\u043b\u043e\u043c \u043d\u0430 LLM.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f? \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u041a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u044d\u043a\u043e\u043d\u043e\u043c\u044f\u0442 \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442.<\/p>\n<p>\u0423 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u043b\u0438\u0447\u043d\u043e\u0433\u043e GPU-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<\/p>\n<h3>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/arxiv.org\/abs\/1803.03289\">\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/arxiv.org\/pdf\/2308.04595.pdf\">\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u043c\u0430\u0442\u0440\u0438\u0446. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0432\u0448\u0435\u043c \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0435.<\/p>\n<h4>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f, \u0438\u043b\u0438 \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432 k-\u0431\u0438\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"[R_{min}, R_{max}]\" alt=\"[R_{min}, R_{max}]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/24\/246\/246bdc999fa43c2d44c2bd4f880b72e6.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ip\/x8\/d4\/ipx8d4cuw7p3of_yd-pgknfjfd8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ip\/x8\/d4\/ipx8d4cuw7p3of_yd-pgknfjfd8.png\"\/><\/figure>\n<p>\u0420\u0430\u0437 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0441\u0442\u044c <code>zero-point<\/code> \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 <code>scale<\/code>. \u041e\u0442\u0441\u044e\u0434\u0430 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0437 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qo\/x8\/cy\/qox8cy6gxqewwu6sctzmgvwdjfc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qo\/x8\/cy\/qox8cy6gxqewwu6sctzmgvwdjfc.png\"\/><\/figure>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"S\" alt=\"S\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5d\/5db\/5dbc98dcc983a70728bd082d1a47546e.svg\" width=\"auto\" height=\"auto\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"Z\" alt=\"Z\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/21\/21c\/21c2e59531c8710156d34a3c30ac81d5.svg\" width=\"auto\" height=\"auto\"\/> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435. <img decoding=\"async\" class=\"formula inline\" source=\"S\" alt=\"S\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5d\/5db\/5dbc98dcc983a70728bd082d1a47546e.svg\" width=\"auto\" height=\"auto\"\/> \u2014 <code>scale<\/code>, \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"S = \\frac{r_{max} - r_{min}}{q_{max} - q_{min}}\" alt=\"S = \\frac{r_{max} - r_{min}}{q_{max} - q_{min}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c9\/c98\/c983d48423ffe829a7238049fd9c8798.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439, \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"Z\" alt=\"Z\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/21\/21c\/21c2e59531c8710156d34a3c30ac81d5.svg\" width=\"auto\" height=\"auto\"\/> \u2014 <code>zero-point<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\lfloor \\rceil\" alt=\"\\lfloor \\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d0\/d04\/d0479210ef2026fb18b478dbea046b37.svg\" width=\"auto\" height=\"auto\"\/> \u2014 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"Z = \\left\\lfloor q_{min}-\\frac{r_{min}}{S} \\right\\rceil\" alt=\"Z = \\left\\lfloor q_{min}-\\frac{r_{min}}{S} \\right\\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2d\/2d0\/2d091727e806095ff389c5e09b36eee0.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c \u0441\u0435\u0442\u044f\u043c \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u044f. \u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443: \u0432\u043d\u0438\u0437, \u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <img decoding=\"async\" class=\"formula inline\" source=\"Z\" alt=\"Z\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/21\/21c\/21c2e59531c8710156d34a3c30ac81d5.svg\" width=\"auto\" height=\"auto\"\/>, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435.<\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"X_q = \\left\\lfloor \\frac{X}{S} + Z \\right\\rceil\" alt=\"X_q = \\left\\lfloor \\frac{X}{S} + Z \\right\\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/41\/41c\/41c60ce176ef87c4923a6b584626db9a.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0414\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"X = S(X_q - Z)\" alt=\"X = S(X_q - Z)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/dc\/dc4\/dc44dd2c56bdf0c0ad2f5a528d2a675a.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 ReLU.<\/p>\n<h4>\u0421\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0421\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u043b\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vm\/ji\/kx\/vmjikxtl5wznu3-smvcwyjtwofs.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vm\/ji\/kx\/vmjikxtl5wznu3-smvcwyjtwofs.png\"\/><\/figure>\n<p>\u041d\u043e\u043b\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u043e\u043b\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e. \u0413\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043a\u0430\u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"|R_{max}|\" alt=\"|R_{max}|\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/80\/80c\/80c7f97eabd9da86313966ede93d432b.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0442\u0438\u043f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <code>signed int8: [-128, 127]<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 <code>[-127, 127]<\/code>.<\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"S = \\frac{|r|_{max}}{2^{N-1} - 1}\" alt=\"S = \\frac{|r|_{max}}{2^{N-1} - 1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/11\/11e\/11eec72878ea3eacf00ffbd9c0891b95.svg\" width=\"auto\" height=\"auto\"\/><img decoding=\"async\" class=\"formula\" source=\"Z = 0\" alt=\"Z = 0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/77\/77d\/77dfd7ec8ce445410c797ba05f6330e9.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"X_q = \\left\\lfloor \\frac{X}{S}\\right\\rceil\" alt=\"X_q = \\left\\lfloor \\frac{X}{S}\\right\\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/51\/518\/51871b8a0ee809d83eb51557a3815042.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0414\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"X = SX_q\" alt=\"X = SX_q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/76\/761\/7619b2ec9c15d7b9901a0456d0aa1ca6.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0444\u043e\u0440\u043c\u0443\u043b \u0430\u0444\u0444\u0438\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"Z\" alt=\"Z\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/21\/21c\/21c2e59531c8710156d34a3c30ac81d5.svg\" width=\"auto\" height=\"auto\"\/>. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0430\u0444\u0444\u0438\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u043d\u0430 \u0443\u043c\u0435\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0437\u0430 \u0441\u0447\u0451\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 zero-point, \u0430 \u0434\u043b\u044f \u0434\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0432 int8<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c\u0438 \u0447\u0438\u0441\u0435\u043b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 8-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p><strong>\u0428\u0430\u0433 1.<\/strong> \u0411\u0435\u0440\u0451\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440.<br \/> <strong>\u0428\u0430\u0433 2.<\/strong> \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vx\/np\/pb\/vxnppbuti8cfwtkr6c9zrjclsvk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vx\/np\/pb\/vxnppbuti8cfwtkr6c9zrjclsvk.png\"\/><\/figure>\n<p><strong>\u0428\u0430\u0433 3.<\/strong> \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"S\" alt=\"S\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5d\/5db\/5dbc98dcc983a70728bd082d1a47546e.svg\" width=\"auto\" height=\"auto\"\/> \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435.<br \/> <strong>\u0428\u0430\u0433 4.<\/strong> \u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u0435\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kl\/wt\/tb\/klwttbbib5we1atyxycacr7roik.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kl\/wt\/tb\/klwttbbib5we1atyxycacr7roik.png\"\/><\/figure>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 8-\u0431\u0438\u0442\u043d\u044b\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <code>0,0077<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043e\u0431\u044a\u0451\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 32-\u0431\u0438\u0442\u043d\u043e\u043c\u0443 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/div>\n<\/details>\n<h3>\u0427\u0442\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c <strong>\u0432\u0435\u0441\u0430<\/strong> \u043c\u043e\u0434\u0435\u043b\u0438. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u044b \u0441\u043b\u043e\u0451\u0432 \u2014 <strong>\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u0445 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0413\u043e\u0442\u043e\u0432\u043e \u2014 \u0432\u044b \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u044b! \u041a\u0441\u0442\u0430\u0442\u0438, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0410 \u043f\u0440\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430 inference. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u0441 \u043d\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438: \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 inference \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c, \u0437\u0430\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<h3>\u0412 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043b\u0443\u0447\u0448\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u044c \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Quantize-Aware. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0438 \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 inference.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ei\/lh\/e7\/eilhe7ojqspw23hwrgyal6trix0.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 Quantize-Aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/ei\/lh\/e7\/eilhe7ojqspw23hwrgyal6trix0.png\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 Quantize-Aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0441\u043b\u043e\u044f\u0445 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435, \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430. \u041f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c <code>forward-pass<\/code> \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b <a href=\"https:\/\/hassanaskary.medium.com\/intuitive-explanation-of-straight-through-estimators-with-pytorch-implementation-71d99d25d9d0\">\u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438.<\/p>\n<p>Quantize-Aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u00ab\u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u0430\u044f\u00bb \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u0430\u044f.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Post Training \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0443\u0436\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0414\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c \u0438 \u043f\u043e\u0442\u043e\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442. \u0415\u0441\u043b\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0441\u0430, \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u0445. \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c Quantize-Aware, \u043d\u043e \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0435\u043c\u0443 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e. \u0421\u0430\u043c\u044b\u0439 \u043f\u043b\u043e\u0445\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u044e \u0441\u0435\u0442\u044c \u0437\u0430 \u0440\u0430\u0437. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"S\" alt=\"S\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5d\/5db\/5dbc98dcc983a70728bd082d1a47546e.svg\" width=\"auto\" height=\"auto\"\/> \u043d\u0430 \u0432\u0441\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0410 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0435\u043d\u0437\u043e\u0440\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0441\u0442\u043e\u043b\u0431\u0446\u0430) \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430. \u0418\u0445 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0437\u0430\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u0447\u043d\u0435\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/i4\/nk\/sh\/i4nkshsfsycnmatyn-hf5-whzui.png\" alt=\"\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438: \u043f\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c, \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\" data-src=\"https:\/\/habrastorage.org\/webt\/i4\/nk\/sh\/i4nkshsfsycnmatyn-hf5-whzui.png\"\/><\/p>\n<div><figcaption>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438: \u043f\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c, \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 \u043d\u0430 \u0431\u043b\u043e\u043a\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u2014 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u0442\u043e\u0447\u043d\u0435\u0435. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u0445, \u043e \u0447\u0451\u043c \u043c\u044b \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/po\/dd\/rc\/poddrcqfqk-ksaxf7jk6ftidwhe.png\" alt=\"\u0413\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/po\/dd\/rc\/poddrcqfqk-ksaxf7jk6ftidwhe.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0447\u0435\u043c \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c.<\/p>\n<h3>\u041f\u043e \u043a\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0417\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c. \u041d\u043e \u0442\u0443\u0442 \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0444\u0438\u0437\u0438\u043a\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0436\u0451\u0441\u0442\u043a\u0438\u0435 \u0440\u0430\u043c\u043a\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/xq\/r5\/8a\/xqr58aw0gd6tdm-j45yqad67w1a.png\" alt=\"\u041f\u043e \u043a\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b\" data-src=\"https:\/\/habrastorage.org\/webt\/xq\/r5\/8a\/xqr58aw0gd6tdm-j45yqad67w1a.png\"\/><\/p>\n<div><figcaption>\u041f\u043e \u043a\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 GEMM-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u043e\u0436\u0438\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043c\u0430\u0442\u0440\u0438\u0446. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0438 \u043d\u0435 \u0442\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0435\u0448\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/hp\/0m\/3t\/hp0m3tq2vskcjywddb7mkmy7u0a.png\" data-src=\"https:\/\/habrastorage.org\/webt\/hp\/0m\/3t\/hp0m3tq2vskcjywddb7mkmy7u0a.png\"\/><\/figure>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"S\" alt=\"S\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5d\/5db\/5dbc98dcc983a70728bd082d1a47546e.svg\" width=\"auto\" height=\"auto\"\/> \u2014 \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <code>scale<\/code>.<\/p>\n<h2>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>\u0412 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><strong>Quantized type<\/strong> \u2014 \u0432 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0442\u0435\u043d\u0437\u043e\u0440\u044b;<\/p>\n<\/li>\n<li>\n<p><strong>Computation type<\/strong> \u2014 \u0432 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0438 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u0448\u0435 \u0436\u0435\u043b\u0435\u0437\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0445\u0438\u0442\u0440\u043e\u043c quantized type. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0435\u0440\u043d\u0435\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446 \u043f\u043e\u0434 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 computation type. \u0422\u0430\u043a\u0436\u0435 computation type \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0432 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u0438\u043f\u0430.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>Int16\/Int8\/Int4<\/h3>\n<p>\u0421\u0430\u043c\u044b\u0435 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2014 <img decoding=\"async\" class=\"formula inline\" source=\"[-2^{n-1}, 2^{n-1}-1]\" alt=\"[-2^{n-1}, 2^{n-1}-1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/40\/40b\/40bbc24d49fd84a0a802b57735f48d58.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Int16 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0438 15 \u0431\u0438\u0442 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fh\/9a\/1c\/fh9a1c4bmja7wcbqsv_itr0kb_u.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fh\/9a\/1c\/fh9a1c4bmja7wcbqsv_itr0kb_u.png\"\/><\/figure>\n<p>\u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0438\u0442\u043e\u0432, \u0442\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<h3>Float32<\/h3>\n<p>\u0412\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f float32 \u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c <a href=\"https:\/\/ieeexplore.ieee.org\/document\/4610935\">IEEE-754<\/a>. \u0417\u0434\u0435\u0441\u044c \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 8 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, 23 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yk\/bp\/9v\/ykbp9vyhel00cjk0irf2kmvci-y.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yk\/bp\/9v\/ykbp9vyhel00cjk0irf2kmvci-y.png\"\/><\/figure>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0430:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/v2\/vn\/su\/v2vnsubimcfedptrwt86kccaw3y.png\" data-src=\"https:\/\/habrastorage.org\/webt\/v2\/vn\/su\/v2vnsubimcfedptrwt86kccaw3y.png\"\/><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0438\u0442\u043e\u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u043e\u0434 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0443, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0411\u0438\u0442\u044b, \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u043b\u044f \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435.<\/p>\n<h3>Float16<\/h3>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d \u0442\u0435\u043c \u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c <a href=\"https:\/\/ieeexplore.ieee.org\/document\/4610935\">IEEE-754<\/a> \u0432 \u0438\u0437\u0434\u0430\u043d\u0438\u0438 2008 \u0433\u043e\u0434\u0430. \u0411\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 5 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 10 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tz\/r_\/ou\/tzr_ouhwqbuwwlyj_ull23_bffw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tz\/r_\/ou\/tzr_ouhwqbuwwlyj_ull23_bffw.png\"\/><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 float16 \u2014 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e 65504, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<h3>Bfloat16, \u0438\u043b\u0438 brain float<\/h3>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 Google Brain. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e float32. \u0411\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0435: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 8 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 7 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/2p\/ya\/qk\/2pyaqkebkdpdpgpqbb0krfzbobi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/2p\/ya\/qk\/2pyaqkebkdpdpgpqbb0krfzbobi.png\"\/><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442\u043e\u0432 \u043f\u043e\u0434 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c float32. \u0417\u043d\u0430\u0447\u0438\u0442, bfloat16 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u0443\u0441\u0442\u044c \u0438 \u043c\u0435\u043d\u0435\u0435 \u0442\u043e\u0447\u043d\u043e. \u0417\u0430\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u043f\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 \u0432 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c bf16 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e float32. \u041c\u0430\u0433\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0431\u0438\u0442\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0436\u0435\u043b\u0435\u0437\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435).<\/p>\n<h3>TensorFloat32<\/h3>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 19-\u0431\u0438\u0442\u043d\u044b\u0439 <a href=\"https:\/\/blogs.nvidia.com\/blog\/2020\/05\/14\/tensorfloat-32-precision-format\/\">\u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u043e\u0442 NVidia. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 NVidia Ampere (A-100). \u0411\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 8 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, 10 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vu\/lq\/2h\/vulq2hyunepvkfce1ijz3tkc8bo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vu\/lq\/2h\/vulq2hyunepvkfce1ijz3tkc8bo.png\"\/><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442\u043e\u0432 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 bfloat16, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u0441 float32;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442\u043e\u0432 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 float16.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0439, \u043d\u043e \u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041b\u043e\u0436\u043a\u0430 \u0434\u0451\u0433\u0442\u044f \u2014 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u0445 NVidia.<\/p>\n<h3>E4M3 \u0438 E5M2<\/h3>\n<p>\u041d\u043e\u0432\u044b\u0435 8-\u0431\u0438\u0442\u043d\u044b\u0435 float. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b NVidia, ARM \u0438 Intel \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/arxiv.org\/abs\/2209.05433\">FP8 Formats for Deep Learning<\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>E4M3: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 4 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, 3 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b;<\/p>\n<\/li>\n<li>\n<p>E5M2: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 5 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, 2 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM \u0438 \u00ab\u043a\u0430\u0440\u0442\u0438\u043d\u043e\u0447\u043d\u044b\u0435\u00bb \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043d\u0444\u0435\u0440\u0438\u0442\u044c \u0438 \u0434\u0430\u0436\u0435 \u043e\u0431\u0443\u0447\u0430\u0442\u044c (!) \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u0442\u0438\u043f\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0416\u0434\u0451\u043c \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u0436\u0435\u043b\u0435\u0437\u0435. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 4-\u0431\u0438\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: E2M1 \u0438 E3M0.<\/p>\n<h3>NormalFloat4<\/h3>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2305.14314\">Normal Float 4 (NF4)<\/a> \u2014 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f 4-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u0441\u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u043a\u043e\u043b\u043e \u043d\u0443\u043b\u044f. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e NF4 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u0435\u043d \u0434\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"N(0, 1)\" alt=\"N(0, 1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/30\/30c\/30ce6c25fcf3d9331a15841e15b05fcf.svg\" width=\"auto\" height=\"auto\"\/> \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[-1, 1]\" alt=\"[-1, 1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7de\/7dec1d46e68831c4eca28b020fcb1604.svg\" width=\"auto\" height=\"auto\"\/>. \u041f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0438 <a href=\"https:\/\/arxiv.org\/abs\/2306.06965\">\u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435<\/a>, \u043d\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442.<\/p>\n<p>\u0415\u0441\u0442\u044c 4 \u0431\u0438\u0442\u0430 \u2014 \u044d\u0442\u043e 16 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0414\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 -1 \u0438 1 \u2014 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f 14. \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"N(0, 1)\" alt=\"N(0, 1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/30\/30c\/30ce6c25fcf3d9331a15841e15b05fcf.svg\" width=\"auto\" height=\"auto\"\/> \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[-1, 1]\" alt=\"[-1, 1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7de\/7dec1d46e68831c4eca28b020fcb1604.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fx\/dr\/sv\/fxdrsvicybanltaxlotj4e6fiqa.png\" alt=\"\u0422\u043e\u0447\u043a\u0438 -1 \u0438 1 \u0443 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f N(0, 1) \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043c, \u043d\u043e \u0442\u0430\u043a \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435\" data-src=\"https:\/\/habrastorage.org\/webt\/fx\/dr\/sv\/fxdrsvicybanltaxlotj4e6fiqa.png\"\/><\/p>\n<div><figcaption>\u0422\u043e\u0447\u043a\u0438 -1 \u0438 1 \u0443 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f N(0, 1) \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043c, \u043d\u043e \u0442\u0430\u043a \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0441\u0430 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[-1, 1]\" alt=\"[-1, 1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7de\/7dec1d46e68831c4eca28b020fcb1604.svg\" width=\"auto\" height=\"auto\"\/>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0441 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u0432 \u043d\u0435\u0439 \u043d\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0443\u043b\u044f. \u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <img decoding=\"async\" class=\"formula inline\" source=\"[-1, 1]\" alt=\"[-1, 1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7d\/7de\/7dec1d46e68831c4eca28b020fcb1604.svg\" width=\"auto\" height=\"auto\"\/> \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0445\u043e\u0434\u044f\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"2^{k-1}\" alt=\"2^{k-1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/cb\/cb4\/cb4e13beaac7aea4551bb2c115f477fe.svg\" width=\"auto\" height=\"auto\"\/> \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439 \u0441\u043b\u0435\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0445\u043e\u0434\u044f\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"2^{k-1} + 1\" alt=\"2^{k-1} + 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b\/b3\/b3a\/b3aa1b7c1ca4bdf267177dc7eb25209d.svg\" width=\"auto\" height=\"auto\"\/> \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439 \u0441\u043f\u0440\u0430\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043b\u0435\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0443\u043b\u044e.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zl\/id\/32\/zlid32dncqd5jh6b6kbb9fn2dqq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/zl\/id\/32\/zlid32dncqd5jh6b6kbb9fn2dqq.png\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/si\/xt\/dc\/sixtdcpy8gahikpmmjtvxuystz4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/si\/xt\/dc\/sixtdcpy8gahikpmmjtvxuystz4.png\"\/><\/figure>\n<p>\u041a \u044d\u0442\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0435\u0449\u0451 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438 QLoRA.<\/p>\n<h2>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 LLM \u2014 \u0430\u0432\u0442\u043e\u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0442\u043e\u043a\u0435\u043d \u0437\u0430 \u0440\u0430\u0437. \u041d\u0435\u0443\u0434\u0430\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u0442\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u0415\u0441\u043b\u0438 \u0432 \u0445\u043e\u0434\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043d\u0435\u0441\u0442\u0438 \u043d\u0435 \u0442\u0443\u0434\u0430, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u043e\u0442 \u043e\u0442\u0432\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0418 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043e\u0436\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0441\u044f \u043d\u0435 \u0442\u0435.<\/p>\n<p>\u0423\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b. \u041d\u043e \u0443 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u043f\u0435\u0442\u044c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0437-\u0437\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0451\u043c\u043a\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u043d\u0443\u0436\u043d\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438. Quantize-aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432\u044b\u0448\u0435, \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432 6,7 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 <a href=\"https:\/\/arxiv.org\/pdf\/2208.07339.pdf\">\u0442\u0435\u0440\u044f\u044e\u0442 \u0432\u0441\u0451 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e<\/a>. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u0438\u0437-\u0437\u0430 \u0440\u0430\u0441\u0442\u0443\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u0445, \u043e \u0447\u0451\u043c \u043c\u044b \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h3>\u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>\u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4b\/zb\/hx\/4bzbhxuc0oq4mro8rx4judxaqaq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/4b\/zb\/hx\/4bzbhxuc0oq4mro8rx4judxaqaq.png\"\/><\/figure>\n<p>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0432\u044b\u0431\u0440\u043e\u0441?<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/p8\/vu\/o6\/p8vuo6riufa6idragdqmm6c_bmo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/p8\/vu\/o6\/p8vuo6riufa6idragdqmm6c_bmo.png\"\/><\/figure>\n<p>\u0412\u0435\u0441\u0430 \u00ab\u0441\u043a\u043b\u0435\u0438\u043b\u0438\u0441\u044c\u00bb \u0432 \u0443\u0437\u043a\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0435\u043e\u0442\u043b\u0438\u0447\u0438\u043c\u044b. \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e. \u0422\u0430\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0431\u0440\u043e\u0441 \u0438\u0441\u043f\u043e\u0440\u0442\u0438\u043b \u0432\u0441\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443.<\/p>\n<p>\u0412\u044b\u0431\u0440\u043e\u0441\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0441\u0435\u0433\u043e 0,1\u20131% \u043e\u0442 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043d\u0443\u043b\u0438\u0432 \u0438\u0445. \u041d\u043e \u044d\u0442\u043e <a href=\"https:\/\/arxiv.org\/pdf\/2208.07339.pdf\">\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442<\/a> \u043a \u043f\u043e\u043b\u043d\u043e\u0439 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u043f\u043e\u0442\u0435\u0440\u044f\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u0440\u043e\u0441\u0442\u0443 \u043f\u0435\u0440\u043f\u043b\u0435\u043a\u0441\u0438\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442, \u0437\u0430\u043d\u0443\u043b\u0438\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0431\u044a\u0451\u043c\u0430, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0432\u0430\u0436\u043d\u044b, \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>\u041f\u0440\u0438\u0440\u043e\u0434\u0430 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0438 \u0431\u043e\u0440\u044c\u0431\u0430 \u0441 \u043d\u0438\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f, \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f <a href=\"https:\/\/www.evanmiller.org\/attention-is-off-by-one.html\">\u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439. \u041f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0442\u043e\u043a\u0435\u043d\u044b, \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u2014 \u043a\u0430\u043d\u0430\u043b\u044b. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e, \u0443 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0431\u0440\u043e\u0441\u044b \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u0445 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u0430\u0445 (\u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445).<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c? \u0415\u0441\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yb\/mb\/hc\/ybmbhcf1x6w09ketkuob3otsgjg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yb\/mb\/hc\/ybmbhcf1x6w09ketkuob3otsgjg.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u044b, \u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/su\/mr\/cp\/sumrcpbudjcuhxdbx8_ufxzzkzw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/su\/mr\/cp\/sumrcpbudjcuhxdbx8_ufxzzkzw.png\"\/><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432: \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0438 \u043f\u043e \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043f\u043e \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c, \u044d\u0442\u043e \u0431\u044b \u0440\u0435\u0448\u0438\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438, \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u043b\u0435\u0436\u0430\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0445\u043e\u0436\u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430, \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u043b\u044f \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0441 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c.<\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438, \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 inference \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c. \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0431\u043e\u0440\u044c\u0431\u044b \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<h3>LLM.Int8<\/h3>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/arxiv.org\/abs\/2208.07339\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 (175 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 16- \u0438\u043b\u0438 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432 \u0432 8-\u0431\u0438\u0442\u043d\u044b\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 <a href=\"https:\/\/huggingface.co\/blog\/hf-bitsandbytes-integration#accelerate-is-all-you-need\">\u043f\u043e\u0441\u0442 \u0432 \u0431\u043b\u043e\u0433\u0435 Hugging Face<\/a>. \u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e (0,1\u20131% \u043e\u0442 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439) \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u043d\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u0430\u0445 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"auto\" height=\"auto\"\/> \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"auto\" height=\"auto\"\/>. \u0421\u0442\u043e\u043b\u0431\u0446\u044b <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"auto\" height=\"auto\"\/> \u0434\u0435\u043b\u044f\u0442 \u043d\u0430 \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b: \u0442\u0435, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0432\u044b\u0431\u0440\u043e\u0441, \u0438 \u0442\u0435, \u0447\u0442\u043e \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f-\u0432\u044b\u0431\u0440\u043e\u0441\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435: \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u0431\u043e\u043b\u044c\u0448\u0435 6 (science!). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0445.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qs\/yr\/ok\/qsyrokaz2qym-edp54m-ujbmxx0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qs\/yr\/ok\/qsyrokaz2qym-edp54m-ujbmxx0.png\"\/><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <img decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/86\/865\/865c0c0b4ab0e063e5caa3387c1a8741.svg\" width=\"auto\" height=\"auto\"\/>-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"auto\" height=\"auto\"\/> \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 <img decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/86\/865\/865c0c0b4ab0e063e5caa3387c1a8741.svg\" width=\"auto\" height=\"auto\"\/>-\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"auto\" height=\"auto\"\/>. \u0417\u043d\u0430\u0447\u0438\u0442, \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"auto\" height=\"auto\"\/> \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438, \u043e\u0442\u0434\u0435\u043b\u0438\u0432 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c-\u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/02\/021\/02129bb861061d1a052c592e2dc6b383.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043c\u0430\u0442\u0440\u0438\u0446: \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u0431\u0435\u0437. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0438 \u0441\u043b\u043e\u0436\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c\u0443 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0411\u00f3\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 8 \u0431\u0438\u0442 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c 16-\u0431\u0438\u0442\u043d\u043e\u043c \u0442\u0438\u043f\u0435 \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0432\u044b\u0440\u043e\u0441\u0448\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0417\u0430\u043c\u0435\u0440\u044b \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0443\u0445\u0443\u0434\u0448\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 inference \u043d\u0430 BLOOM-176B \u043d\u0430 15\u201323% \u043f\u0440\u043e\u0442\u0438\u0432 16-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0430. \u0414\u043b\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a T5-3B, \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0435\u0449\u0451 \u0441\u0438\u043b\u044c\u043d\u0435\u0435.<\/p>\n<h3>SmoothQuant<\/h3>\n<p>\u0412 <a href=\"https:\/\/arxiv.org\/abs\/2211.10438\">\u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0439 SmoothQuant<\/a> (\u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/mit-han-lab\/smoothquant\">GitHub<\/a>), \u0430\u0432\u0442\u043e\u0440\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0435\u0441\u0430, \u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421 \u0432\u0435\u0441\u0430\u043c\u0438 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043e \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443, \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e \u043d\u0443\u043b\u044f \u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0421 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u043c\u0438 \u0434\u0435\u043b\u043e \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u0432 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u0445. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 100 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0430\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/nw\/ig\/ix\/nwigix4_wjpq6ecdpwumwwwgncq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/nw\/ig\/ix\/nwigix4_wjpq6ecdpwumwwwgncq.png\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jv\/d7\/er\/jvd7er6xomyhm2pw06lqv-e4ndg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jv\/d7\/er\/jvd7er6xomyhm2pw06lqv-e4ndg.png\"\/><\/figure>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0431\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u0443\u044e. \u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0432\u0442\u043e\u0440\u043e\u0439. \u041f\u0440\u043e\u0433\u043e\u043d\u0438\u043c \u0431\u0430\u0442\u0447\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kh\/4b\/gb\/kh4bgbs9ltx47vy1xjdpaknvva8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kh\/4b\/gb\/kh4bgbs9ltx47vy1xjdpaknvva8.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/36\/363\/363b122c528f54df4a0446b6bab05515.svg\" width=\"auto\" height=\"auto\"\/>-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"|X|\" alt=\"|X|\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e4\/e42\/e4240ff886dbbfcedd3db989e33b4853.svg\" width=\"auto\" height=\"auto\"\/> \u0438 \u043d\u0430\u0439\u0434\u0451\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\max|X_{:, j}|\" alt=\"\\max|X_{:, j}|\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/87\/87d\/87de0a5cc1cf90127ac1a29a0e234c32.svg\" width=\"auto\" height=\"auto\"\/>. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u043d\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ca\/0i\/v-\/ca0iv-5zn2jm-ow-8bvotctga-y.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ca\/0i\/v-\/ca0iv-5zn2jm-ow-8bvotctga-y.png\"\/><\/figure>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W_{j,:}\" alt=\"W_{j,:}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a2\/a29\/a29a10e576f5faddccd2b290ece40134.svg\" width=\"auto\" height=\"auto\"\/> \u0443\u043c\u043d\u043e\u0436\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0436\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lb\/cu\/vo\/lbcuvoafj-jjlwurnk2yn_yoes8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/lb\/cu\/vo\/lbcuvoafj-jjlwurnk2yn_yoes8.png\"\/><\/figure>\n<p>\u0422\u0430\u043a \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0430 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439, \u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"XW\" alt=\"XW\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c9\/c98\/c98a92895c977b6ca392a0ce07664f0d.svg\" width=\"auto\" height=\"auto\"\/> \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c! \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0441\u044c \u2014 \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432. \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438. \u0412\u0432\u0435\u0434\u0451\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"s_j\" alt=\"s_j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/14\/147\/14730a16e7ffd22066fda608764658c0.svg\" width=\"auto\" height=\"auto\"\/> \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438.<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"s_j=\\frac {\\max ( |X_{:,j}| ) ^\\alpha } {\\max(|W_{j,:}|)^{1 - \\alpha}}\" alt=\"s_j=\\frac {\\max ( |X_{:,j}| ) ^\\alpha } {\\max(|W_{j,:}|)^{1 - \\alpha}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d3\/d30\/d304713969ba13f7ac122014ce0c9e06.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"\\alpha\" alt=\"\\alpha\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7b\/7b7\/7b7f9dbfea05c83784f8b85149852f08.svg\" width=\"auto\" height=\"auto\"\/> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043d\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u0432 \u043a\u0430\u043a\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u043e\u0439\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430. \u0410\u0432\u0442\u043e\u0440\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0440\u0430\u0442\u044c 0,5.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/uf\/re\/nh\/ufrenhd4pknkiqtfzq5h7kz_tba.png\" data-src=\"https:\/\/habrastorage.org\/webt\/uf\/re\/nh\/ufrenhd4pknkiqtfzq5h7kz_tba.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/36\/363\/363b122c528f54df4a0446b6bab05515.svg\" width=\"auto\" height=\"auto\"\/>-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0438 \u0434\u043e\u043c\u043d\u043e\u0436\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/36\/363\/363b122c528f54df4a0446b6bab05515.svg\" width=\"auto\" height=\"auto\"\/>-\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432\u0435\u0441\u043e\u0432 \u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"s_j\" alt=\"s_j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/14\/147\/14730a16e7ffd22066fda608764658c0.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1a\/zv\/-u\/1azv-ugdreu9zfhxexiresbjk1s.png\" data-src=\"https:\/\/habrastorage.org\/webt\/1a\/zv\/-u\/1azv-ugdreu9zfhxexiresbjk1s.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"auto\" height=\"auto\"\/>, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0441\u044f \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0435 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vv\/gn\/jc\/vvgnjcpo93af25jmkgnssqg4pqq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vv\/gn\/jc\/vvgnjcpo93af25jmkgnssqg4pqq.png\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ag\/cd\/7x\/agcd7x8bnyofj2awe8jed8bxsxe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ag\/cd\/7x\/agcd7x8bnyofj2awe8jed8bxsxe.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u043b\u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0432 \u043e\u0444\u043b\u0430\u0439\u043d\u0435. \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <img decoding=\"async\" class=\"formula inline\" source=\"s_j\" alt=\"s_j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/14\/147\/14730a16e7ffd22066fda608764658c0.svg\" width=\"auto\" height=\"auto\"\/> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0435\u0447\u044c \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432. \u0414\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0435\u043a\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u044f inference. \u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<\/p>\n<h3>GPTQ: Quantization for Generative Pre-trained Transformers<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0443\u043c\u0430\u0435\u043c\u0441\u044f: \u0430 \u0442\u0443 \u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0435\u0448\u0430\u0435\u043c? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443 \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0412\u0435\u0434\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{W}\" alt=\"\\hat{W}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/3e\/3ef\/3ef3be39c0ce6db13e25b74b1c003dd1.svg\" width=\"auto\" height=\"auto\"\/>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\min_{\\hat{W}} || XW - X\\hat{W} ||^2_2\" alt=\"\\min_{\\hat{W}} || XW - X\\hat{W} ||^2_2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fbe\/fbe0725c2fff761873f2b1b16311a25e.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u0442\u0440\u0443\u0434\u043d\u043e\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043e\u043b\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 1990 \u0433\u043e\u0434\u0443 \u0432 <a href=\"https:\/\/citeseerx.ist.psu.edu\/document?repid=rep1&amp;type=pdf&amp;doi=17c0a7de3c17d31f79589d245852b57d083d386e\">\u0441\u0442\u0430\u0442\u044c\u0435 Optimal Brain Damage<\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u0440\u0435\u0448\u0430\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u0443\u043d\u0438\u043d\u0433\u0430: \u043a\u0430\u043a\u0438\u0435 \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u0443\u043b\u0438\u0442\u044c, \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u00ab\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u00bb \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W\" alt=\"W\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/61\/61e\/61e9c06ea9a85a5088a499df6458d276.svg\" width=\"auto\" height=\"auto\"\/>. \u041f\u0440\u0443\u043d\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ol>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043d\u0443\u043b\u044f\u0435\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0448\u0430\u0433\u0443 \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0435\u043c \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0432\u0435\u0441\u0430.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/-c\/xs\/1b\/-cxs1bb_6np5etsviswb-somvr4.png\" alt=\"\u041f\u0440\u0443\u043d\u0438\u043d\u0433\" data-src=\"https:\/\/habrastorage.org\/webt\/-c\/xs\/1b\/-cxs1bb_6np5etsviswb-somvr4.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0443\u043d\u0438\u043d\u0433<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0442\u043e\u043c \u0436\u0435 1990 \u0433\u043e\u0434\u0443 \u0438\u0434\u0435\u044f \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435. \u0412\u044b\u0445\u043e\u0434\u0438\u0442 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/proceedings.neurips.cc\/paper\/1992\/file\/303ed4c69846ab36c2904d3ba8573050-Paper.pdf\">Optimal Brain Surgeon<\/a>, \u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0435\u0441\u0441\u0438\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041d\u0430\u0448\u0438 \u0434\u043d\u0438. \u0421\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/arxiv.org\/abs\/2208.11580\">Optimal Brain Quantization<\/a> \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 OBS \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u0430\u043a? \u041d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0441\u043e\u0432 \u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043e\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u043a \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0430\u0432\u0442\u043e\u0440\u044b \u043d\u0430\u0448\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e ResNet \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 Bert. \u041d\u043e \u0434\u043b\u044f LLM \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u044f\u0436\u0451\u043b\u044b\u0439.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/14\/sh\/q8\/14shq8zyg9zbnvxjdpx5q0jslsc.png\" alt=\"\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/14\/sh\/q8\/14shq8zyg9zbnvxjdpx5q0jslsc.png\"\/><\/p>\n<div><figcaption>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/arxiv.org\/abs\/2210.17323\">GPTQ<\/a> \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u044b\u0441\u0442\u0440\u043e. \u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 176 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0432 3\u20134 \u0431\u0438\u0442\u0430 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 A100. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u043f\u043e\u0442\u044f\u043d\u0435\u0442 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0438\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/IST-DASLab\/gptq\">GitHub<\/a>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0441\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u043d\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443, \u043a\u0430\u043a \u0432 OBS, \u0430 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u2014 \u043e\u0434\u0438\u043d \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0437\u0430 \u0440\u0430\u0437. \u0415\u0441\u043b\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0432\u0435\u0441\u0443, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438, \u0447\u0442\u043e \u0437\u0430\u0433\u0443\u0431\u0438\u0442 \u0432\u0441\u044e \u0438\u0434\u0435\u044e.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>A100 \u2014 3.25 speedup over FP16;<\/p>\n<\/li>\n<li>\n<p>A6000 \u2014 4.5 speedup over FP16.<\/p>\n<\/li>\n<\/ul>\n<h3>SPQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compression<\/h3>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2306.03078\">SPQR<\/a> \u2014 \u043c\u0435\u0442\u043e\u0434 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Yandex Research \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0441\u043e\u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0438\u0434\u0435\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u0432\u0435\u0441\u0430 LLM \u0432 3- \u0438\u043b\u0438 4-\u0431\u0438\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>SPQR \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438: \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438. \u0421 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0434\u0435\u0435\u0439 \u043c\u044b \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438\u0441\u044c. \u041d\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 LLM.Int8, \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u0430 \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430 \u0436\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 post-training-\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u0438 \u0432 GPTQ, \u043d\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u044e\u0442 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u043e 16 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u043d\u0438 \u0434\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0440\u043e\u0441\u0442\u0443 \u0447\u0438\u0441\u043b\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442. \u0423 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0435\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0432\u0441\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<p>\u0412\u044b\u0431\u0440\u043e\u0441\u044b \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0445 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u0437\u0430\u0442\u0435\u043c \u043f\u043e \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0431\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 32 \u0431\u0438\u0442\u0430: 16 \u0431\u0438\u0442 \u043d\u0430 \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 16 \u0431\u0438\u0442 \u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0440\u0430\u043d\u044f\u0442 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f inference \u0432\u0435\u0441\u0430 \u0434\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0432 16-\u0431\u0438\u0442\u043d\u043e\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e GPU-\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SPQR-\u0444\u043e\u0440\u043c\u0430\u0442\u0430. \u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0435 LLM \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f memory-bound, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0436\u0430\u0442\u0438\u044f \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jw\/yd\/zj\/jwydzjz8suucftxzwjyh4te3ngm.png\" alt=\"SpQR \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430. \u0421\u043f\u0440\u0430\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/jw\/yd\/zj\/jwydzjz8suucftxzwjyh4te3ngm.png\"\/><\/p>\n<div><figcaption>SpQR \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430. \u0421\u043f\u0440\u0430\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/Vahe1994\/SpQR\">GitHub<\/a>.<\/p>\n<h3>QLoRA<\/h3>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f inference. \u041c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/arxiv.org\/abs\/2305.14314\">QLoRA<\/a> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 fine-tuning. \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, <a href=\"https:\/\/github.com\/artidoro\/qlora\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 GitHub<\/a> \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0434\u0435\u044e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 <a href=\"https:\/\/arxiv.org\/abs\/2106.09685\">LoRA<\/a>. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <a href=\"https:\/\/github.com\/huggingface\/peft\">Parameter-Efficient Fine-Tuning<\/a>. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u0444\u0430\u0439\u043d\u0442\u044e\u043d\u0438\u0442\u044c \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0443. \u0414\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0432\u0441\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u0434\u043e\u0440\u043e\u0433\u043e. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 skip-connection \u0431\u043b\u043e\u043a\u0438-\u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b. \u0412\u0435\u0441\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0442, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c \u0434\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b QLoRA \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0443\u0447\u0438\u0442\u044c \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img decoding=\"async\" class=\"formula inline\" source=\"d \\times d\" alt=\"d \\times d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f8\/f85\/f858209db5ff68dc3a7fa1592622a6d8.svg\" width=\"auto\" height=\"auto\"\/> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b: <img decoding=\"async\" class=\"formula inline\" source=\"d \\times r\" alt=\"d \\times r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/78\/786\/7868b8629dc3794f4aab15ac57ff035d.svg\" width=\"auto\" height=\"auto\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"r \\times d\" alt=\"r \\times d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/81\/81c\/81cc51d282a5dfa89b3b44b32898c2a9.svg\" width=\"auto\" height=\"auto\"\/>, \u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"r\" alt=\"r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4b\/4b4\/4b43b0aee35624cd95b910189b3dc231.svg\" width=\"auto\" height=\"auto\"\/> \u043c\u0435\u043d\u044c\u0448\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"d\" alt=\"d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/82\/827\/8277e0910d750195b448797616e091ad.svg\" width=\"auto\" height=\"auto\"\/>. \u0422\u0438\u043f\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"d\" alt=\"d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/82\/827\/8277e0910d750195b448797616e091ad.svg\" width=\"auto\" height=\"auto\"\/> >= 768, \u0430 LoRA \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u0436\u0435 \u043f\u0440\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"r\" alt=\"r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4b\/4b4\/4b43b0aee35624cd95b910189b3dc231.svg\" width=\"auto\" height=\"auto\"\/> = 20.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/gt\/lf\/j-\/gtlfj-8k1msbpi_zv8zpymwkxno.png\" alt=\"\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b QLoRA\" data-src=\"https:\/\/habrastorage.org\/webt\/gt\/lf\/j-\/gtlfj-8k1msbpi_zv8zpymwkxno.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b QLoRA<\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b QLoRA \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0412\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0432 NF4, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043c\u0430\u043b\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u043e 64 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u043e 256. \u0412 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u0445 \u043d\u0443\u0436\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 BF16. \u0412\u043e \u0432\u0440\u0435\u043c\u044f fine-tuning NF4-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u043a \u043d\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 BF16.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/gk\/sw\/b4\/gkswb4rctcudg6wyse_cge3t5t8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/gk\/sw\/b4\/gkswb4rctcudg6wyse_cge3t5t8.png\"\/><\/figure>\n<p>\u0433\u0434\u0435<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/f4\/7p\/cn\/f47pcnieoqzk7ufwrysy3ekepqc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/f4\/7p\/cn\/f47pcnieoqzk7ufwrysy3ekepqc.png\"\/><\/figure>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u043e\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e\u0442 \u044d\u043a\u0441\u043a\u0443\u0440\u0441 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0430\u0445, \u0447\u0442\u043e\u0431\u044b \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 GitHub \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439. \u0414\u0443\u043c\u0430\u044e, \u0441 \u044d\u0442\u0438\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0443\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0432\u0441\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043f\u043e-\u0441\u0432\u043e\u0435\u043c\u0443 \u0445\u043e\u0440\u043e\u0448\u0438, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0445 \u00ab\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c\u00bb \ud83d\ude09<\/p>\n<p>\u041f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0435\u0449\u0451 \u0433\u043b\u0443\u0431\u0436\u0435 \u043d\u044b\u0440\u043d\u0443\u0442\u044c \u0432 \u0442\u0435\u043c\u0443 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/ieeexplore.ieee.org\/document\/4610935\">C\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b IEEE-754<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/blogs.nvidia.com\/blog\/2020\/05\/14\/tensorfloat-32-precision-format\/\">tensorfloat32<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2209.05433\">FP8 Formats for Deep Learning<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2305.14314\">Normal Float 4 (NF4)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/huggingface.co\/blog\/hf-bitsandbytes-integration#accelerate-is-all-you-need\">HuggingFace \u043f\u0440\u043e 8-\u0431\u0438\u0442\u043d\u0443\u044e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2211.10438\">SmoothQuant<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/mit-han-lab\/smoothquant\">SmoothQuant github<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/citeseerx.ist.psu.edu\/document?repid=rep1&amp;type=pdf&amp;doi=17c0a7de3c17d31f79589d245852b57d083d386e\">OptimalBrainDamage<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/proceedings.neurips.cc\/paper\/1992\/file\/303ed4c69846ab36c2904d3ba8573050-Paper.pdf\">OptimalBrainSurgeon<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2208.11580\">OptimalBrainQuantization<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2210.17323\">GPTQ<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/IST-DASLab\/gptq\">GPTQ GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2306.03078\">SPQR<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/Vahe1994\/SpQR\">SPQR GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2106.09685\">LoRa<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/abs\/2305.14314\">QLoRA<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/artidoro\/qlora\">QloRA GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/huggingface\/peft\">HuggingFace\/peft<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/hassanaskary.medium.com\/intuitive-explanation-of-straight-through-estimators-with-pytorch-implementation-71d99d25d9d0\">Straight-Through Estimators<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/hanlab.mit.edu\/courses\/2023-fall-65940\">\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043a\u0443\u0440\u0441\u0430 TinyML and Efficient Deep Learning Computing<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/mryab\/efficient-dl-systems\">\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043a\u0443\u0440\u0441\u0430 Efficient Deep Learning Systems<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u043c\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043b\u0438\u0447\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2014 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u043e\u0434\u0438\u0441\u043a\u0443\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0435\u043c\u0438, \u043a\u043e\u043c\u0443 \u0442\u0435\u043c\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u043c\u043d\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/800945\/\"> https:\/\/habr.com\/ru\/articles\/800945\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u0417\u0435\u043c\u043b\u044f\u043d\u043e\u0432, \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 ML-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u044f \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043f\u043e\u0442\u0442\u0435\u0440 \u2014 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0436\u0438\u0432\u0451\u0442 \u0432 \u0443\u043c\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 \u042f\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0436\u0434\u0451\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043b\u043e\u0432\u0430 \u00ab\u0410\u043b\u0438\u0441\u0430\u00bb. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043c\u0430\u043b\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0437\u0430 \u0441\u0447\u0451\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u2014 \u0442\u0430\u043a \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u0432\u044b\u0448\u043b\u043e.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u044f \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 YandexGPT. \u0412\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u044f \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438. \u041c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (LLM). \u0415\u0449\u0451 \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043b\u044e\u0434\u0438 \u0431\u0435\u0440\u0443\u0442 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0432 4 \u0431\u0438\u0442\u0430 \u0438 \u0443\u043c\u0443\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430\u0445. \u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f, \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043d\u0430 \u0434\u043e\u043a\u043b\u0430\u0434 \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433 \u0438 \u0434\u0440\u0443\u0437\u0435\u0439. \u0410 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u043e\u0444\u043e\u0440\u043c\u0438\u0432 \u0438\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u044e. \u0422\u0430\u043a \u044f \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \ud83d\ude42<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c, \u0442\u0430\u043a \u0438 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c \u0432 \u0441\u0444\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0430\u043c, \u043a\u043e\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435. \u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0430 \u0435\u0449\u0451 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h2>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430) \u0432 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0437 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u041d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0414\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0431\u0438\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 float32, \u043a \u0442\u0438\u043f\u0443 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c, \u0442\u0430\u043a\u043e\u043c\u0443 \u043a\u0430\u043a int8. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u0440\u0438\u0446\u0435\u043b\u043e\u043c \u043d\u0430 LLM.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f? \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u041a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u044d\u043a\u043e\u043d\u043e\u043c\u044f\u0442 \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442.<\/p>\n<p>\u0423 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u043b\u0438\u0447\u043d\u043e\u0433\u043e GPU-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<\/p>\n<h3>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/arxiv.org\/abs\/1803.03289\">\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/arxiv.org\/pdf\/2308.04595.pdf\">\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u043c\u0430\u0442\u0440\u0438\u0446. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0432\u0448\u0435\u043c \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0435.<\/p>\n<h4>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f, \u0438\u043b\u0438 \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432 k-\u0431\u0438\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 .<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0420\u0430\u0437 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0441\u0442\u044c <code>zero-point<\/code> \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 <code>scale<\/code>. \u041e\u0442\u0441\u044e\u0434\u0430 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0437 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439.<\/p>\n<figure class=\"\"><\/figure>\n<p> \u0438  \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.  \u2014 <code>scale<\/code>, \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439, \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p> \u2014 <code>zero-point<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0433\u0434\u0435  \u2014 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c \u0441\u0435\u0442\u044f\u043c \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u044f. \u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443: \u0432\u043d\u0438\u0437, \u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438. , \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435.<\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p>\u0414\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p>\u0410\u0444\u0444\u0438\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 ReLU.<\/p>\n<h4>\u0421\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0421\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u043b\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u043e\u043b\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u043e\u043b\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e. \u0413\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043a\u0430\u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 .<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0442\u0438\u043f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <code>signed int8: [-128, 127]<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 <code>[-127, 127]<\/code>.<\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b:<\/p>\n<p>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p>\u0414\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0444\u043e\u0440\u043c\u0443\u043b \u0430\u0444\u0444\u0438\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 . \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0430\u0444\u0444\u0438\u043d\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u043d\u0430 \u0443\u043c\u0435\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0430\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0437\u0430 \u0441\u0447\u0451\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 zero-point, \u0430 \u0434\u043b\u044f \u0434\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0432 int8<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c\u0438 \u0447\u0438\u0441\u0435\u043b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 8-\u0431\u0438\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p><strong>\u0428\u0430\u0433 1.<\/strong> \u0411\u0435\u0440\u0451\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440.<br \/> <strong>\u0428\u0430\u0433 2.<\/strong> \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<p><strong>\u0428\u0430\u0433 3.<\/strong> \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c  \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435.<br \/> <strong>\u0428\u0430\u0433 4.<\/strong> \u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u0435\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 8-\u0431\u0438\u0442\u043d\u044b\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <code>0,0077<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043e\u0431\u044a\u0451\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 32-\u0431\u0438\u0442\u043d\u043e\u043c\u0443 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/div>\n<\/details>\n<h3>\u0427\u0442\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c <strong>\u0432\u0435\u0441\u0430<\/strong> \u043c\u043e\u0434\u0435\u043b\u0438. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u044b \u0441\u043b\u043e\u0451\u0432 \u2014 <strong>\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u0445 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0413\u043e\u0442\u043e\u0432\u043e \u2014 \u0432\u044b \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u044b! \u041a\u0441\u0442\u0430\u0442\u0438, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0410 \u043f\u0440\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430 inference. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u0441 \u043d\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438: \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 inference \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c, \u0437\u0430\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<h3>\u0412 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043b\u0443\u0447\u0448\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u044c \u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Quantize-Aware. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0438 \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 inference.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 Quantize-Aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0441\u043b\u043e\u044f\u0445 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435, \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430. \u041f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c <code>forward-pass<\/code> \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b <a href=\"https:\/\/hassanaskary.medium.com\/intuitive-explanation-of-straight-through-estimators-with-pytorch-implementation-71d99d25d9d0\">\u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438.<\/p>\n<p>Quantize-Aware-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u00ab\u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u0430\u044f\u00bb \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u0430\u044f.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Post Training \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442 \u0443\u0436\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0414\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c \u0438 \u043f\u043e\u0442\u043e\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0443\u044e\u0442. \u0415\u0441\u043b\u0438 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0441\u0430, \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u0445. \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c Quantize-Aware, \u043d\u043e \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0435\u043c\u0443 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e. \u0421\u0430\u043c\u044b\u0439 \u043f\u043b\u043e\u0445\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u044e \u0441\u0435\u0442\u044c \u0437\u0430 \u0440\u0430\u0437. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430  \u043d\u0430 \u0432\u0441\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0410 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0435\u043d\u0437\u043e\u0440\u0435 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0441\u0442\u043e\u043b\u0431\u0446\u0430) \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430. \u0418\u0445 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0437\u0430\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u0447\u043d\u0435\u0435.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438: \u043f\u043e \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c, \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0442\u0435\u043d\u0437\u043e\u0440 \u043d\u0430 \u0431\u043b\u043e\u043a\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u2014 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u0442\u043e\u0447\u043d\u0435\u0435. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u0445, \u043e \u0447\u0451\u043c \u043c\u044b \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0413\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0447\u0435\u043c \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c.<\/p>\n<h3>\u041f\u043e \u043a\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0417\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c. \u041d\u043e \u0442\u0443\u0442 \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0444\u0438\u0437\u0438\u043a\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0436\u0451\u0441\u0442\u043a\u0438\u0435 \u0440\u0430\u043c\u043a\u0438.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041f\u043e \u043a\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 GEMM-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u043e\u0436\u0438\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044f\u043c \u043c\u0430\u0442\u0440\u0438\u0446. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d\u0438 \u043d\u0435 \u0442\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0435\u0448\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0433\u0434\u0435  \u2014 \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <code>scale<\/code>.<\/p>\n<h2>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>\u0412 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><strong>Quantized type<\/strong> \u2014 \u0432 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0442\u0435\u043d\u0437\u043e\u0440\u044b;<\/p>\n<\/li>\n<li>\n<p><strong>Computation type<\/strong> \u2014 \u0432 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0438 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u0448\u0435 \u0436\u0435\u043b\u0435\u0437\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0445\u0438\u0442\u0440\u043e\u043c quantized type. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0435\u0440\u043d\u0435\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446 \u043f\u043e\u0434 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 computation type. \u0422\u0430\u043a\u0436\u0435 computation type \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0432 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u0438\u043f\u0430.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>Int16\/Int8\/Int4<\/h3>\n<p>\u0421\u0430\u043c\u044b\u0435 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2014 .<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Int16 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0438 15 \u0431\u0438\u0442 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0438\u0442\u043e\u0432, \u0442\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<h3>Float32<\/h3>\n<p>\u0412\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f float32 \u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c <a href=\"https:\/\/ieeexplore.ieee.org\/document\/4610935\">IEEE-754<\/a>. \u0417\u0434\u0435\u0441\u044c \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: 1 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430, 8 \u2014 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, 23 \u2014 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0430:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432: \u0447\u0435\u043c<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371074","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371074","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=371074"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371074\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}