LogoLogo
Continuum WebsiteContinuum ApplicationsContinuum KnowledgeAxolotl Platform
Continuum Knowledge
Continuum Knowledge
  • Continuum
  • Data
    • Datasets
      • Pre Training Data
      • Types of Fine Tuning
      • Self Instruct Paper
      • Self-Alignment with Instruction Backtranslation
      • Systematic Evaluation of Instruction-Tuned Large Language Models on Open Datasets
      • Instruction Tuning
      • Instruction Fine Tuning - Alpagasus
      • Less is More For Alignment
      • Enhanced Supervised Fine Tuning
      • Visualising Data using t-SNE
      • UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
      • Training and Evaluation Datasets
      • What is perplexity?
  • MODELS
    • Foundation Models
      • The leaderboard
      • Foundation Models
      • LLama 2 - Analysis
      • Analysis of Llama 3
      • Llama 3.1 series
      • Google Gemini 1.5
      • Platypus: Quick, Cheap, and Powerful Refinement of LLMs
      • Mixtral of Experts
      • Mixture-of-Agents (MoA)
      • Phi 1.5
        • Refining the Art of AI Training: A Deep Dive into Phi 1.5's Innovative Approach
      • Phi 2.0
      • Phi-3 Technical Report
  • Training
    • The Fine Tuning Process
      • Why fine tune?
        • Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?
        • Explanations in Fine Tuning
      • Tokenization
        • Tokenization Is More Than Compression
        • Tokenization - SentencePiece
        • Tokenization explore
        • Tokenizer Choice For LLM Training: Negligible or Crucial?
        • Getting the most out of your tokenizer for pre-training and domain adaptation
        • TokenMonster
      • Parameter Efficient Fine Tuning
        • P-Tuning
          • The Power of Scale for Parameter-Efficient Prompt Tuning
        • Prefix-Tuning: Optimizing Continuous Prompts for Generation
        • Harnessing the Power of PEFT: A Smarter Approach to Fine-tuning Pre-trained Models
        • What is Low-Rank Adaptation (LoRA) - explained by the inventor
        • Low Rank Adaptation (Lora)
        • Practical Tips for Fine-tuning LMs Using LoRA (Low-Rank Adaptation)
        • QLORA: Efficient Finetuning of Quantized LLMs
        • Bits and Bytes
        • The Magic behind Qlora
        • Practical Guide to LoRA: Tips and Tricks for Effective Model Adaptation
        • The quantization constant
        • QLORA: Efficient Finetuning of Quantized Language Models
        • QLORA and Fine-Tuning of Quantized Language Models (LMs)
        • ReLoRA: High-Rank Training Through Low-Rank Updates
        • SLoRA: Federated Parameter Efficient Fine-Tuning of Language Models
        • GaLora: Memory-Efficient LLM Training by Gradient Low-Rank Projection
      • Hyperparameters
        • Batch Size
        • Padding Tokens
        • Mixed precision training
        • FP8 Formats for Deep Learning
        • Floating Point Numbers
        • Batch Size and Model loss
        • Batch Normalisation
        • Rethinking Learning Rate Tuning in the Era of Language Models
        • Sample Packing
        • Gradient accumulation
        • A process for choosing the learning rate
        • Learning Rate Scheduler
        • Checkpoints
        • A Survey on Efficient Training of Transformers
        • Sequence Length Warmup
        • Understanding Training vs. Evaluation Data Splits
        • Cross-entropy loss
        • Weight Decay
        • Optimiser
        • Caching
      • Training Processes
        • Extending the context window
        • PyTorch Fully Sharded Data Parallel (FSDP)
        • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
        • YaRN: Efficient Context Window Extension of Large Language Models
        • Sliding Window Attention
        • LongRoPE
        • Reinforcement Learning
        • An introduction to reinforcement learning
        • Reinforcement Learning from Human Feedback (RLHF)
        • Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • INFERENCE
    • Why is inference important?
      • Grouped Query Attention
      • Key Value Cache
      • Flash Attention
      • Flash Attention 2
      • StreamingLLM
      • Paged Attention and vLLM
      • TensorRT-LLM
      • Torchscript
      • NVIDIA L40S GPU
      • Triton Inference Server - Introduction
      • Triton Inference Server
      • FiDO: Fusion-in-Decoder optimised for stronger performance and faster inference
      • Is PUE a useful measure of data centre performance?
      • SLORA
  • KNOWLEDGE
    • Vector Databases
      • A Comprehensive Survey on Vector Databases
      • Vector database management systems: Fundamental concepts, use-cases, and current challenges
      • Using the Output Embedding to Improve Language Models
      • Decoding Sentence-BERT
      • ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT
      • SimCSE: Simple Contrastive Learning of Sentence Embeddings
      • Questions Are All You Need to Train a Dense Passage Retriever
      • Improving Text Embeddings with Large Language Models
      • Massive Text Embedding Benchmark
      • RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking
      • LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders
      • Embedding and Fine-Tuning in Neural Language Models
      • Embedding Model Construction
      • Demystifying Embedding Spaces using Large Language Models
      • Fine-Tuning Llama for Multi-Stage Text Retrieval
      • Large Language Model Based Text Augmentation Enhanced Personality Detection Model
      • One Embedder, Any Task: Instruction-Finetuned Text Embeddings
      • Vector Databases are not the only solution
      • Knowledge Graphs
        • Harnessing Knowledge Graphs to Elevate AI: A Technical Exploration
        • Unifying Large Language Models and Knowledge Graphs: A Roadmap
      • Approximate Nearest Neighbor (ANN)
      • High Dimensional Data
      • Principal Component Analysis (PCA)
      • Vector Similarity Search - HNSW
      • FAISS (Facebook AI Similarity Search)
      • Unsupervised Dense Retrievers
    • Retrieval Augmented Generation
      • Retrieval-Augmented Generation for Large Language Models: A Survey
      • Fine-Tuning or Retrieval?
      • Revolutionising Information Retrieval: The Power of RAG in Language Models
      • A Survey on Retrieval-Augmented Text Generation
      • REALM: Retrieval-Augmented Language Model Pre-Training
      • Retrieve Anything To Augment Large Language Models
      • Generate Rather Than Retrieve: Large Language Models Are Strong Context Generators
      • Active Retrieval Augmented Generation
      • DSPy: LM Assertions: Enhancing Language Model Pipelines with Computational Constraints
      • DSPy: Compiling Declarative Language Model Calls
      • DSPy: In-Context Learning for Extreme Multi-Label Classification
      • Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs
      • HYDE: Revolutionising Search with Hypothetical Document Embeddings
      • Enhancing Recommender Systems with Large Language Model Reasoning Graphs
      • Retrieval Augmented Generation (RAG) versus fine tuning
      • RAFT: Adapting Language Model to Domain Specific RAG
      • Summarisation Methods and RAG
      • Lessons Learned on LLM RAG Solutions
      • Stanford: Retrieval Augmented Language Models
      • Overview of RAG Approaches with Vector Databases
      • Mastering Chunking in Retrieval-Augmented Generation (RAG) Systems
    • Semantic Routing
    • Resource Description Framework (RDF)
  • AGENTS
    • What is agency?
      • Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselves
      • Types of Agents
      • The risk of AI agency
      • Understanding Personality in Large Language Models: A New Frontier in AI Psychology
      • AI Agents - Reasoning, Planning, and Tool Calling
      • Personality and Brand
      • Agent Interaction via APIs
      • Bridging Minds and Machines: The Legacy of Newell, Shaw, and Simon
      • A Survey on Language Model based Autonomous Agents
      • Large Language Models as Agents
      • AI Reasoning: A Deep Dive into Chain-of-Thought Prompting
      • Enhancing AI Reasoning with Self-Taught Reasoner (STaR)
      • Exploring the Frontier of AI: The "Tree of Thoughts" Framework
      • Toolformer: Revolutionising Language Models with API Integration - An Analysis
      • TaskMatrix.AI: Bridging Foundational AI Models with Specialised Systems for Enhanced Task Completion
      • Unleashing the Power of LLMs in API Integration: The Rise of Gorilla
      • Andrew Ng's presentation on AI agents
      • Making AI accessible with Andrej Karpathy and Stephanie Zhan
  • Regulation and Ethics
    • Regulation and Ethics
      • Privacy
      • Detecting AI Generated content
      • Navigating the IP Maze in AI: The Convergence of Blockchain, Web 3.0, and LLMs
      • Adverse Reactions to generative AI
      • Navigating the Ethical Minefield: The Challenge of Security in Large Language Models
      • Navigating the Uncharted Waters: The Risks of Autonomous AI in Military Decision-Making
  • DISRUPTION
    • Data Architecture
      • What is a data pipeline?
      • What is Reverse ETL?
      • Unstructured Data and Generatve AI
      • Resource Description Framework (RDF)
      • Integrating generative AI with the Semantic Web
    • Search
      • BM25 - Search Engine Ranking Function
      • BERT as a reranking engine
      • BERT and Google
      • Generative Engine Optimisation (GEO)
      • Billion-scale similarity search with GPUs
      • FOLLOWIR: Evaluating and Teaching Information Retrieval Models to Follow Instructions
      • Neural Collaborative Filtering
      • Federated Neural Collaborative Filtering
      • Latent Space versus Embedding Space
      • Improving Text Embeddings with Large Language Models
    • Recommendation Engines
      • On Interpretation and Measurement of Soft Attributes for Recommendation
      • A Survey on Large Language Models for Recommendation
      • Model driven recommendation systems
      • Recommender AI Agent: Integrating Large Language Models for Interactive Recommendations
      • Foundation Models for Recommender Systems
      • Exploring the Impact of Large Language Models on Recommender Systems: An Extensive Review
      • AI driven recommendations - harming autonomy?
    • Logging
      • A Taxonomy of Anomalies in Log Data
      • Deeplog
      • LogBERT: Log Anomaly Detection via BERT
      • Experience Report: Deep Learning-based System Log Analysis for Anomaly Detection
      • Log-based Anomaly Detection with Deep Learning: How Far Are We?
      • Deep Learning for Anomaly Detection in Log Data: A Survey
      • LogGPT
      • Adaptive Semantic Gate Networks (ASGNet) for log-based anomaly diagnosis
  • Infrastructure
    • The modern data centre
      • Enhancing Data Centre Efficiency: Strategies to Improve PUE
      • TCO of NVIDIA GPUs and falling barriers to entry
      • Maximising GPU Utilisation with Kubernetes and NVIDIA GPU Operator
      • Data Centres
      • Liquid Cooling
    • Servers and Chips
      • The NVIDIA H100 GPU
      • NVIDIA H100 NVL
      • Lambda Hyperplane 8-H100
      • NVIDIA DGX Servers
      • NVIDIA DGX-2
      • NVIDIA DGX H-100 System
      • NVLink Switch
      • Tensor Cores
      • NVIDIA Grace Hopper Superchip
      • NVIDIA Grace CPU Superchip
      • NVIDIA GB200 NVL72
      • Hopper versus Blackwell
      • HGX: High-Performance GPU Platforms
      • ARM Chips
      • ARM versus x86
      • RISC versus CISC
      • Introduction to RISC-V
    • Networking and Connectivity
      • Infiniband versus Ethernet
      • NVIDIA Quantum InfiniBand
      • PCIe (Peripheral Component Interconnect Express)
      • NVIDIA ConnectX InfiniBand adapters
      • NVMe (Non-Volatile Memory Express)
      • NVMe over Fabrics (NVMe-oF)
      • NVIDIA Spectrum-X
      • NVIDIA GPUDirect
      • Evaluating Modern GPU Interconnect
      • Scalable Hierarchical Aggregation and Reduction Protocol (SHARP)
      • Next-generation networking in AI environments
      • NVIDIA Collective Communications Library (NCCL)
    • Data and Memory
      • NVIDIA BlueField Data Processing Units (DPUs)
      • Remote Direct Memory Access (RDMA)
      • High Bandwidth Memory (HBM3)
      • Flash Memory
      • Model Requirements
      • Calculating GPU memory for serving LLMs
      • Transformer training costs
      • GPU Performance Optimisation
    • Libraries and Complements
      • NVIDIA Base Command
      • NVIDIA AI Enterprise
      • CUDA - NVIDIA GTC 2024 presentation
      • RAPIDs
      • RAFT
    • Vast Data Platform
      • Vast Datastore
      • Vast Database
      • Vast Data Engine
      • DASE (Disaggregated and Shared Everything)
      • Dremio and VAST Data
    • Storage
      • WEKA: A High-Performance Storage Solution for AI Workloads
      • Introduction to NVIDIA GPUDirect Storage (GDS)
        • GDS cuFile API
      • NVIDIA Magnum IO GPUDirect Storage (GDS)
      • Vectors in Memory
