Vocabulary Parallelism, with smart vocabulary distribution across GPUs, solves the pipeline bottleneck in LLM training by evenly distributing vocabulary computations
https://arxiv.org/abs/2411.05288
π― Original Problem:
Pipeline parallelism in LLM training faces a critical imbalance issue - vocabulary layers cause uneven computation and memory usage across pipeline stages. This creates pipeline bubbles and memory bottlenecks, especially problematic with large vocabularies.
-----
π§ Solution in this Paper:
β Introduces "Vocabulary Parallelism" that evenly partitions vocabulary layers across all pipeline devices
β Optimizes communication barriers from 3 to 1 using novel algorithms that reorder operations in output layers
β Integrates seamlessly with existing pipeline schedules through a building block approach
β Uses separate CUDA streams for overlapping communication with computation
β Implements memory-efficient padding techniques for better alignment
-----
π‘ Key Insights:
β Vocabulary layer imbalance worsens with larger vocabulary sizes
β Simply redistributing transformer layers doesn't solve both compute and memory imbalance
β Communication barriers directly impact activation memory overhead
β Overlapping communication with computation is crucial for performance
β Memory balancing is achievable when combined with V-Half schedule
-----
π Results:
β 5% to 51% improvement in throughput compared to naive approaches
β Significantly reduced peak memory usage in large vocabulary scenarios
β 8% performance boost achieved with proper vocabulary size padding
β Perfect balance in both memory and computation when combined with V-Half










