{"id":313009,"date":"2020-11-12T09:00:58","date_gmt":"2020-11-12T09:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313009"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313009","title":{"rendered":"\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0441 BERT \u0438 Tensorflow"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f_\/eg\/az\/f_egazf84vywnnnvgwfxangrgre.png\"><br \/>  <i>\u0420\u0438\u0441. 1. \u0424\u0440\u0430\u0437\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430<\/i><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (Natural Language Processing, NLP) \u2013 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0430\u0448\u0438\u043d, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u044f\u0437\u044b\u043a\u0438. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0430\u043a\u0438\u0445 \u043c\u0430\u0448\u0438\u043d \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0430\u044e\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <a href=\"https:\/\/sberdevices.ru\">SberDevices<\/a>.<\/p>\n<p>  \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 <a href=\"https:\/\/www.sber.ru\/salute\/\">\u0421\u0430\u043b\u044e\u0442<\/a> \u0442\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (NLU) \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 python3 \u0438 tensorflow 1.15. \u041d\u0438\u0436\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430. \u041a\u043e\u0434 \u0432\u0441\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/colab.research.google.com\/drive\/14ZjAX9e9Png3F-0ScVFj_61Apz9hQeaQ?usp=sharing\">Colab<\/a>. <\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0440\u0443\u0441\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c NLU \u043a\u043b\u0430\u0441\u0441\u0430 BERT-large [427 \u043c\u043b\u043d. \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432]: <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_tf.zip\">tensorflow<\/a>, <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_pytorch.zip\">pytorch<\/a>.<\/p>\n<p>  <b>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442, \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435<\/b>:<\/p>\n<ul>\n<li>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 NLU \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0435;<\/li>\n<li>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c;<\/li>\n<li>\u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 [NLU] \u043d\u0430 \u0431\u0430\u0437\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b BERT;<\/li>\n<li>\u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 NLU<\/li>\n<\/ul>\n<p>   <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041e NLU \u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445<\/h2>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. <br \/>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0435\u0433\u043e \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u2013 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab<a href=\"https:\/\/en.wikipedia.org\/wiki\/Word_embedding\">embedding<\/a>\u00bb, \u0438\u043c\u0435\u044f \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0441\u043c\u044b\u0441\u043b \u0441\u043b\u043e\u0432 \u043e\u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430).<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 NLU \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/papers.nips.cc\/paper\/2013\/file\/9aa42b31882ec039965f3c4923ce901b-Paper.pdf\">Word2Vec<\/a> \u00ab\u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438\u00bb \u0441\u043c\u044b\u0441\u043b \u0442\u0435\u043a\u0441\u0442\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. <a href=\"http:\/\/ai.stanford.edu\/blog\/contextual\/\">\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f<\/a> \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0430\u0431\u0437\u0430\u0446\u0435\u0432 \u0442\u0435\u043a\u0441\u0442\u0430.\u00a0<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a8\/_v\/2g\/a8_v2gtjyfiq4g4pt1llieotk_c.png\"><br \/>  <i>\u0420\u0438\u0441. 2. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 word2vec<\/i><\/p>\n<p>  \u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0440\u0430\u0437 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0437\u044b\u043a\u0430. \u041c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u044b, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u044b\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u0430\u0437\u0430\u043c\u0438 \u2013 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0435\u043c\u044b <a href=\"https:\/\/en.wikipedia.org\/wiki\/Instance-based_learning\">instance-based learning<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0442\u043e\u0434 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/K-nearest_neighbors_algorithm\">K-NN<\/a>.<\/p>\n<p>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u00ab\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u00bb: <a href=\"https:\/\/arxiv.org\/abs\/1810.04805\">BERT<\/a>, <a href=\"https:\/\/arxiv.org\/abs\/1907.11692\">RoBERTa<\/a>, <a href=\"https:\/\/arxiv.org\/abs\/2005.14165\">GPT-3<\/a>.<\/p>\n<p>  \u042d\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u0434\u0430\u0447 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0438\u0445 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438\u043b\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Natural-language_understanding\">NLU<\/a>.<\/p>\n<h2>\u041f\u043b\u0430\u043d \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/nlp.stanford.edu\/projects\/snli\/\">Stanford Natural Language Inference<\/a>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0430\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 (\u00abentailment\u00bb), \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0435 (\u00abcontradiction\u00bb) \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 (\u00abneutral\u00bb) \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 BERT \u043c\u044b \u0432\u044b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0430\u0449\u0438\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>  \u041f\u043b\u0430\u043d \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0430\u0442\u0447\u0435\u0439.<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c.<\/li>\n<li>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438.<\/li>\n<li>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b.<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>1. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f [<a href=\"https:\/\/nlp.stanford.edu\/projects\/snli\/\">SNLI<\/a>, <a href=\"https:\/\/cims.nyu.edu\/~sbowman\/multinli\/\">MNLI<\/a>] \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 [<a href=\"https:\/\/github.com\/brmson\/dataset-sts\">STS SICK<\/a>] \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c BERT. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0435 \u044d\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435:<\/p>\n<p>  <a href=\"https:\/\/gist.githubusercontent.com\/gaphex\/759cbe48c0a94262b39ff386c9aada2b\/raw\/9942947015719ac8e2c9cdb8240750410592bf25\/download_assets.sh\">https:\/\/gist.githubusercontent.com\/gaphex\/759cbe48c0a94262b39ff386c9aada2b\/raw\/9942947015719ac8e2c9cdb8240750410592bf25\/download_assets.sh<\/a><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 SNLI:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b7\/b3\/-l\/b7b3-l_kdlcaewcl4m9wmj_u-4k.png\"><br \/>  <i>\u0420\u0438\u0441. 3. \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 Stanford Natural Language Inference (<\/i><i><code>snli_1.0_train.jsonl<\/code><\/i><i>)<\/i><\/p>\n<p>  \u041b\u0435\u0433\u043a\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u00absentence1\u00bb \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u00absentence1\u00bb \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00ab\u044f\u043a\u043e\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438\u00bb (anchor), \u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u00absentence2\u00bb \u2013 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0442\u043a\u0438 \u00ablabel\u00bb.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044f\u043a\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0432\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438. \u0417\u0430\u043f\u0438\u0441\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u00abentailment\u00bb, \u043c\u044b \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c.<\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"plaintext\">{ anchor: [&quot;\u041d\u0435\u0442, \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0439.&quot;], \u00a0\u00a0contradiction: ['\u041e\u0442\u0432\u0435\u0442\u044c\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.'], \u00a0\u00a0entailment: [&quot;\u041d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435.&quot;, &quot;\u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435 \u043d\u0438 \u0441\u043b\u043e\u0432\u0430&quot;.], \u00a0\u00a0neutral: [&quot;\u0412\u044b\u0439\u0434\u0438\u0442\u0435 \u0438\u0437 \u043c\u0430\u0448\u0438\u043d\u044b.&quot;]} <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0432\u0441\u0435 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 SNLI \u0438 MNLI.<\/p>\n<h3>2. \u0411\u0430\u0442\u0447-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440<\/h3>\n<p>  \u0411\u0430\u0442\u0447-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u2013 \u044d\u0442\u043e \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u0430\u043a\u0435\u0442\u044b (\u0431\u0430\u0442\u0447\u0438) \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u2013 \u00ab\u0441\u0431\u043b\u0438\u0436\u0430\u0442\u044c\u00bb \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u00ab\u0440\u0430\u0437\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u00bb \u043d\u0435\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 (\u0441\u043c. \u0420\u0438\u0441. 3).<\/p>\n<p>  \u041e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u0430\u0445 (<strong>a, p, n<\/strong>) \u0433\u0434\u0435<\/p>\n<p>  <strong>a<\/strong> \u2014 \u044f\u043a\u043e\u0440\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u043f\u043e\u043b\u044f \u00abanchor\u00bb;<\/p>\n<p>  <strong>p<\/strong> \u2014 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u0438 \u0442\u0435\u0445 \u0447\u0442\u043e \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 \u00abentailment\u00bb;<\/p>\n<p>  <strong>n<\/strong> \u2014 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u00abcontradiction\u00bb \u0438 \u00abneutral\u00bb.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a_\/d_\/uu\/a_d_uuwvt6nyjuclvkuvxawuvpy.png\"><br \/>  <i>\u0420\u0438\u0441.4. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 NLU \u043d\u0430 \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u0430\u0445: \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b <\/i><i><strong>p<\/strong><\/i><i> \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u044e\u0442\u0441\u044f, \u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 <\/i><i><strong>n<\/strong><\/i><i> \u043e\u0442\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442 \u044f\u043a\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <\/i><i><strong>a <\/strong><\/i><i>\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/i><\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u041e\u0431\u0449\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0442\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<p>  <a href=\"https:\/\/gist.githubusercontent.com\/gaphex\/61522b6e35b786685c6252daa75ed2e1\/raw\/8ae537436c7fcd9a8b0e64e6cbe229a7ebf52e89\/data_generator.py\">https:\/\/gist.githubusercontent.com\/gaphex\/61522b6e35b786685c6252daa75ed2e1\/raw\/8ae537436c7fcd9a8b0e64e6cbe229a7ebf52e89\/data_generator.py<\/a>.<\/p>\n<h3>3. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c<\/h3>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u2013 \u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043c\u044b \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u00ab\u0441\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f\u00bb \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u0438\u0437 <strong>k<\/strong>-\u043f\u0430\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <strong>x<\/strong> \u0438 <strong>y<\/strong> \u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0443\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438<strong> y<\/strong> \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u043a\u043e\u0439 <strong>x<\/strong> \u0438\u043b\u0438 \u043d\u0435\u0442. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <strong>x<\/strong> \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 \u0435\u0441\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<strong> y<\/strong> \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c <strong>k-1<\/strong> \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. \u0422\u0430\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xl\/5p\/er\/xl5perm1isjyv5nxjj-vumsgl34.png\"><\/div>\n<p>  \u041d\u0443\u0436\u043d\u0430\u044f \u043d\u0430\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c <strong>P(y|x)<\/strong> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440 <strong>x,y<\/strong> \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445.<\/p>\n<p>  \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c <strong>P(x, y)<\/strong> \u2014 \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u043e\u0440\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 S:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/we\/-h\/ok\/we-hokpeqycpz6abjoduq4dzvny.png\"><\/div>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e (\u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e) \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c k-\u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0441\u0442\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u0435\u043c <strong>P(y|x)<\/strong>, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044f\u0441\u044c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0431\u0430\u0442\u0447\u0430:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g6\/2y\/wt\/g62ywt8ihpbp27ej4iya2khadfm.png\"><\/div>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 <strong>S<\/strong> \u0432 \u044d\u0442\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c <strong>S(x,y)<\/strong> = <strong>&lt;x, y&gt;<\/strong>.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f negative log likelihood-\u0431\u0430\u0442\u0447\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c <strong>K<\/strong> \u0437\u0430\u043f\u0438\u0448\u0435\u043c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oy\/gy\/6f\/oygy6f8awbfggyb3m4abnjg_yck.png\"><\/div>\n<p>  <strong>N.B.:<\/strong> \u042d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <strong>cross entropy loss<\/strong> \u0438\u043b\u0438 <strong>softmax-loss.<\/strong><\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (K) \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0435\u0435 \u0432\u044b\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u0430 <strong>(a):\u00a0<\/strong><\/p>\n<p>  <a href=\"https:\/\/gist.github.com\/gaphex\/c67145d84719d7539f40975718c1edb1#file-softmax_loss-py\">https:\/\/gist.github.com\/gaphex\/c67145d84719d7539f40975718c1edb1#file-softmax_loss-py<\/a><\/p>\n<h3>4. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>  \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Siamese_neural_network\">\u0441\u0438\u0430\u043c\u0441\u043a\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c<\/a> \u0441 \u0442\u0440\u0435\u043c\u044f \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u0430\u00a0 \u00abanchor \u2014 positive \u2014 negative\u00bb.\u00a0 \u041a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0432\u0445\u043e\u0434\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c BERT, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c NLU \u0432 \u044d\u0442\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435. \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 <a href=\"https:\/\/paperswithcode.com\/method\/wordpiece\">wordpiece-\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440<\/a> \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 BERT-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 (input_ids, input_mask, token_type_ids), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c\u0443 \u043e\u0431\u0443\u0447\u0430\u0435\u043c\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c BERT \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430. \u041a \u0432\u044b\u0445\u043e\u0434\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e encoder-\u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e masked-mean-pooling, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0442\u0440\u0438\u043f\u043b\u0435\u0442 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f softmax loss \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fj\/dm\/jo\/fjdmjocjzd3cwrc3xkcmtqulohm.png\"><\/div>\n<p>  <i>\u0420\u0438\u0441.5. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SBERT<\/i><\/p>\n<p>  <u>\u041a\u043e\u0434 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438:<\/u><\/p>\n<p>  <u><a href=\"https:\/\/gist.github.com\/gaphex\/75d56a6a70c310d906bc7998619e1b1d#file-bert_dssm-py\">gist.github.com\/gaphex\/75d56a6a70c310d906bc7998619e1b1d#file-bert_dssm-py<\/a><\/u><\/p>\n<h3>5. \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h3>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438 NLU \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439. \u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 NLU \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/github.com\/brmson\/dataset-sts\">STS 2012\u20132016 \u0438 SICK 2014<\/a>. \u0412\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/p2\/9o\/te\/p29otege809glt2mqddor3db1h4.png\"><\/div>\n<p>  <i>\u0420\u0438\u0441. 6. \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 STS2012 \u2014 \u0444\u0430\u0439\u043b <\/i><i><code>2012.MSRpar.test.tsv<\/code><\/i><\/p>\n<p>  \u041a\u0430\u043a \u0438 SNLI, \u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0430\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u0446\u0438\u0444\u0440\u0443\u0435\u043c \u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0432 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u0443\u044e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u043d\u0433\u043e\u0432\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u041f\u0438\u0440\u0441\u043e\u043d\u0430 \u0438 \u0421\u043f\u0438\u0440\u043c\u0435\u043d\u0430 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<p>  \u041a\u043e\u0434 Callback, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u044d\u0442\u0443 \u043b\u043e\u0433\u0438\u043a\u0443:\u00a0<\/p>\n<p>  <a href=\"https:\/\/gist.githubusercontent.com\/gaphex\/f2d2e1a9c849ba9d69a3014da705968f\/raw\/8ac26c3b236979625a906591dd594b9fd8640483\/pearsonr_callback.py\">gist.githubusercontent.com\/gaphex\/f2d2e1a9c849ba9d69a3014da705968f\/raw\/8ac26c3b236979625a906591dd594b9fd8640483\/pearsonr_callback.py<\/a><\/p>\n<h3>6. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e: \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u041e\u0431\u0441\u0443\u0434\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412 Colab \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 NVIDIA K80 (12\u0413\u0431). \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u0430\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (seq_len). \u0412 \u044d\u0442\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0435\u0435 24 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u0442\u0447\u0430 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e GPU.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 Adam \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Learning_rate\">learning rate<\/a>. \u041e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u043c \u0434\u043e \u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f, 10 \u044d\u043f\u043e\u0445 \u0434\u043e\u043b\u0436\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u0442\u044c.<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>batch size = 128 \u0434\u043b\u044f BERT-base;<\/li>\n<li>max_seq_len = 24;<\/li>\n<li>Optimizer Adam;\u00a0<\/li>\n<li>Learning rate ~1e-5;<\/li>\n<li>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 [spearmanr];<\/li>\n<li>\u041a\u043e\u043b-\u0432\u043e \u044d\u043f\u043e\u0445 ~10.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">trn_model.fit_generator(tr_gen._generator, validation_data=ts_gen._generator, steps_per_epoch=256, validation_steps=32, epochs=5, callbacks=callbacks) *** New best: STS_spearman_r = 0.5426 *** New best: STS_pearson_r = 0.5481 *** New best: SICK_spearman_r = 0.5799 *** New best: SICK_pearson_r = 0.6069 Epoch 1\/10 255\/256 [============================&gt;.] - ETA: 1s - loss: 0.6858 ... Epoch 10\/10 255\/256 [============================&gt;.] - ETA: 1s - loss: 0.2381 256\/256 [==============================] - 525s 2s\/step - loss: 0.2383 - val_loss: 0.2492 *** New best: STS-2012_spearman_r = 0.6115 *** New best: STS-2013_spearman_r = 0.8021 *** New best: STS-2014_spearman_r = 0.7292 *** New best: STS-2015_spearman_r = 0.8008 *** New best: STS-2016_spearman_r = 0.7776 *** New best: SICK_spearman_r = 0.792 <\/code><\/pre>\n<p>  <\/p>\n<h3>7. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u044f\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u0437 <a href=\"https:\/\/arxiv.org\/abs\/1908.10084\">\u0441\u0442\u0430\u0442\u044c\u0438 Sentence-BERT<\/a>, \u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u043e\u0446\u0435\u043d\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c NLU \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445 STS \u0438 SICK. \u041b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0441\u0435\u0442\u0435 SICK \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"https:\/\/arxiv.org\/abs\/1803.11175\">Universal Sentence Encoder (USE)<\/a> \u043e\u0442 Google. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0441\u043b\u0435 10 \u044d\u043f\u043e\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u044f <code>0.792<\/code>. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445 <code>STS-2013 \u0438 STS-2016 <\/code>\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0434\u0430\u0436\u0435 \u0441\u0440\u0435\u0434\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 large:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y3\/qn\/fy\/y3qnfyfwwutrv5pau13zpg3eieg.png\"><\/div>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 1: \u0420\u0430\u043d\u0433\u043e\u0432\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0421\u043f\u0438\u0440\u043c\u0435\u043d\u0430 \u03c1 \u00d7 100 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 Textual Similarity (STS). STS12-STS16: SemEval 2012-2016, STSb: STS-benchmark, SICK-R: SICK Relatedness dataset.<\/i><\/p>\n<p>  \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0438 \u0434\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447\u0430;<\/li>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c seq_len, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0434\u043b\u0438\u043d\u0435;<\/li>\n<li>\u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c NLU \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u043e\u0449\u043d\u0435\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 BERT-large;<\/li>\n<li>\u0440\u0430\u0437\u043c\u0435\u0442\u0438\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>????<\/li>\n<\/ul>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0438 \u0432\u0441\u0435\u0433\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 GPU \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 SOTA-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 2018 \u0433\u043e\u0434\u0430. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e NLU<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u0440\u0443\u0441\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c NLU. \u041e\u043d\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u0442\u043e\u0439, \u0447\u0442\u043e \u043c\u044b \u043e\u0431\u0443\u0447\u0430\u043b\u0438 \u0432\u044b\u0448\u0435 \u2013 \u044d\u0442\u043e BERT-large, \u0432 \u043d\u0435\u0439 24 \u0441\u043b\u043e\u044f \u0438 426.9 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432! \u0417\u0430 \u0441\u0447\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u044d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u043b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0443\u0436\u0435 \u0446\u0435\u043b\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 GPU \u043d\u0430 \u0431\u0430\u0437\u0435 DGX-2, \u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0431\u043e\u043b\u0435\u0435 16 \u043c\u043b\u0440\u0434. \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b.<\/p>\n<h3>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 NLP, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430\u0445 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0421\u0430\u043b\u044e\u0442, \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435.\u00a0<\/p>\n<p>  \u0414\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c (\u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0433\u043e\u0434\u0443, \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043a\u0430\u0437\u043a\u0443, \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0434\u0443 \u0438 \u0442. \u043f.). \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0432 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"https:\/\/projector.tensorflow.org\/?config=https:\/\/gist.githubusercontent.com\/gaphex\/d608746047fe9d5f0e3f31cc1d1a1e78\/raw\/4bcaa8d93b40d190a67a8b7ffbf99ada41c942e0\/intent_vis_config.json\">Tensorflow Projector<\/a>:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/of\/-u\/u1\/of-uu1geiyukc1wawncjozrcvtg.png\"><\/div>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043e\u0431\u0440\u0430\u0437\u0443\u044f \u0447\u0435\u0442\u043a\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b. \u041f\u043e\u0432\u0435\u0440\u0445 \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c KNN-\u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c supervised-\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<h3>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u0441\u0446\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 use case \u043c\u043e\u0434\u0435\u043b\u0435\u0439 NLU \u2013 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0434\u043b\u044f supervised-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430. \u0422\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0421\u0430\u043b\u044e\u0442\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u043a\u043e\u0440\u0431\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043b\u0438 \u0442\u043e\u043a\u0441\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 <a href=\"https:\/\/habr.com\/en\/users\/andriljo\/\" class=\"user_link\">Andriljo<\/a> \u0440\u0435\u0448\u0438\u043b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f Mail.ru \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 <a href=\"https:\/\/cups.mail.ru\/tasks\/1048\">\u0442\u043e\u043a\u0441\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432<\/a>:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mh\/qx\/b3\/mhqxb3umcq0dt3bay8xdubmj9yc.png\"><\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0445\u043e\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 0.96 \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.metrics.average_precision_score.html\">average_precission_score<\/a>, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 5 \u043c\u0435\u0441\u0442\u0443 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0437\u0430\u0447\u0435\u0442\u0435. \u0411\u0435\u0437 \u0430\u043d\u0441\u0430\u043c\u0431\u043b\u0435\u0439!<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>SBERT NLU \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e BertLayer;<\/li>\n<li>batch size = 128;<\/li>\n<li>max_seq_len = 64;<\/li>\n<li>N_tune_lrs = 12\u00f724;<\/li>\n<li>Optimizer Adam;\u00a0<\/li>\n<li>Learning rate ~5e-5;<\/li>\n<li>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 [avg F1micro, AvgPrecScore];<\/li>\n<li>\u041a\u043e\u043b-\u0432\u043e \u044d\u043f\u043e\u0445 ~3.<\/li>\n<\/ul>\n<p>  \u0421\u0445\u0435\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Multilayer_perceptron\">\u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0439 \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0440\u043e\u043d<\/a> \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0447\u0435\u0439 BERT: \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c mean pooling \u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c\u0443 encoder-\u0441\u043b\u043e\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u0435\u0440\u0445\u0443 \u0442\u0440\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u044f.<\/p>\n<p>  Model summary \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435:\u00a0<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l6\/xj\/az\/l6xjazlesnqn5-1bsj1hsefki5s.png\"><\/div>\n<p>  <\/p>\n<h3>\u0412\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/h3>\n<p>  \u0423\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0439\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 NLU. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0434\u043b\u044f <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_tf.zip\">tensorflow<\/a>, <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_pytorch.zip\">pytorch<\/a>, \u0438 <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_tf_module.zip\">tf-hub<\/a>.<\/p>\n<h2>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c\u00a0<\/h2>\n<p>  \u0417\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043f\u043e\u0441\u0442\u0430 \u0432\u044b\u0440\u0430\u0436\u0430\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0443 @<a href=\"https:\/\/m.habr.com\/ru\/users\/Andriljo\/\">Andriljo<\/a> \u0410\u0431\u0440\u0430\u043c\u043e\u0432\u0443 \u0438 \u041a\u0440\u0438\u0441\u0442\u0438\u043d\u0435 @<a href=\"https:\/\/habr.com\/users\/Christina29\/\">Christina29<\/a> \u041b\u0430\u0432\u0440\u0435\u043d\u044e\u043a.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/sberdevices\/blog\/527576\/\"> https:\/\/habr.com\/ru\/company\/sberdevices\/blog\/527576\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f_\/eg\/az\/f_egazf84vywnnnvgwfxangrgre.png\"><br \/>  <i>\u0420\u0438\u0441. 1. \u0424\u0440\u0430\u0437\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430<\/i><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (Natural Language Processing, NLP) \u2013 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0430\u0448\u0438\u043d, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u044f\u0437\u044b\u043a\u0438. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0430\u043a\u0438\u0445 \u043c\u0430\u0448\u0438\u043d \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0430\u044e\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <a href=\"https:\/\/sberdevices.ru\">SberDevices<\/a>.<\/p>\n<p>  \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 <a href=\"https:\/\/www.sber.ru\/salute\/\">\u0421\u0430\u043b\u044e\u0442<\/a> \u0442\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (NLU) \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 python3 \u0438 tensorflow 1.15. \u041d\u0438\u0436\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430. \u041a\u043e\u0434 \u0432\u0441\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/colab.research.google.com\/drive\/14ZjAX9e9Png3F-0ScVFj_61Apz9hQeaQ?usp=sharing\">Colab<\/a>. <\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0440\u0443\u0441\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c NLU \u043a\u043b\u0430\u0441\u0441\u0430 BERT-large [427 \u043c\u043b\u043d. \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432]: <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_tf.zip\">tensorflow<\/a>, <a href=\"https:\/\/storage.googleapis.com\/bert_resourses\/sbert_nlu\/sbert_cased_L-24_H-1024_A-16_pytorch.zip\">pytorch<\/a>.<\/p>\n<p>  <b>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442, \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435<\/b>:<\/p>\n<ul>\n<li>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 NLU \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u043a\u0435;<\/li>\n<li>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c;<\/li>\n<li>\u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 [NLU] \u043d\u0430 \u0431\u0430\u0437\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b BERT;<\/li>\n<li>\u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 NLU<\/li>\n<\/ul>\n<p>   <\/p>\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-313009","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313009","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=313009"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313009\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}