{"id":369751,"date":"2024-05-21T04:10:32","date_gmt":"2024-05-21T04:10:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369751"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369751","title":{"rendered":"<span>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0435\u043b: \u041b\u0438\u043d\u0435\u0439\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 ruRoPEBert \u0438 \u043a\u0430\u043a \u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/677\/b58\/dd6\/677b58dd6a4df23bfa3a71768dd1af12.png\" alt=\"\u0423\u0434\u043b\u0438\u043d\u044f\u0435\u043c \u0438 \u043a\u0440\u0443\u0442\u0438\u043c - RoPEBert\" title=\"\u0423\u0434\u043b\u0438\u043d\u044f\u0435\u043c \u0438 \u043a\u0440\u0443\u0442\u0438\u043c - RoPEBert\" width=\"3840\" height=\"2160\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/677\/b58\/dd6\/677b58dd6a4df23bfa3a71768dd1af12.png\"\/><\/p>\n<div><figcaption>\u0423\u0434\u043b\u0438\u043d\u044f\u0435\u043c \u0438 \u043a\u0440\u0443\u0442\u0438\u043c &#8212; RoPEBert<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c NLP \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 DL \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0430\u0441 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e, \u0438\u043c\u0435\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 A100, \u043e\u043a\u043e\u043b\u043e 30 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432. \u0410 \u0435\u0449\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u0434\u043e\u0431\u044c\u0451\u043c\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0435 encodechka.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043d\u0430 HuggingFace ?:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\"><strong>\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>Classic BERTs<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Sentence BERTs<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\">512+<\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-classic-base-512\">Tochka-AI\/ruRoPEBert-classic-base-512<\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-e5-base-512\">Tochka-AI\/ruRoPEBert-e5-base-512<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\">2048+<\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-classic-base-2k\">Tochka-AI\/ruRoPEBert-classic-base-2k<\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-e5-base-2k\">Tochka-AI\/ruRoPEBert-e5-base-2k<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0438 \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u043b\u0438\u0441\u044c \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0430\u044f\u0441\u044f LLM \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432 8k \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0434\u0430\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c causal \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0442. \u0435. \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u0432. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 SOTA \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430\u0445 \u0437\u0430\u0441\u0442\u044b\u043b\u043e \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435<a href=\"https:\/\/arxiv.org\/abs\/2111.09543\"> <u>DeBERTa<\/u><\/a>, \u0441 \u0435\u0451<a href=\"https:\/\/paperswithcode.com\/method\/disentangled-attention-mechanism\"> <u>disentangled attention<\/u><\/a>.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0449\u0451 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 2021 \u0433\u043e\u0434\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c<a href=\"https:\/\/arxiv.org\/abs\/2104.09864\"> <u>RoFormer<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430<a href=\"https:\/\/paperswithcode.com\/method\/rope\"> <u>Rotary Position Embedding<\/u><\/a>, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 LLM (Mistral, Llama, GPT-NeoX \u0438 \u0442\u0434). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, RoFormer \u043d\u0435 \u0431\u044b\u043b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432 512 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f<a href=\"https:\/\/huggingface.co\/cointegrated\/rubert-tiny2\"> <u>cointegrated\/rubert-tiny2<\/u><\/a> \u043e\u0442 \u0414\u044d\u0432\u0438\u0434\u0430 \u0414\u0430\u043b\u0435 \u0438<a href=\"https:\/\/huggingface.co\/kazzand\/ru-longformer-tiny-16384\"> <u>kazzand\/ru-longformer-tiny-16384<\/u><\/a> \u043e\u0442 MTS. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0446\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u0442\u0430\u043b\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 RoPE, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a \u0431\u043e\u043d\u0443\u0441 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/14c\/8c4\/a92\/14c8c4a92695fda8c7ca77b7b9b2d800.png\" alt=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0430\u0445. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\" title=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0430\u0445. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\" width=\"1604\" height=\"1215\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/14c\/8c4\/a92\/14c8c4a92695fda8c7ca77b7b9b2d800.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0430\u0445.<a href=\"https:\/\/arxiv.org\/abs\/2312.17044\"> <u>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0432\u044b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 RoPE? \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c nn.Embedding \u0441\u043b\u043e\u0439, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u0434\u0430\u043b\u0435\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SelfAttention \u0431\u043b\u043e\u043a \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b position_ids \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u0438 \u0442\u0430\u043c \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f RoPE \u043a query \u0438 key \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c, \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043e\u043d \u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u0441\u043b\u043e\u043c\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u043c\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 RoBERT\u044b \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0447\u0438\u0442\u044c MLM \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0433\u043e\u043b\u043e\u0432\u0443.<\/p>\n<p>\u041d\u043e \u0442\u0430\u043a\u0436\u0435, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u0438\u0441\u0442\u0438\u043b\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c-\u0443\u0447\u0438\u0442\u0435\u043b\u044c, \u0432 \u043d\u0430\u0448\u0435\u0433\u043e RoPE-\u0443\u0447\u0435\u043d\u0438\u043a\u0430. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u043c\u0435\u0441\u0442\u043d\u0435\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <strong>\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a MLM-\u043b\u043e\u0441\u0441\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0441\u0442\u0438\u043b\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043b\u043e\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443, \u043b\u044e\u0431\u044b\u043c, \u043a\u0440\u043e\u043c\u0435 KL-\u0434\u0438\u0432\u0435\u0440\u0433\u0435\u043d\u0446\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a MLM-\u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043a\u043b\u0430\u0434\u0451\u0442 \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0447\u0438\u0442\u0435\u043b\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u042f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 2 \u043b\u043e\u0441\u0441\u0430, \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: Cosine Similarity \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u044b\u0439 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u0438 InfoNCE, \u0432 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 CLIP \u0434\u043b\u044f \u0441\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u0412 \u043e\u0431\u043e\u0438\u0445 \u043b\u043e\u0441\u0441\u0430\u0445 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0438 \u0441\u0432\u043e\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/075\/f64\/6e8\/075f646e84eb4db041e11ab8dbea3470.png\" alt=\"\u041e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ruRoPEBert. \u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043b\u043e\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\" title=\"\u041e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ruRoPEBert. \u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043b\u043e\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\" width=\"6780\" height=\"3840\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/075\/f64\/6e8\/075f646e84eb4db041e11ab8dbea3470.png\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ruRoPEBert. \u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043b\u043e\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/figcaption><\/div>\n<\/figure>\n<h4>\u0414\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0432\u0437\u044f\u043b ~32 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430 \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 10 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0444\u043e\u043b\u0434\u043e\u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<a href=\"https:\/\/huggingface.co\/papers\/2309.09400\"> <u>CulturaX<\/u><\/a>. \u0412 \u0441\u0435\u043c\u043f\u043b\u0430\u0445 \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e 5 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432. \u0414\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0445\u043e\u0440\u043e\u0448 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d, \u0432 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u0435\u043c\u043f\u043b\u0430\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0410 \u0435\u0449\u0451 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d, \u0442\u0443\u0442 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c \u0434\u043e 16\u043a.<\/p>\n<h4>ruRoPEBert-classic-base<\/h4>\n<p>\u042d\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c ai-forever\/ruBert-base. \u0414\u043b\u044f \u0435\u0451 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0439 cosine similarity \u043b\u043e\u0441\u0441 \u0441 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 0.5 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0438 \u0443\u0447\u0438\u0442\u0435\u043b\u044f.<\/p>\n<h4>ruRoPEBert-e5-base<\/h4>\n<p>\u042d\u0442\u0430 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c<a href=\"https:\/\/huggingface.co\/hivaze\/ru-e5-base\"> <u>hivaze\/ru-e5-base<\/u><\/a>, \u0430 \u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0440\u0443\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439<a href=\"https:\/\/huggingface.co\/intfloat\/multilingual-e5-base\"> <u>intfloat\/multilingual-e5-base<\/u><\/a>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u043f\u043e<a href=\"https:\/\/medium.com\/m\/global-identity-2?redirectUrl=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-adapt-a-multilingual-t5-model-for-a-single-language-b9f94f3d9c90\"> <u>\u043c\u0435\u0442\u043e\u0434\u0443 \u0414\u044d\u0432\u0438\u0434\u0430 \u0414\u0430\u043b\u0435<\/u><\/a>, \u0441\u043d\u0438\u0436\u0430\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0441 250k \u0434\u043e 69k, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u043b\u043e \u0435\u0451 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0443. \u041a\u0441\u0442\u0430\u0442\u0438, \u043c\u043e\u0434\u0435\u043b\u044c, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043d\u0430\u00a0\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043d\u043e\u00a0\u043e\u043d \u043d\u0435\u00a0\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432, e5 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0441 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c<a href=\"https:\/\/paperswithcode.com\/method\/infonce\"> <u>InfoNCE<\/u><\/a> \u043b\u043e\u0441\u0441\u043e\u043c (\u043a\u0430\u043a \u0432 CLIP) \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 0.1. \u0412\u044b\u0431\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043b\u043e\u0441\u0441\u0430 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c. \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e\u0442 \u0436\u0435 \u043b\u043e\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 e5.<\/p>\n<h3>\u041c\u0435\u0442\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/h3>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 RoPE, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438\/\u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/arxiv.org\/abs\/2310.05209\"><u>Scaling Laws of RoPE-based Extrapolation<\/u><\/a> \u0438\u043b\u0438 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/780116\/\"><u>\u041e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Transformer<\/u><\/a>, \u0430 \u0435\u0449\u0451 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e<a href=\"https:\/\/arxiv.org\/abs\/2104.09864\"> <u>Roformer<\/u><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043b\u0438\u043d\u0430\u0445 \u0434\u043e 512 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u041d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u043b\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u2014 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 MLM \u043b\u043e\u0441\u0441\u043e\u043c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u0441 \u0434\u043b\u0438\u043d\u0430\u043c\u0438 512-2048 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0442\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0438\u043b\u0438 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438 RoPE \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0442\u0430\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443, \u043a\u0430\u043a \u043d\u0430 512 \u0442\u043e\u043a\u0435\u043d\u0430\u0445, \u0435\u0449\u0451 \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 ~200\u043a \u0441\u0435\u043c\u043f\u043b\u0430\u0445. \u0422\u0435\u0445\u043d\u0438\u043a\u0438, \u0433\u0434\u0435 \u043c\u044b \u043a\u0430\u043a-\u0442\u043e \u0432\u043b\u0438\u044f\u0435\u043c \u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442, \u043d\u043e \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 4\u043a \u0434\u043e 16\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0422\u0443\u0442 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c: \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0435\u0437 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043b\u043e\u0441\u0441\u0430, \u0442\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e? \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e attention \u0431\u043b\u043e\u043a\u0438, \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 MLP \u0431\u043b\u043e\u043a. RoPE \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e query \u0438 key, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c, MLP \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043f\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c, \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0442\u0440\u044e\u043a\u0438 \u0441\u043e \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u043e\u043c RoPE. \u041d\u043e \u0432\u043e\u0442 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u043c, \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043c\u0435\u0442\u043e\u0434<a href=\"https:\/\/github.com\/NormXU\/Consistent-DynamicNTKRoPE\"> <u>Dynamic-NTK<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0431\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e, \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0447\u0435\u043c 2k \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0435\u0440\u044f\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fdb\/9d7\/fe1\/fdb9d7fe15966b9eeb91b951bf2afb20.png\" alt=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 Llama\" title=\"\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 Llama\" width=\"662\" height=\"410\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fdb\/9d7\/fe1\/fdb9d7fe15966b9eeb91b951bf2afb20.png\"\/><\/p>\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 Llama<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u0446\u0435\u043d\u043a\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 <strong>ruRoPEBert-e5-base-2k<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 512-2048 \u0442\u043e\u043a\u0435\u043d\u0430\u0445, \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043b\u0438\u043d\u0430\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441 Dynamic-NTK \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u043e\u043c \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\"><strong>orig 0-512<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>512-2k<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-3k (no scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-3k (with scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-4k (no scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-4k (with scale)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">mlm_loss<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.2157<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.2788<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.217<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1488<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.6534<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.5895<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">mlm_accuracy<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.7476<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.7358<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.6166<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.6253<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5633<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5746<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0435\u043b\u0430 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u0435\u0442, \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0442\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0449\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0432\u0440\u043e\u0434\u0435 xPos \u0438\u043b\u0438 Alibi, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/arxiv.org\/abs\/2212.10554\"><u>A Length-Extrapolatable Transformer<\/u><\/a>.<\/p>\n<h3>\u0417\u0430\u043c\u0435\u043d\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0443\u0447\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (<em>eager<\/em>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c \u043f\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043b\u0430\u0431\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441 \u0440\u0443\u0447\u043d\u043e\u0433\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u0437<a href=\"https:\/\/github.com\/facebookresearch\/xformers\"> <u>xformers<\/u><\/a> \u0438\u043b\u0438<a href=\"https:\/\/habr.com\/ru\/articles\/669506\/\"> <u>FlashAttention v1\/v2<\/u><\/a> \u0438 \u0442\u0434. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0435\u0442 PyTorch \u2014 <code>torch.nn.functional.scaled_dot_product_attention<\/code> (<em>sdpa<\/em>). \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 3 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0442\u0442\u0435\u043d\u0448\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u043d\u0438\u044e. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:<a href=\"https:\/\/github.com\/facebookresearch\/xformers\"> <u>Memory-Efficient Attention<\/u><\/a>, FlashAttention, Fused C++ \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043e\u0442 PyTorch.<\/p>\n<p>\u0412 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0435<a href=\"https:\/\/github.com\/pytorch\/pytorch\/releases\"> <u>2.2.0<\/u><\/a> \u0430\u0432\u0442\u043e\u0440\u044b PyTorch \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 FlashAttention \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e Flash \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0435.<\/p>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<a href=\"https:\/\/pytorch.org\/tutorials\/recipes\/recipes\/profiler_recipe.html\"> <u>Pytorch Profiler<\/u><\/a> 12-\u0442\u0438 \u0441\u043b\u043e\u0439\u043d\u043e\u0433\u043e ruRoPEBert \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 base. \u0417\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u0447\u043d\u043e\u0439 RTX 3070 Ti \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c Intel Core i7 12700H. \u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 = 1.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Attention type<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Torch version<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Context length<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>CPU-bound time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>CUDA-bound time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Total run time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Self CUDA Mem<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">512<\/p>\n<\/td>\n<td>\n<p align=\"left\">18.774ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">8.613ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">27.387ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-674.01 Mb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">512<\/p>\n<\/td>\n<td>\n<p align=\"left\">15.920ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">7.411ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">23.331ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-298.31 Mb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">20.388ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.924ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">78.312ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-7.39 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">19.234ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">38.830ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">58.064ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-1.19 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.2.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">15.270ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.735ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">73.005ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-7.53 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.2.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">13.500ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">32.869ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">46.369ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-1.18 Gb<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 <em>sdpa<\/em> \u0432\u044b\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <em>eager<\/em>, \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u041f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432 2-3 \u0440\u0430\u0437\u0430 \u0438 \u043a\u0440\u0430\u0442\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">model_name = 'Tochka-AI\/ruRoPEBert-e5-base-2k' model = AutoModel.from_pretrained(model_name,                                   trust_remote_code=True,                                   attn_implementation='sdpa') # \u0438\u043b\u0438 'eager'<\/code><\/pre>\n<h3>\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c<\/h3>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d<a href=\"https:\/\/github.com\/avidale\/encodechka\"> <u>encodechka \u043e\u0442 \u0414\u044d\u0432\u0438\u0434\u0430 \u0414\u0430\u043b\u0435<\/u><\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u044b\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u043c\u0430\u043b\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u043d \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h4>ruRoPEBert-e5-base \u0438 \u043b\u0443\u0447\u0448\u0438\u0435 sentence-\u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\"><strong>Model name<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\"><strong>STS<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>PI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\"><strong>NLI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>SA<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>TI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>IA<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>IC<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>ICX<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\"><strong>NE1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>NE2<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\"><strong>Avg S (no NE)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\"><strong>Avg S+W (with NE)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">intfloat\/multilingual-e5-large<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.86<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.73<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.47<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.81<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.98<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.8<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.82<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.77<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.24<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.37<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\"><strong>0.78<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.686<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\"><strong>ruRoPEBert-e5-base-512<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.793<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.704<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.457<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.803<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.970<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.788<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.802<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.749<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.328<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.396<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.758<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.679<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\"><strong>ruRoPEBert-e5-base-2k<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.787<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.708<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.460<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.804<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.970<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.792<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.803<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.749<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.402<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.423<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.759<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\"><strong>0.689<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">intfloat\/multilingual-e5-base<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.834<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.704<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.458<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.795<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.964<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.782<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.803<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.740<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.234<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.373<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.76<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.668<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">text-embedding-ada-002<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.78<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.66<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.44<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.77<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.96<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.77<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.75<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.73<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.734<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">cointegrated\/rubert-tiny2<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.75<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.65<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.42<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.74<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.94<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.75<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.76<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.64<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.36<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.39<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.704<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.638<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">sberbank-ai\/sbert_large_mt_nlu_ru<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.78<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.65<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.4<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.8<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.98<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.8<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.76<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.45<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.3<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.34<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.703<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.626<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"150\" width=\"150\">\n<p align=\"left\">mts longformer<\/p>\n<\/td>\n<td data-colwidth=\"56\" width=\"56\">\n<p align=\"left\">0.760<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.647<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.416<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.739<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.938<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.749<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.755<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.626<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.396<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.387<\/p>\n<\/td>\n<td data-colwidth=\"72\" width=\"72\">\n<p align=\"left\">0.703<\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">0.641<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, <strong>ruRoPEBert-e5-base-2k<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u043b\u0443\u0447\u0448\u0435\u0439<\/strong> \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043d\u0430 \u0432\u0441\u0435\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0435 encodechka \u043f\u043e \u0441\u043a\u043e\u0440\u0443 S+W (sentence + word embeddings). \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0441\u0442\u0430\u0451\u0442 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 e5 \u043f\u043e STS, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043d\u0438\u0436\u0435, \u0447\u0435\u043c 0.1 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 ruRoPEBert \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b e5-base, \u0441 \u044d\u0442\u0438\u043c \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043e\u0431\u0449\u0435\u0435 \u043f\u0435\u0440\u0432\u0435\u043d\u0441\u0442\u0432\u043e. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0445\u043e\u0434\u044f\u0442 text-embedding-ada-002 \u043e\u0442 OpenAI.<\/p>\n<h4>ruRoPEBert-classic-base \u0438 \u043b\u0443\u0447\u0448\u0438\u0435 BERT-\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"147\" width=\"147\">\n<p align=\"left\"><strong>Model name<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\"><strong>STS<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>PI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\"><strong>NLI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>SA<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>TI<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\"><strong>IA<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>IC<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>ICX<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\"><strong>NE1<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\"><strong>NE2<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"left\"><strong>Avg S (no NE)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\"><strong>Avg S+W (with NE)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"147\" width=\"147\">\n<p align=\"left\"><strong>ruRoPEBert-classic-base-512<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.695<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.605<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.396<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.794<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.975<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.797<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.769<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.386<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.410<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.609<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"left\"><strong>0.677<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">0.630<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"147\" width=\"147\">\n<p align=\"left\"><strong>ruRoPEBert-classic-base-2k<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.684<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.601<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.396<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.777<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.974<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.794<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.769<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.381<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.609<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.470<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"left\">0.672<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\"><strong>0.631<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"147\" width=\"147\">\n<p align=\"left\">sberbank-ai\/ruRoberta-large<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.7<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.6<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.35<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.78<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.98<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.8<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.78<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.32<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.3<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.46<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"left\">0.666<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">0.609<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"147\" width=\"147\">\n<p align=\"left\">ai-forever\/ruBert-base<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.670<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.533<\/p>\n<\/td>\n<td data-colwidth=\"54\" width=\"54\">\n<p align=\"left\">0.391<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.773<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.975<\/p>\n<\/td>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">0.783<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">0.765<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">0.384<\/p>\n<\/td>\n<td data-colwidth=\"52\" width=\"52\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"53\" width=\"53\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"70\" width=\"70\">\n<p align=\"left\">0.659<\/p>\n<\/td>\n<td data-colwidth=\"83\" width=\"83\">\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f RoPEBert \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0442 \u0441\u0432\u043e\u0439 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b &#8212; ai-forever\/ruBert-base, \u0438 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u0443\u044e ai-forever\/ruRoberta-large. \u0421\u0443\u0434\u044f \u043f\u043e \u0441\u043a\u043e\u0440\u0430\u043c NE1 \u0438 NE2, classic \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u043e\u043c \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 NER \u0437\u0430\u0434\u0430\u0447, \u0447\u0435\u043c sentence \u043a\u043b\u043e\u043d\u044b e5.<\/p>\n<h3>\u0418\u0434\u0435\u0438 \u043f\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>\u041d\u0435 \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0435 STS \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f e5 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0431\u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u0435, \u0447\u0435\u043c \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>\u042d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 xPos,<a href=\"https:\/\/arxiv.org\/abs\/2108.12409\"> <u>Alibi<\/u><\/a> \u0438\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0439 <a href=\"https:\/\/arxiv.org\/abs\/2402.13753\">LongRoPE<\/a>, \u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043f\u0430\u0440\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0430\u0442\u0442\u0435\u043d\u0448\u0435\u043d\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/arxiv.org\/abs\/1911.02972\"><u>Blockwise Self-Attention for Long Document Understanding<\/u><\/a>, \u0435\u0449\u0451 \u043e\u0442 2019 \u0433\u043e\u0434\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 RoFormer \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c RoPE \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 Performer \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u043f\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0423\u0434\u0438\u0432\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 (\u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0433\u043e<a href=\"https:\/\/arxiv.org\/abs\/2001.04451\"> <u>Reformer<\/u><\/a> \u0434\u043e \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u0445<a href=\"https:\/\/arxiv.org\/abs\/2212.10544\"> <u>Biderectional SSM<\/u><\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430\u0445, \u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c \u2014 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0434\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e SOTA \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u0441\u0438\u043b\u0438\u0435 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0432 NLP \u0438 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0435\u0441\u0430 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0438\u0445 \u043a\u043e\u0434 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 <a href=\"https:\/\/huggingface.co\/Tochka-AI\"><u>\u043d\u0430\u0448\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435<\/u><\/a> \u043d\u0430 HuggingFace (\u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438). \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u044b \u043f\u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0443 large \u0432\u0435\u0440\u0441\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0434\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043e 8k \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/797561\/\"> https:\/\/habr.com\/ru\/articles\/797561\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u0434\u043b\u0438\u043d\u044f\u0435\u043c \u0438 \u043a\u0440\u0443\u0442\u0438\u043c &#8212; RoPEBert<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c NLP \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 DL \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0430\u0441 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e, \u0438\u043c\u0435\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 A100, \u043e\u043a\u043e\u043b\u043e 30 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432. \u0410 \u0435\u0449\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u0434\u043e\u0431\u044c\u0451\u043c\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0435 encodechka.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043d\u0430 HuggingFace ?:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\"><strong>\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>Classic BERTs<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Sentence BERTs<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\">512+<\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-classic-base-512\">Tochka-AI\/ruRoPEBert-classic-base-512<\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-e5-base-512\">Tochka-AI\/ruRoPEBert-e5-base-512<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"171\" width=\"171\">\n<p align=\"left\">2048+<\/p>\n<\/td>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-classic-base-2k\">Tochka-AI\/ruRoPEBert-classic-base-2k<\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/huggingface.co\/Tochka-AI\/ruRoPEBert-e5-base-2k\">Tochka-AI\/ruRoPEBert-e5-base-2k<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0438 \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u043b\u0438\u0441\u044c \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0430\u044f\u0441\u044f LLM \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432 8k \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0434\u0430\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c causal \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0442. \u0435. \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u0432. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 SOTA \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430\u0445 \u0437\u0430\u0441\u0442\u044b\u043b\u043e \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435<a href=\"https:\/\/arxiv.org\/abs\/2111.09543\"> <u>DeBERTa<\/u><\/a>, \u0441 \u0435\u0451<a href=\"https:\/\/paperswithcode.com\/method\/disentangled-attention-mechanism\"> <u>disentangled attention<\/u><\/a>.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0449\u0451 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 2021 \u0433\u043e\u0434\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c<a href=\"https:\/\/arxiv.org\/abs\/2104.09864\"> <u>RoFormer<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430<a href=\"https:\/\/paperswithcode.com\/method\/rope\"> <u>Rotary Position Embedding<\/u><\/a>, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 LLM (Mistral, Llama, GPT-NeoX \u0438 \u0442\u0434). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, RoFormer \u043d\u0435 \u0431\u044b\u043b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432 512 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f<a href=\"https:\/\/huggingface.co\/cointegrated\/rubert-tiny2\"> <u>cointegrated\/rubert-tiny2<\/u><\/a> \u043e\u0442 \u0414\u044d\u0432\u0438\u0434\u0430 \u0414\u0430\u043b\u0435 \u0438<a href=\"https:\/\/huggingface.co\/kazzand\/ru-longformer-tiny-16384\"> <u>kazzand\/ru-longformer-tiny-16384<\/u><\/a> \u043e\u0442 MTS. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0446\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u0442\u0430\u043b\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 RoPE, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a \u0431\u043e\u043d\u0443\u0441 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0430\u0445.<a href=\"https:\/\/arxiv.org\/abs\/2312.17044\"> <u>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0432\u044b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 RoPE? \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c nn.Embedding \u0441\u043b\u043e\u0439, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u0434\u0430\u043b\u0435\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c SelfAttention \u0431\u043b\u043e\u043a \u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b position_ids \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u0438 \u0442\u0430\u043c \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f RoPE \u043a query \u0438 key \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c, \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043e\u043d \u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u0441\u043b\u043e\u043c\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u043c\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 RoBERT\u044b \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0447\u0438\u0442\u044c MLM \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0433\u043e\u043b\u043e\u0432\u0443.<\/p>\n<p>\u041d\u043e \u0442\u0430\u043a\u0436\u0435, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u0438\u0441\u0442\u0438\u043b\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c-\u0443\u0447\u0438\u0442\u0435\u043b\u044c, \u0432 \u043d\u0430\u0448\u0435\u0433\u043e RoPE-\u0443\u0447\u0435\u043d\u0438\u043a\u0430. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u043c\u0435\u0441\u0442\u043d\u0435\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <strong>\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a MLM-\u043b\u043e\u0441\u0441\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0441\u0442\u0438\u043b\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043b\u043e\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443, \u043b\u044e\u0431\u044b\u043c, \u043a\u0440\u043e\u043c\u0435 KL-\u0434\u0438\u0432\u0435\u0440\u0433\u0435\u043d\u0446\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a MLM-\u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043a\u043b\u0430\u0434\u0451\u0442 \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0447\u0438\u0442\u0435\u043b\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u042f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 2 \u043b\u043e\u0441\u0441\u0430, \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: Cosine Similarity \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u044b\u0439 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u0438 InfoNCE, \u0432 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 CLIP \u0434\u043b\u044f \u0441\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u0412 \u043e\u0431\u043e\u0438\u0445 \u043b\u043e\u0441\u0441\u0430\u0445 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0438 \u0441\u0432\u043e\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ruRoPEBert. \u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043b\u043e\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/figcaption><\/div>\n<\/figure>\n<h4>\u0414\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0432\u0437\u044f\u043b ~32 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430 \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 10 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0444\u043e\u043b\u0434\u043e\u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<a href=\"https:\/\/huggingface.co\/papers\/2309.09400\"> <u>CulturaX<\/u><\/a>. \u0412 \u0441\u0435\u043c\u043f\u043b\u0430\u0445 \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e 5 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432. \u0414\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0445\u043e\u0440\u043e\u0448 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d, \u0432 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u0435\u043c\u043f\u043b\u0430\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0410 \u0435\u0449\u0451 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d, \u0442\u0443\u0442 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c \u0434\u043e 16\u043a.<\/p>\n<h4>ruRoPEBert-classic-base<\/h4>\n<p>\u042d\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c ai-forever\/ruBert-base. \u0414\u043b\u044f \u0435\u0451 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0439 cosine similarity \u043b\u043e\u0441\u0441 \u0441 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 0.5 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0438 \u0443\u0447\u0438\u0442\u0435\u043b\u044f.<\/p>\n<h4>ruRoPEBert-e5-base<\/h4>\n<p>\u042d\u0442\u0430 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c<a href=\"https:\/\/huggingface.co\/hivaze\/ru-e5-base\"> <u>hivaze\/ru-e5-base<\/u><\/a>, \u0430 \u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0440\u0443\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439<a href=\"https:\/\/huggingface.co\/intfloat\/multilingual-e5-base\"> <u>intfloat\/multilingual-e5-base<\/u><\/a>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u043f\u043e<a href=\"https:\/\/medium.com\/m\/global-identity-2?redirectUrl=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-adapt-a-multilingual-t5-model-for-a-single-language-b9f94f3d9c90\"> <u>\u043c\u0435\u0442\u043e\u0434\u0443 \u0414\u044d\u0432\u0438\u0434\u0430 \u0414\u0430\u043b\u0435<\/u><\/a>, \u0441\u043d\u0438\u0436\u0430\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0441 250k \u0434\u043e 69k, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u043b\u043e \u0435\u0451 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0443. \u041a\u0441\u0442\u0430\u0442\u0438, \u043c\u043e\u0434\u0435\u043b\u044c, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043d\u0430\u00a0\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043d\u043e\u00a0\u043e\u043d \u043d\u0435\u00a0\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432, e5 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0441 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u043c<a href=\"https:\/\/paperswithcode.com\/method\/infonce\"> <u>InfoNCE<\/u><\/a> \u043b\u043e\u0441\u0441\u043e\u043c (\u043a\u0430\u043a \u0432 CLIP) \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 0.1. \u0412\u044b\u0431\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043b\u043e\u0441\u0441\u0430 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0431\u043b\u0438\u0436\u0430\u0442\u044c \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c. \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e\u0442 \u0436\u0435 \u043b\u043e\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 e5.<\/p>\n<h3>\u041c\u0435\u0442\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/h3>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 RoPE, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438\/\u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/arxiv.org\/abs\/2310.05209\"><u>Scaling Laws of RoPE-based Extrapolation<\/u><\/a> \u0438\u043b\u0438 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/780116\/\"><u>\u041e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Transformer<\/u><\/a>, \u0430 \u0435\u0449\u0451 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e<a href=\"https:\/\/arxiv.org\/abs\/2104.09864\"> <u>Roformer<\/u><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043b\u0438\u043d\u0430\u0445 \u0434\u043e 512 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u041d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u043b\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u2014 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 MLM \u043b\u043e\u0441\u0441\u043e\u043c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u0441 \u0434\u043b\u0438\u043d\u0430\u043c\u0438 512-2048 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0442\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0438\u043b\u0438 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438 RoPE \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0442\u0430\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443, \u043a\u0430\u043a \u043d\u0430 512 \u0442\u043e\u043a\u0435\u043d\u0430\u0445, \u0435\u0449\u0451 \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 ~200\u043a \u0441\u0435\u043c\u043f\u043b\u0430\u0445. \u0422\u0435\u0445\u043d\u0438\u043a\u0438, \u0433\u0434\u0435 \u043c\u044b \u043a\u0430\u043a-\u0442\u043e \u0432\u043b\u0438\u044f\u0435\u043c \u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442, \u043d\u043e \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 4\u043a \u0434\u043e 16\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0422\u0443\u0442 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c: \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0435\u0437 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043b\u043e\u0441\u0441\u0430, \u0442\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e? \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e attention \u0431\u043b\u043e\u043a\u0438, \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 MLP \u0431\u043b\u043e\u043a. RoPE \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e query \u0438 key, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0442\u044c, MLP \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043f\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c, \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0442\u0440\u044e\u043a\u0438 \u0441\u043e \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u043e\u043c RoPE. \u041d\u043e \u0432\u043e\u0442 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u043c, \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043c\u0435\u0442\u043e\u0434<a href=\"https:\/\/github.com\/NormXU\/Consistent-DynamicNTKRoPE\"> <u>Dynamic-NTK<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0431\u0435\u0437 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e, \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0447\u0435\u043c 2k \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0435\u0440\u044f\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 Llama<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u0446\u0435\u043d\u043a\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 <strong>ruRoPEBert-e5-base-2k<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 512-2048 \u0442\u043e\u043a\u0435\u043d\u0430\u0445, \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043b\u0438\u043d\u0430\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441 Dynamic-NTK \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u043e\u043c \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\"><strong>orig 0-512<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>512-2k<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-3k (no scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-3k (with scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-4k (no scale)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>2k-4k (with scale)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">mlm_loss<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.2157<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.2788<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.217<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1488<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.6534<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.5895<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"120\" width=\"120\">\n<p align=\"left\">mlm_accuracy<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.7476<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.7358<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.6166<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.6253<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5633<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.5746<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0438\u0434\u0435\u043b\u0430 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u0435\u0442, \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0442\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0449\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0432\u0440\u043e\u0434\u0435 xPos \u0438\u043b\u0438 Alibi, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/arxiv.org\/abs\/2212.10554\"><u>A Length-Extrapolatable Transformer<\/u><\/a>.<\/p>\n<h3>\u0417\u0430\u043c\u0435\u043d\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0443\u0447\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (<em>eager<\/em>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c \u043f\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043b\u0430\u0431\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441 \u0440\u0443\u0447\u043d\u043e\u0433\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u0437<a href=\"https:\/\/github.com\/facebookresearch\/xformers\"> <u>xformers<\/u><\/a> \u0438\u043b\u0438<a href=\"https:\/\/habr.com\/ru\/articles\/669506\/\"> <u>FlashAttention v1\/v2<\/u><\/a> \u0438 \u0442\u0434. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0435\u0442 PyTorch \u2014 <code>torch.nn.functional.scaled_dot_product_attention<\/code> (<em>sdpa<\/em>). \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 3 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0442\u0442\u0435\u043d\u0448\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u043d\u0438\u044e. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:<a href=\"https:\/\/github.com\/facebookresearch\/xformers\"> <u>Memory-Efficient Attention<\/u><\/a>, FlashAttention, Fused C++ \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043e\u0442 PyTorch.<\/p>\n<p>\u0412 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0435<a href=\"https:\/\/github.com\/pytorch\/pytorch\/releases\"> <u>2.2.0<\/u><\/a> \u0430\u0432\u0442\u043e\u0440\u044b PyTorch \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 FlashAttention \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e Flash \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0435.<\/p>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<a href=\"https:\/\/pytorch.org\/tutorials\/recipes\/recipes\/profiler_recipe.html\"> <u>Pytorch Profiler<\/u><\/a> 12-\u0442\u0438 \u0441\u043b\u043e\u0439\u043d\u043e\u0433\u043e ruRoPEBert \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 base. \u0417\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u0447\u043d\u043e\u0439 RTX 3070 Ti \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c Intel Core i7 12700H. \u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 = 1.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Attention type<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Torch version<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Context length<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>CPU-bound time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>CUDA-bound time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Total run time<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Self CUDA Mem<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">512<\/p>\n<\/td>\n<td>\n<p align=\"left\">18.774ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">8.613ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">27.387ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-674.01 Mb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">512<\/p>\n<\/td>\n<td>\n<p align=\"left\">15.920ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">7.411ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">23.331ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-298.31 Mb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">20.388ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.924ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">78.312ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-7.39 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.1.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">19.234ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">38.830ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">58.064ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-1.19 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">eager<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.2.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">15.270ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.735ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">73.005ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-7.53 Gb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sdpa<\/p>\n<\/td>\n<td>\n<p align=\"left\">2.2.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">2048<\/p>\n<\/td>\n<td>\n<p align=\"left\">13.500ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">32.869ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">46.369ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">-1.18 Gb<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 <em>sdpa<\/em><\/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-369751","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369751","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=369751"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369751\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}