Powered by GitBook
LogoLogo

Continuum - Accelerated Artificial Intelligence

  • Continuum Website
  • Axolotl Platform

Copyright Continuum Labs - 2023

On this page
  • Computation Efficiency
  • Data
  • Memory Efficiency
  • Hardware/Algorithm Co-design
  • Conclusion

Was this helpful?

  1. Training
  2. The Fine Tuning Process
  3. Hyperparameters

A Survey on Efficient Training of Transformers

PreviousCheckpointsNextSequence Length Warmup

Last updated 1 year ago

Was this helpful?

This survey paper, titled "A Survey on Efficient Training of Transformers," provides a comprehensive overview of the recent progress in accelerating the training of Transformer models, focusing on both computation and memory efficiency.

The authors highlight the importance of developing efficient training techniques to make Transformer training faster, more cost-effective, and more accurate by efficiently using computational and memory resources.

The paper is organized into two main sections: computation efficiency and memory efficiency. Let's summarize each section in detail.

Computation Efficiency

Optimisation

Optimisers: The survey discusses various optimizers, including SGD with momentum, Adam, AdamW, and the recently discovered Lion optimizer. Lion converges faster and is more memory-efficient and accurate than AdamW for training Transformers on various benchmarks.

Initialization: Proper initialization is crucial for stabilizing training, enabling higher learning rates, accelerating convergence, and improving generalization. Techniques like Fixup, ReZero, SkipInit, and T-Fixup are discussed.

