ChatPaper.aiChatPaper

HybridNorm : Vers un entraînement stable et efficace des Transformers via une normalisation hybride

HybridNorm: Towards Stable and Efficient Transformer Training via Hybrid Normalization

March 6, 2025
Auteurs: Zhijian Zhuo, Yutao Zeng, Ya Wang, Sijun Zhang, Jian Yang, Xiaoqing Li, Xun Zhou, Jinwen Ma
cs.AI

Résumé

Les Transformers sont devenus l'architecture de facto pour un large éventail de tâches en apprentissage automatique, en particulier dans les grands modèles de langage (LLMs). Malgré leurs performances remarquables, des défis subsistent dans l'entraînement des réseaux de Transformers profonds, notamment concernant la position de la normalisation de couche. Bien que les structures Pre-Norm facilitent un entraînement plus aisé grâce à leur chemin d'identité plus marqué, elles produisent souvent des performances sous-optimales par rapport au Post-Norm. Dans cet article, nous proposons HybridNorm, une stratégie de normalisation hybride simple mais efficace qui intègre les avantages des approches Pre-Norm et Post-Norm. Plus précisément, HybridNorm utilise la normalisation QKV au sein du mécanisme d'attention et le Post-Norm dans le réseau feed-forward (FFN) de chaque bloc Transformer. Cette conception stabilise non seulement l'entraînement mais améliore également les performances, en particulier dans le contexte des LLMs. Des expériences approfondies sur des architectures denses et éparses montrent qu'HybridNorm surpasse de manière constante les approches Pre-Norm et Post-Norm, atteignant des résultats de pointe sur divers benchmarks. Ces résultats mettent en lumière le potentiel d'HybridNorm en tant que technique plus stable et efficace pour améliorer l'entraînement et les performances des modèles de Transformers profonds. %Le code sera rendu public. Le code est disponible à l'adresse https://github.com/BryceZhuo/HybridNorm.
English
Transformers have become the de facto architecture for a wide range of machine learning tasks, particularly in large language models (LLMs). Despite their remarkable performance, challenges remain in training deep transformer networks, especially regarding the location of layer normalization. While Pre-Norm structures facilitate easier training due to their more prominent identity path, they often yield suboptimal performance compared to Post-Norm. In this paper, we propose HybridNorm, a straightforward yet effective hybrid normalization strategy that integrates the advantages of both Pre-Norm and Post-Norm approaches. Specifically, HybridNorm employs QKV normalization within the attention mechanism and Post-Norm in the feed-forward network (FFN) of each transformer block. This design not only stabilizes training but also enhances performance, particularly in the context of LLMs. Comprehensive experiments in both dense and sparse architectures show that HybridNorm consistently outperforms both Pre-Norm and Post-Norm approaches, achieving state-of-the-art results across various benchmarks. These findings highlight the potential of HybridNorm as a more stable and effective technique for improving the training and performance of deep transformer models. %Code will be made publicly available. Code is available at https://github.com/BryceZhuo/HybridNorm.

Summary

AI-Generated Summary

PDF208March 7, 2025