<?xml version="1.0" encoding="UTF-8"?>
<article article-type="research-article" dtd-version="1.3" xml:lang="ru" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://metafora.rcsi.science/xsd_files/journal3.xsd">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">moitvivt</journal-id>
      <journal-title-group>
        <journal-title xml:lang="ru">Моделирование, оптимизация и информационные технологии</journal-title>
        <trans-title-group xml:lang="en">
          <trans-title>Modeling, Optimization and Information Technology</trans-title>
        </trans-title-group>
      </journal-title-group>
      <issn pub-type="epub">2310-6018</issn>
      <publisher>
        <publisher-name>Издательство</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.26102/2310-6018/2026.55.4.005</article-id>
      <article-id pub-id-type="custom" custom-type="elpub">2082</article-id>
      <title-group>
        <article-title xml:lang="ru">Квантование языковых моделей без выбросов</article-title>
        <trans-title-group xml:lang="en">
          <trans-title>Quantization of outlier free quantizable language models</trans-title>
        </trans-title-group>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes">
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Хан</surname>
              <given-names>Самид Ахмед</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Khan</surname>
              <given-names>Sameed Ahmed</given-names>
            </name>
          </name-alternatives>
          <email>sameedkhandurrani@gmail.com</email>
          <xref ref-type="aff">aff-1</xref>
        </contrib>
        <contrib contrib-type="author">
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Кабир</surname>
              <given-names>А. С. М. Хумаюн</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Kabir</surname>
              <given-names>A. S. M. Humaun</given-names>
            </name>
          </name-alternatives>
          <email>humaun.kabir@phystech.edu</email>
          <xref ref-type="aff">aff-2</xref>
        </contrib>
        <contrib contrib-type="author">
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Лукманов</surname>
              <given-names>Рустам Абубакирович</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Lukmanov</surname>
              <given-names>Rustam Abubakirovich</given-names>
            </name>
          </name-alternatives>
          <email>r.lukmanov@innopolis.ru</email>
          <xref ref-type="aff">aff-3</xref>
        </contrib>
      </contrib-group>
      <aff-alternatives id="aff-1">
        <aff xml:lang="ru">Университет Иннополис</aff>
        <aff xml:lang="en">Innopolis University</aff>
      </aff-alternatives>
      <aff-alternatives id="aff-2">
        <aff xml:lang="ru">Московский физико-технический институт</aff>
        <aff xml:lang="en">Moscow Institute of Physics and Technology</aff>
      </aff-alternatives>
      <aff-alternatives id="aff-3">
        <aff xml:lang="ru">Университет Иннополис</aff>
        <aff xml:lang="en">Innopolis University</aff>
      </aff-alternatives>
      <pub-date pub-type="epub">
        <day>01</day>
        <month>01</month>
        <year>2026</year>
      </pub-date>
      <volume>1</volume>
      <issue>1</issue>
      <elocation-id>10.26102/2310-6018/2026.55.4.005</elocation-id>
      <permissions>
        <copyright-statement>Copyright © Авторы, 2026</copyright-statement>
        <copyright-year>2026</copyright-year>
        <license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/">
          <license-p>This work is licensed under a Creative Commons Attribution 4.0 International License</license-p>
        </license>
      </permissions>
      <self-uri xlink:href="https://moitvivt.ru/ru/journal/article?id=2082"/>
      <abstract xml:lang="ru">
        <p>По мере того, как модели глубокого обучения, включая большие языковые модели (LLM), становятся частью нашей повседневной жизни, они требуют все больших вычислительных ресурсов. Тяжелые модели нуждаются в значительной вычислительной мощности как для обучения, так и для выполнения выводов. Однако эту нагрузку можно снизить с помощью методов сжатия, таких как квантование. Стандартное квантование некоторых моделей трансформеров сопряжено с риском появления выбросов, что приводит к неточным результатам. В данном исследовании разрабатывается гибридная модель, которая включает использование усеченного софтмакса в модулях внимания модели во время обучения для смягчения влияния выбросов, а затем применение квантования только весов с учетом активаций на обученной модели. Это помогает снизить ошибку квантования за счет масштабирования весов перед квантованием. Показано, что предлагаемый подход позволяет лучше справляться с выбросами, о чем свидетельствует уменьшение куртоза у моделей с квантованием, обученных с усеченным софтмаксом, по сравнению с моделями, обученными стандартным способом. В целом, гибридная методика не только обеспечивает наилучшую итоговую производительность модели (наименьшую перплексию), но и эффективно подавляет выбросы в 5–7 раз по ключевым метрикам, делая модель значительно более устойчивой к процессу квантования.</p>
      </abstract>
      <trans-abstract xml:lang="en">
        <p>As deep learning models including the LLMs become a part of our daily lives, they continue to require more and more computational cost. The heavy models need a lot of processing power to train and even to make inferences. However, we can reduce this cost by compression techniques such as quantization. Standard quantization of some transformer models comes at the risk of presence of outliers that result in inaccurate results. In this study, we develop a hybrid model which involves using clipped softmax in attention heads of the model during training to mitigate outliers and then applying activations aware weights only quantization on trained model which helps in reducing quantization error by scaling the weights before quantization. We show that our approach results in better handling of outliers, hinted by reduced kurtosis in clipped softmax trained quantized models as compared to vanilla trained quantized models. Overall, our hybrid method not only achieves the best final model performance but does so by effectively suppressing outliers by a factor of 5–7x across key metrics, making the model far more robust to the quantization process.</p>
      </trans-abstract>
      <kwd-group xml:lang="ru">
        <kwd>квантование</kwd>
        <kwd>выброс</kwd>
        <kwd>перплексия</kwd>
        <kwd>внимание</kwd>
        <kwd>софтмакс</kwd>
        <kwd>куртозис</kwd>
      </kwd-group>
      <kwd-group xml:lang="en">
        <kwd>quantization</kwd>
        <kwd>outlier</kwd>
        <kwd>perplexity</kwd>
        <kwd>attention</kwd>
        <kwd>softmax</kwd>
        <kwd>kurtosis</kwd>
      </kwd-group>
      <funding-group>
        <funding-statement xml:lang="ru">Данная работа была поддержана Академией наук Республики Татарстан в рамках гранта № 254/2024-PD.</funding-statement>
        <funding-statement xml:lang="en">This work was supported by the Academy of Sciences of the Republic of Tatarstan under grant agreement No. 254/2024-PD.</funding-statement>
      </funding-group>
    </article-meta>
  </front>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="cit1">
        <label>1</label>
        <mixed-citation xml:lang="ru">Li P., Yang J., Islam M.A., Ren Sh. Making AI Less "Thirsty": Uncovering and Addressing the Secret Water Footprint of AI Models. arXiv. URL: https://arxiv.org/abs/2304.03271 [Accessed 18th August 2025].</mixed-citation>
      </ref>
      <ref id="cit2">
        <label>2</label>
        <mixed-citation xml:lang="ru">Gholami A., Kim S., Dong Zh., et al. A Survey of Quantization Methods for Efficient Neural Network Inference. arXiv. URL: https://arxiv.org/abs/2103.13630 [Accessed 18th August 2025].</mixed-citation>
      </ref>
      <ref id="cit3">
        <label>3</label>
        <mixed-citation xml:lang="ru">Dettmers T., Lewis M., Belkada Y., Zettlemoyer L. LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale. arXiv. URL: https://arxiv.org/abs/2208.07339 [Accessed 18th August 2025].</mixed-citation>
      </ref>
      <ref id="cit4">
        <label>4</label>
        <mixed-citation xml:lang="ru">Xiao G., Lin J., Seznec M., et al. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models. arXiv. URL: https://arxiv.org/abs/2211.10438 [Accessed 18th August 2025].</mixed-citation>
      </ref>
      <ref id="cit5">
        <label>5</label>
        <mixed-citation xml:lang="ru">Bondarenko Y., Nagel M., Blankevoort T. Quantizable Transformers: Removing Outliers by Helping Attention Heads Do Nothing. arXiv. URL: https://arxiv.org/abs/2306.12929 [Accessed 18th August 2025].</mixed-citation>
      </ref>
      <ref id="cit6">
        <label>6</label>
        <mixed-citation xml:lang="ru">Кхан С.А., Шулепина С., Шулепин Д., Лукманов Р.А. Обзор алгоритмических решений для развертывания нейронных сетей на легких устройствах. Компьютерные исследования и моделирование. 2024;16(7):1601–1619. (На англ.). https://doi.org/10.20537/2076-7633-2024-16-7-1601-1619</mixed-citation>
      </ref>
      <ref id="cit7">
        <label>7</label>
        <mixed-citation xml:lang="ru">Krishnamoorthi R. Quantizing Deep Convolutional Networks for Efficient Inference: A Whitepaper. arXiv. URL: https://arxiv.org/abs/1806.08342 [Accessed 24th August 2025].</mixed-citation>
      </ref>
      <ref id="cit8">
        <label>8</label>
        <mixed-citation xml:lang="ru">Dumitru R.-G., Yadav V., Maheshwary R., et al. Layer-wise Quantization: A Pragmatic and Effective Method for Quantizing LLMs Beyond Integer Bit-levels. arXiv. URL: https://arxiv.org/abs/2406.17415 [Accessed 24th August 2025].</mixed-citation>
      </ref>
      <ref id="cit9">
        <label>9</label>
        <mixed-citation xml:lang="ru">Dai S., Venkatesan R., Ren H., et al. VS-Quant: Per-Vector Scaled Quantization for Accurate Low-Precision Neural Network Inference. arXiv. URL: https://arxiv.org/abs/2102.04503 [Accessed 24th August 2025].</mixed-citation>
      </ref>
      <ref id="cit10">
        <label>10</label>
        <mixed-citation xml:lang="ru">Nagel M., van Baalen M., Blankevoort T., Welling M. Data-Free Quantization through Weight Equalization and Bias Correction. arXiv. URL: https://arxiv.org/abs/1906.04721 [Accessed 28th August 2025].</mixed-citation>
      </ref>
      <ref id="cit11">
        <label>11</label>
        <mixed-citation xml:lang="ru">Guo M., Dai Z., Vrandečić D., Al-Rfou R. Wiki-40B: Multilingual Language Model Dataset. In: Proceedings of the 12th Language Resources and Evaluation Conference, LREC 2020, 11–16 May 2020, Marseille, France. European Language Resources Association; 2020. P. 2440–2452.</mixed-citation>
      </ref>
      <ref id="cit12">
        <label>12</label>
        <mixed-citation xml:lang="ru">Zhu Y., Kiros R., Zemel R., et al. Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Books. In: Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), 07–13 December 2015, Santiago, Chile. IEEE; 2015. P. 19–27. https://doi.org/10.1109/ICCV.2015.11</mixed-citation>
      </ref>
      <ref id="cit13">
        <label>13</label>
        <mixed-citation xml:lang="ru">Lin J., Tang J., Tang H., et al. AWQ: Activation-Aware Weight Quantization for LLM Compression and Acceleration. arXiv. URL: https://arxiv.org/abs/2306.00978 [Accessed 24th August 2025].</mixed-citation>
      </ref>
      <ref id="cit14">
        <label>14</label>
        <mixed-citation xml:lang="ru">Devlin J., Chang M.-W., Lee K., Toutanova K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv. URL: http://arxiv.org/abs/1810.04805 [Accessed 24th August 2025].</mixed-citation>
      </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>