Sparse training: The key idea is to directly train sparse subnetworks instead of the full networks from scratch without sacrificing accuracy. Techniques like the lottery ticket hypothesis (LTH) and its variants are discussed.

Overparameterization: Increasing the number of learnable parameters beyond the number of training samples can improve convergence and generalization. The survey discusses theoretical guarantees and practical applications of overparameterization in Transformers.

Large batch training: Using large batch sizes can reduce the number of iterations per epoch and improve computing resource utilization. Techniques like linear scaling of the learning rate, LARS, and LAMB are discussed.

Incremental learning: This approach involves relaxing the original optimization problem into a sequence of easy-to-optimize sub-problems. Techniques like progressive layer stacking, stochastic depth, and AutoProg are discussed.

Memory Efficiency

Parallelism: Various parallelism techniques, such as data parallelism, model parallelism, pipeline parallelism, and tensor parallelism, are discussed to distribute the workload and memory across multiple devices.

Quantized training: Quantization techniques, such as mixed-precision training and integer-only quantization, are discussed to reduce memory consumption and accelerate computation.

Rematerialization: This technique involves recomputing activations during the backward pass instead of storing them in memory, reducing memory consumption at the cost of additional computation.

Offloading: Offloading techniques, such as CPU offloading and NVMe offloading, are discussed to store intermediate activations on slower but larger memory devices.

