Hierarchical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLM
Not on the map. Why?
Abstract (arXiv)
Training Long-Context Large Language Models (LLMs) is challenging, as hybrid training with long-context and short-context data often leads to workload imbalances. Existing works mainly use data packing to alleviate this issue, but fail to consider imbalanced attention computation and wasted communication overhead. This paper proposes Hierarchical Balance Packing (HBP), which designs a novel batch-construction method and training recipe to address those inefficiencies. In particular, the HBP constructs multi-level data packing groups, each optimized with a distinct packing length. It assigns training samples to their optimal groups and configures each group with the most effective settings, including sequential parallelism degree and gradient checkpointing configuration. To effectively utilize multi-level groups of data, we design a dynamic training pipeline specifically tailored to HBP, including curriculum learning, adaptive sequential parallelism, and stable loss. Our extensive experiments demonstrate that our method significantly reduces training time over multiple datasets and open-source models while maintaining strong performance. For the largest DeepSeek-V2 (236B) MoE model, our method speeds up the training by 2.4× with competitive performance. Codes will be released at https://github.com/ModelTC/HBP.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 38 of its 52 references that are in the map. First posted on arXiv 10 Mar 2025.
Builds on
38 of 52 references.
References · 38
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
26 more
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
- 2023Instruction-Following Evaluation for Large Language Modelscited by 1,228
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
- 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 1,053
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
- 2023CMMLU: Measuring massive multitask language understanding in Chinesecited by 449
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
- 2023Effective Long-Context Scaling of Foundation Modelscited by 303
- 2023DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Modelscited by 245
- 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 244
- 2024LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMscited by 144
- 2022A Length-Extrapolatable Transformercited by 127
- 2023LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Modelscited by 124
- 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 106
- 2024MathBench: Evaluating the Theory and Application Proficiency of LLMs with a Hierarchical Mathematics Benchmarkcited by 105
- 2024LongCite: Enabling LLMs to Generate Fine-grained Citations in Long-context QAcited by 81
- 2023Blockwise Parallel Transformer for Large Context Modelscited by 12
- 2024Enhancing Training Efficiency Using Packing with Flash Attentioncited by 12
- 2024Packing Analysis: Packing Is More Appropriate for Large Models or Datasets in Supervised Fine-tuningcited by 11
- 2024OmniBal: Towards Fast Instruction-Tuning for Vision-Language Models via Omniverse Computation Balancecited by 2
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026Efficient Scaling of LLM Training with Flexible Context Parallelism
- 2025TL;DR: Too Long, Do Re-weighting for Efficient LLM Reasoning Compression
- 2026NSP: Accelerating Variable-Length LLM Training via Nested Sequence Parallelism ↗
- 2026Out of the Memory Barrier: A Highly Memory Efficient Training System for LLMs with Million-Token Contexts
- 2025ByteScale: Efficient Scaling of LLM Training with a 2048K Context Length on More Than 12,000 GPUs
- 2026Preference Packing: Efficient Preference Optimization for Large Language Models
- 2026Scaling Down the Scaling Laws: Parameter Efficiency and Compute-Optimal Training in Resource-Constrained Large Language Models
- 2026BASP: Communication-Efficient Batch-Aware Sequence Parallelism for LLM Training