<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">ntv</journal-id><journal-title-group><journal-title xml:lang="ru">Научно-технический вестник информационных технологий, механики и оптики</journal-title><trans-title-group xml:lang="en"><trans-title>Scientific and Technical Journal of Information Technologies, Mechanics and Optics</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2226-1494</issn><issn pub-type="epub">2500-0373</issn><publisher><publisher-name>Университет ИТМО</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.17586/2226-1494-2025-25-4-737-743</article-id><article-id custom-type="elpub" pub-id-type="custom">ntv-499</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>КОМПЬЮТЕРНЫЕ СИСТЕМЫ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>COMPUTER SCIENCE</subject></subj-group></article-categories><title-group><article-title>Оптимизация моделей дистилляции знаний для языковых моделей</article-title><trans-title-group xml:lang="en"><trans-title>Optimizing knowledge distillation models for language models</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-6419-0072</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Татарникова</surname><given-names>Т. М.</given-names></name><name name-style="western" xml:lang="en"><surname>Tatarnikova</surname><given-names>T. M.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Татьяна Михайловна Татарникова, доктор технических наук, профессор, директор института</p><p>институт информационных технологий и программирования</p><p>190000; Санкт-Петербург</p><p>sc 36715607400</p></bio><bio xml:lang="en"><p>Tatiana M. Tatarnikova, D.Sc., Professor, Director of the Institute</p><p>Institute of Information Technologies and Programming</p><p>190000; Saint Petersburg</p><p>sc 36715607400</p></bio><email xlink:type="simple">Tm-tatarn@yandex.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0009-1399-8504</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Мокрецов</surname><given-names>Н. С.</given-names></name><name name-style="western" xml:lang="en"><surname>Mokretsov</surname><given-names>N. S.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Никита Сергеевич Мокрецов, аспирант</p><p>197022; Санкт-Петербург</p><p>sc 57821230900</p></bio><bio xml:lang="en"><p>Nikita S. Mokretsov, PhD Student</p><p>197022; Saint Petersburg</p><p>sc 57821230900</p></bio><email xlink:type="simple">mokrecovnikita6374@gmail.com</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Санкт-Петербургский государственный университет аэрокосмического приборостроения</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Saint Petersburg State University of Aerospace Instrumentation (SUAI)</institution><country>Russian Federation</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Санкт-Петербургский государственный электротехнический университет «ЛЭТИ» им. В.И. Ульянова (Ленина)</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Saint Petersburg Electrotechnical University “LETI”</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2025</year></pub-date><pub-date pub-type="epub"><day>29</day><month>08</month><year>2025</year></pub-date><volume>25</volume><issue>4</issue><fpage>737</fpage><lpage>743</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Татарникова Т.М., Мокрецов Н.С., 2025</copyright-statement><copyright-year>2025</copyright-year><copyright-holder xml:lang="ru">Татарникова Т.М., Мокрецов Н.С.</copyright-holder><copyright-holder xml:lang="en">Tatarnikova T.M., Mokretsov N.S.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://ntv.elpub.ru/jour/article/view/499">https://ntv.elpub.ru/jour/article/view/499</self-uri><abstract><sec><title>   Введение</title><p>   Введение. Обсуждается проблема оптимизации больших нейронных сетей на примере языковых моделей. Размеры больших языковых моделей являются препятствием для их практического применения в условиях ограниченных объемов вычислительных ресурсов и памяти. Одним из развиваемых направлений сжатия моделей больших нейронных сетей служит дистилляция знаний — передача знаний от большой модели учителя к меньшей модели ученика без существенной потери точности результата. Известные в настоящее время методы дистилляции знаний имеют определенные недостатки: неточная передача знаний, долгий процесс обучения, накапливание ошибки в длинных последовательностях.</p></sec><sec><title>   Метод</title><p>   Метод. Предлагаются методы, способствующие повышению качества дистилляции знаний применительно к языковым моделям: выборочное вмешательство учителя в процесс обучения ученика и низкоранговая адаптация. Первый подход основан на передаче токенов учителя при обучении ученика на слои нейронной сети, для которых достигается экспоненциально убывающий порог измерений расхождения между распределениями вероятностей учителя и ученика. Второй подход предлагает уменьшение количества параметров в нейронной сети путем замены полносвязных слоев на низкоранговые, что позволяет снизить риск переобучения и ускорить процесс обучения. Показаны ограничения каждого метода при работе с длинными последовательностями. Предложено комбинировать методы для получения усовершенствованной модели классической дистилляции знаний для длинных последовательностей.</p></sec><sec><title>   Основные результаты</title><p>   Основные результаты. Применение комбинированного подхода к дистилляции знаний на длинных последовательностях позволило значительно сжать результирующую модель с небольшой потерей качества, а также ощутимо снизить затрачиваемую память GPU и время вывода ответа.</p></sec><sec><title>   Обсуждение</title><p>   Обсуждение. Взаимодополняющие подходы к оптимизации процесса передачи знаний и сжатию моделей показали лучшие результаты, чем выборочное вмешательство учителя в процесс обучения ученика и низкоранговая адаптация по отдельности. Таким образом, качество ответов усовершенствованной модели классической дистилляции знаний на длинных последовательностях показало 97 % качества полной донастройки и 98 % качества метода низкоранговой адаптации по показателям ROGUE-L и Perplexity, при учете того, что количество обучаемых параметров снижается на 99 % по сравнению с полной донастройкой и на 49 % в сравнении с низкоранговой адаптацией. Кроме того, использование памяти GPU в сравнении с этими же методами уменьшается на 75 % и 30 % соответственно, а время вывода ответа на 30 %. Предложенная комбинация методов дистилляции знаний может найти применение в задачах с ограниченными вычислительными ресурсами.</p></sec></abstract><trans-abstract xml:lang="en"><p>   The problem of optimizing large neural networks is discussed using the example of language models. The size of large language models is an obstacle to their practical application in conditions of limited amounts of computing resources and memory. One of the areas of compression of large neural network models being developed is knowledge distillation, the transfer of knowledge from a large teacher model to a smaller student model without significant loss of result accuracy. Currently known methods of distilling knowledge have certain disadvantages: inaccurate knowledge transfer, long learning process, accumulation of errors in long sequences. The methods that contribute to improving the quality of knowledge distillation in relation to language models are proposed: selective teacher intervention in the student’s learning process and low-level adaptation. The first approach is based on the transfer of teacher tokens when teaching a student to neural network layers, for which an exponentially decreasing threshold of measuring the discrepancy between the probability distributions of the teacher and the student is reached. The second approach suggests reducing the number of parameters in a neural network by replacing fully connected layers with low-rank ones, which reduces the risk of overfitting and speeds up the learning process. The limitations of each method when working with long sequences are shown. It is proposed to combine methods to obtain an improved model of classical distillation of knowledge for long sequences. The use of a combined approach to distilling knowledge on long sequences made it possible to significantly compress the resulting model with a slight loss of quality as well as significantly reduce GPU memory consumption and response output time. Complementary approaches to optimizing the knowledge transfer process and model compression showed better results than selective teacher intervention in the student learning process and low-rank adaptation separately. Thus, the quality of answers of the improved classical knowledge distillation model on long sequences showed 97 % of the quality of full fine-tuning and 98 % of the quality of the low-rank adaptation method in terms of ROGUE-L and Perplexity, given that the number of trainable parameters is reduced by 99 % compared to full fine-tuning and by 49 % compared to low-rank adaptation. In addition, GPU memory usage is reduced by 75 % and 30 %, respectively, and inference time by 30 %. The proposed combination of knowledge distillation methods can find application in problems with limited computational resources.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>большие языковые модели</kwd><kwd>длинные последовательности</kwd><kwd>нейронные сети</kwd><kwd>дистилляция знаний</kwd><kwd>модель учителя</kwd><kwd>модель ученика</kwd><kwd>выборочное вмешательство в процесс обучения</kwd><kwd>низкоранговая адаптация</kwd></kwd-group><kwd-group xml:lang="en"><kwd>large language models</kwd><kwd>long sequences</kwd><kwd>neural networks</kwd><kwd>knowledge distillation</kwd><kwd>teacher model</kwd><kwd>student model</kwd><kwd>selective intervention in the learning process</kwd><kwd>low-rank adaptation</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Дудихин В.В., Кондрашов П.Е. Методология использования больших языковых моделей для решения задач государственного и муниципального управления по интеллектуальному реферированию и автоматическому формированию текстового контента // Государственное управление. Электронный вестник. 2024. № 105. C. 169–179. doi: 10.55959/MSU2070-1381-105-2024-169-179</mixed-citation><mixed-citation xml:lang="en">Dudikhin V.V., Kondrashov P.E. Methodology of using large language models to solve tasks of State and municipal government for intelligent abstracting and automatic generation of text content. E-journal Public Administration, 2024, no. 105, pp. 169–179. (in Russian). doi: 10.55959/MSU2070-1381-105-2024-169-179</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Кузнецов А.В. Цифровая история и искусственный интеллект: перспективы и риски применения больших языковых моделей // Новые информационные технологии в образовании и науке. 2022. № 5. С. 53–57. doi: 10.17853/2587-6910-2022-05-53-57</mixed-citation><mixed-citation xml:lang="en">Kuznetsov A.V. Digital history and artificial intelligence: perspectives and risks of pretrained language models. New Information Technologies in Education and Science, 2022, no. 5, pp. 53–57. (in Russian). doi: 10.17853/2587-6910-2022-05-53-57</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Мокрецов Н.С., Татарникова Т.М. Алгоритм оптимизации моделей нейронных сетей для обработки текста на естественном языке // Прикладной искусственный интеллект: перспективы и риски : Сборник докладов Международной научной конференции. 2024. C. 280–282.</mixed-citation><mixed-citation xml:lang="en">Mokretsov N.S., Tatarnikova T.M. Algorithm for optimizing neural network models for natural language text processing. Proc. of the Applied Artificial Intelligence: Prospects and Risks, 2024. pp. 280–282. (in Russian)</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Houlsby N., Giurgiu A., Jastrzebski S., Morrone B., Laroussilhe Q., Gesmundo A., Attariyan M., Gelly S. Parameter-efficient transfer learning for NLP // Proc. of the 36&lt;sup&gt;th&lt;/sup&gt; International Conference on Machine Learning. 2019. V. 97. P. 2790–2799.</mixed-citation><mixed-citation xml:lang="en">Houlsby N., Giurgiu A., Jastrzebski S., Morrone B., Laroussilhe Q., Gesmundo A., Attariyan M., Gelly S. Parameter-efficient transfer learning for NLP. Proc. of the 36&lt;sup&gt;th&lt;/sup&gt; International Conference on Machine Learning, 2019. vol. 97, pp. 2790–2799.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Liao B., Meng Y., Monz C. Parameter-efficient fine-tuning without introducing new latency // Proc. of the 61&lt;sup&gt;st&lt;/sup&gt; Annual Meeting of the Association for Computational Linguistics. 2023. V. 1. P. 4242–4260. doi: 10.18653/v1/2023.acl-long.233</mixed-citation><mixed-citation xml:lang="en">Liao B., Meng Y., Monz C. Parameter-efficient fine-tuning without introducing new latency. Proc. of the 61&lt;sup&gt;st&lt;/sup&gt; Annual Meeting of the Association for Computational Linguistics, 2023, vol. 1, pp. 4242–4260. doi: 10.18653/v1/2023.acl-long.233</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Lv K., Yang Y., Liu T., Guo Q., Qiu X. Full parameter fine-tuning for large language models with limited resources // Proc. of the 62&lt;sup&gt;nd&lt;/sup&gt; Annual Meeting of the Association for Computational Linguistics. 2024. V. 1. P. 8187–8198. doi: 10.18653/v1/2024.acllong.445</mixed-citation><mixed-citation xml:lang="en">Lv K., Yang Y., Liu T., Guo Q., Qiu X. Full parameter fine-tuning for large language models with limited resources. Proc. of the 62&lt;sup&gt;nd&lt;/sup&gt; Annual Meeting of the Association for Computational Linguistics, 2024, vol. 1, pp. 8187–8198. doi: 10.18653/v1/2024.acl-long.445</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Khurana A., Subramonyam H., Chilana P.K. Why and when LLM-based assistants can go wrong: investigating the effectiveness of prompt-based interactions for software help-seeking // Proc. of the 29&lt;sup&gt;th&lt;/sup&gt; International Conference on Intelligent User Interfaces. 2024. P. 288–303. doi: 10.1145/3640543.3645200</mixed-citation><mixed-citation xml:lang="en">Khurana A., Subramonyam H., Chilana P.K. Why and when LLM-based assistants can go wrong: investigating the effectiveness of prompt-based interactions for software help-seeking. Proc. of the 29&lt;sup&gt;th&lt;/sup&gt; International Conference on Intelligent User Interfaces, 2024, pp. 288–303. doi: 10.1145/3640543.3645200</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Мокрецов Н.С., Татарникова Т.М. Оптимизация процесса обучения при ограниченном объеме вычислительных ресурсов // Международная конференция по мягким вычислениям и измерениям. 2024. Т. 1. C. 205–208.</mixed-citation><mixed-citation xml:lang="en">Mokretsov N.S., Tatarnikova T.M. Optimizing the learning process with limited computational resources. Proc. of the International Conference on Soft Computing and Measurement, 2024, vol. 1, pp. 205–208. (in Russian)</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Ouyang L., Wu J., Jiang X., Almeida D., Wainwright C., Mishkin P., Zhang C., Agarwal S., Slama K., Ray A., et al. Training language models to follow instructions with human feedback // Advances in Neural Information Processing Systems. 2022. V. 35. P. 27730–27744.</mixed-citation><mixed-citation xml:lang="en">Ouyang L., Wu J., Jiang X., Almeida D., Wainwright C., Mishkin P., Zhang C., Agarwal S., Slama K., Ray A., et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 2022, vol. 35, pp. 27730–27744.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Borgeaud S., Mensch A., Hoffmann J., Cai T., Rutherford E., Millican K., et al. Improving language models by retrieving from trillions of tokens // Proc. of the 39&lt;sup&gt;th&lt;/sup&gt; International Conference on Machine Learning. 2022. P. 2206–2240.</mixed-citation><mixed-citation xml:lang="en">Borgeaud S., Mensch A., Hoffmann J., Cai T., Rutherford E., Millican K., et al. Improving language models by retrieving from trillions of tokens. Proc. of the 39&lt;sup&gt;th&lt;/sup&gt; International Conference on Machine Learning, 2022, pp. 2206–2240.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Белякова А.Ю., Беляков Ю.Д. Обзор задачи автоматической суммаризации текста // Инженерный вестник Дона. 2020. № 10 (70). C. 142–159.</mixed-citation><mixed-citation xml:lang="en">Belyakova A.Y., Belyakov Y.D. Overview of text summarization methods. Ingineering Journal of Don, 2020, no. 10 (70), pp. 142–159 (in Russian)</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Швыров В.В., Капустин Д.А., Кущенко А.В., Сентяй Р.Н. Дообучение больших языковых моделей с использованием техники LoRA для решения задач статического анализа программного кода // Вестник Луганского государственного университета имени Владимира Даля. 2023. № 12 (78). C. 210–215.</mixed-citation><mixed-citation xml:lang="en">Shvyrov V.V., Kapustin D.A., Kushchenko A.V., Sentyay R.N. Large language models fine-tuning with the LoRA technique to solve problems of static analysis of program code. Vestnik of the Lugansk Vladimir Dahl National University, 2023, no. 12 (78), pp. 210–215. (in Russian)</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Liu Z., Lin W., Shi Y., Zhao J. A robustly optimized BERT pre-training approach with post-training // Lecture Notes in Computer Science. 2021. V. 12869. P. 471–484. doi: 10.1007/978-3-030-84186-7_31</mixed-citation><mixed-citation xml:lang="en">Liu Z., Lin W., Shi Y., Zhao J. A robustly optimized BERT pre-training approach with post-training. Lecture Notes in Computer Science, 2021, vol. 12869, pp. 471–484. doi: 10.1007/978-3-030-84186-7_31</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Jiao X., Yin Y., Shang L., Jiang X., Chen X., Li L., Wang F., Liu Q. TinyBERT: distilling BERT for natural language understanding // Findings of the Association for Computational Linguistics: EMNLP. 2020. P. 4163–4174. doi: 10.18653/v1/2020.findingsemnlp.372</mixed-citation><mixed-citation xml:lang="en">Jiao X., Yin Y., Shang L., Jiang X., Chen X., Li L., Wang F., Liu Q. TinyBERT: distilling BERT for natural language understanding. Findings of the Association for Computational Linguistics: EMNLP, 2020, pp. 4163–4174. doi: 10.18653/v1/2020.findingsemnlp.372</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