Parameter-efficient tuning: These methods aim to adapt pretrained models to downstream tasks with fewer trainable parameters, reducing memory consumption and training time. Techniques like adapter tuning, prompt tuning, and LoRA are discussed.

Tips for Training Large Language Models (LLMs)

  1. Use state-of-the-art optimizers like Lion for faster convergence and better memory efficiency.

  2. Employ proper initialization techniques like T-Fixup to stabilize training and enable higher learning rates.

  3. Consider sparse training techniques like LTH to reduce the number of trainable parameters without sacrificing accuracy.

  4. Utilize large batch training with techniques like LARS or LAMB to improve computing resource utilization.

  5. Apply parallelism techniques to distribute the workload and memory across multiple devices.

  6. Use quantization techniques like mixed-precision training to reduce memory consumption and accelerate computation.

  7. Employ rematerialization to reduce memory consumption by recomputing activations during the backward pass.

  8. Consider offloading techniques to store intermediate activations on slower but larger memory devices.

  9. Utilize parameter-efficient tuning methods like adapter tuning or LoRA to adapt pretrained models to downstream tasks with fewer trainable parameters.

In conclusion, this survey provides a comprehensive overview of the recent progress in efficient training techniques for Transformers, covering both computation and memory efficiency. By leveraging these techniques, researchers and practitioners can train large-scale Transformer models more efficiently, reducing the computational and memory requirements while maintaining high accuracy.

Data

In this section, the authors discuss data efficiency as another crucial factor in efficient training, focusing on two main approaches: token masking and importance sampling.

Token Masking

Token masking is a widely used technique in self-supervised pre-training tasks, such as masked language modeling (MLM) and masked image modeling (MIM).

The main idea is to randomly mask some input tokens and train the model to predict the missing content (e.g., vocabulary ID or pixels) using the context information from the visible tokens.

Since the computational and memory complexity of Transformer models grows quadratically with the sequence length, removing the masked tokens can significantly improve training efficiency. The authors discuss two examples:

a) In MLM, jointly pre-training the encoder and decoder for language generation tasks while removing the masked tokens in the decoder can save memory and computation costs.

b) In MIM, removing the masked image patches before the encoder has been shown to achieve stronger performance and 3× or more lower overall pre-training time and memory consumption compared to keeping the masked tokens.

The authors also mention that in language-image pre-training, randomly masking and removing the masked image patches can lead to 3.7× faster overall pre-training time compared to the original CLIP approach.

Importance Sampling

Importance sampling, also known as data pruning, aims to accelerate stochastic gradient algorithms for supervised learning by prioritising informative training examples. This approach is theoretically guaranteed to reduce variance and speed up convergence.

For deep neural networks (DNNs), a common way to estimate per-sample importance is to use gradient norms.

The authors discuss several works that use different approximations to make calculating these norms tractable. One work shows that simple average gradient norms or error 2-norms over several weight initializations can be used to identify important examples at a very early stage in training, similar to the early-bird lottery ticket hypothesis (LTH) but in the data domain.

A more recent work demonstrates an exciting analytic theory showing that the scaling of test error with dataset size can break beyond power scaling laws and be reduced to at least exponential scaling if equipped with a superior data pruning metric.

The authors employ a self-supervised metric using k-means clustering, suggesting a promising direction towards more efficient neural scaling laws based on data importance sampling.

In summary, this section highlights the importance of data efficiency in efficient training of Transformers.

Token masking, by removing masked tokens during pre-training, can significantly reduce computational and memory complexity.

Importance sampling, by prioritising informative training examples based on gradient norms or other metrics, can accelerate convergence and improve generalization.

These techniques complement the model-centric approaches discussed in the other sections of the paper to further improve the efficiency of training large-scale Transformer models.

Memory Efficiency

The "Memory Efficiency" section of the survey discusses various techniques to optimise memory usage when training large Transformer models that do not fit into the memory of a single device.

The authors first analyse the memory consumption of existing model training frameworks, which is primarily occupied by model states (optimizer states, gradients, and parameters) and activations.

The dominant solutions to optimize memory usage are as follows:

Parallelism

Training large DNNs with parallelism across devices is a common practice to meet memory demands.

The two main paradigms are Data Parallelism (DP) and Model Parallelism (MP).

DP distributes a minibatch of data across different devices, while MP allocates subgraphs of a model across multiple workers. DP is suitable for training small to moderate models, but it has poor memory efficiency when models become large. To improve the scalability of DP, solutions like parameter sharing (Albert) and ZeRO have been proposed.

To deal with very large DNNs, MP is used to allocate different layers across multiple accelerators in a "vertical" manner. Although MP has good memory efficiency, its communication and computation efficiency is low. To boost MP efficiency in an orthogonal "horizontal" dimension, two strategies are used: Tensor Parallelism (TP) and Pipeline Parallelism (PP). TP partitions a tensor operation in a layer across workers for faster computation and more memory saving, while PP splits the input mini-batch into multiple smaller micro-batches, enabling different accelerators to work on different micro-batches simultaneously. DP and MP can be used together to train larger models with higher computation and memory capacity.

Quantized training

This technique trains neural networks from scratch in reduced precision by compressing the activations, weights, and gradients into low-bit values (e.g., FP16 or INT8).

The most widely adopted approach for Transformers is automatic mixed-precision (AMP) training, which stores a master copy of weights in full-precision for updates while the activations, gradients, and weights are stored in FP16 for arithmetic.

AMP achieves faster training/inference speed and reduces memory consumption during network training. Recent support for FP8 training on NVIDIA H100 has shown promising results on Transformer training. Activation compressed training (ACT) is another technique that stores low-precision approximate copies of activations while computing the forward pass exactly, helping to reduce overall memory consumption during training.

Rematerialization and offloading

Rematerialization, also known as checkpointing, is a technique that only stores a portion of activations/weights during the forward pass and recomputes the rest during the backward pass.

Offloading is a technique that uses external memory, such as CPU memory, as an extension of GPU memory to increase memory capacity during training.

The optimal choice needs to minimize communication cost, reduce CPU computation, and maximize GPU memory saving. ZeRO-Offload is a representative work that offers an optimal offloading strategy customized to mixed-precision training with the Adam optimizer.

Parameter-efficient tuning:

This technique is becoming a prevailing way to drastically cut training costs by efficiently tuning readily available pretrained models.

Parameter-efficient tuning (PET) only updates a small number of additional parameters while freezing the pretrained model, significantly reducing the storage burden.

PET approaches can be categorized into addition-based methods and reparameterization-based methods.

The former attaches additional trainable parameters to the pretrained model, while the latter tunes parameters that are inherently in the model or new parameters that can be reparameterized into the model, yielding no sacrifice on inference efficiency. LoRA is a representative work that approximates the update of self-attention weights into two low-rank matrices, which can be merged into the pretrained weights during inference.

Hardware/Algorithm Co-design

This section of the survey discusses the importance of designing efficient hardware accelerators to enable faster training and inference for DNNs, especially Transformers.

The authors highlight the advantages and disadvantages of various hardware platforms, such as CPUs, GPUs, ASICs, and FPGAs, and emphasize the importance of considering hardware constraints and capabilities when designing algorithms.

The main techniques for hardware/algorithm co-design are as follows

Sparse matrix multiplication

Sparse general matrix multiplication (SpGEMM) takes advantage of the sparsity of attention matrices to reduce the number of computations.

Popular sparse matrix computation libraries include Intel Math Kernel Library on CPU and cuSPARSE, CUSP, and 2:4 structured sparsity on GPU.

However, SpGEMM is often hardware-unfriendly to general-purpose processors due to irregular sparsity. Specialized hardware accelerators, such as FPGAs and ASICs, are required to handle the poor data locality issue. OuterSPACE is a custom accelerator that transforms matrix multiplication into an outer product procedure and eliminates redundant memory accesses by decoupling multiplication from accumulation.

ViTCoD uses a learnable auto-encoder to compress sparse attentions and designs encoder and decoder engines to boost hardware utilization.

Hardware-aware low-precision

Lowering the precision of computations reduces the amount of memory and computation, which can be implemented in hardware-friendly fixed-point or integer representations instead of floating-point ones.

This results in a significant improvement in power consumption and speedup.

Low-precision arithmetic can be combined with other techniques, such as pruning and low-rank approximation, to achieve further acceleration. Sanger uses 4-bit queries and keys to compute the quantized prediction of sparse attention matrix and rearranges sparse attention masks into structured blocks for processing by reconfigurable hardware. DOTA identifies unimportant connections in attention using low-rank transformation and low-precision computation, achieving a 152.6× speedup over GPU by incorporating token-level parallelism and out-of-order execution.

Efficient attention

Several pioneering works focus on efficient and lightweight attention implementation in hardware.

A3 selects only those keys that are likely to have high similarity with the given queries to reduce the amount of computation in attention.

ELSA filters out irrelevant keys for a particular query based on hashing similarity to save computation, achieving a speedup of 58.1× and three orders of magnitude improvements in energy efficiency compared to an Nvidia V100 GPU.

FlashAttention proposes to exploit tiling to reduce the I/O communication between GPU high bandwidth memory (HBM) and on-chip SRAM, becoming a default fast and memory-efficient attention module for speedup.

In summary, this section highlights the importance of hardware/algorithm co-design in optimizing the training efficiency of Transformers. By considering the constraints and capabilities of hardware when designing algorithms, researchers can develop techniques such as sparse matrix multiplication, hardware-aware low-precision computation, and efficient attention implementations to significantly improve the speed, power consumption, and energy efficiency of training and inference for Transformers.

Conclusion

Overall, this survey provides a comprehensive overview of the state-of-the-art techniques for efficient training of Transformers, covering computation efficiency, memory efficiency, and hardware/algorithm co-design. The insights and techniques presented in this paper can help researchers and practitioners optimize the training of large-scale Transformer models, making them more accessible and environmentally friendly.

LogoA Survey on Efficient Training of TransformersarXiv.org
A Survey on Efficient Training of Transformers
Page cover image