atlas

Research map / Large language models / Instruction and fine-tuning

Efficient Long Context Fine-tuning with Chunk Flow

ICML 2025 · Large language models › Instruction and fine-tuning · approach: Efficient LLM fine-tuning systems · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes ChunkFlow, a chunk-centric training system that repacks variable-length sequences into uniform chunks and uses state-aware scheduling plus a state-aware 1F1B pipeline schedule to speed up long-context fine-tuning.

Problem

Long context fine-tuning uses datasets dominated by short sequences with a small long tail; existing strategies tuned for long sequences cause GPU memory underutilization, excess parallelism for short data, load imbalance in data parallelism, and pipeline bubbles.

Approach

Reorganize each batch into uniformly sized chunks (packing short sequences together, splitting long ones) and schedule dependent chunks with a state-aware scheme that stores only K chunks' activations, so peak memory is governed by ChunkSize*K rather than the longest sequence; combine this with 1F1B pipeline scheduling.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use ChunkFlow chunk construction and state-aware scheduling instead of Megatron-LMQwen2.5-series long-context fine-tuning · Long-context fine-tuning evaluation datasettraining speed: up to 4.53xHelped
Use state-aware 1F1B chunk scheduling with ChunkSize 2*Unit and K 1 instead of standard 1F1BVariable-length pipeline scheduling · Four sequences with lengths Unit, Unit, 2*Unit, and 4*Unitbubble ratio: 57.14% -> 54.1%Helped
Use state-aware 1F1B chunk scheduling with ChunkSize 2*Unit and K 1 instead of standard 1F1BVariable-length pipeline scheduling · Four sequences with lengths Unit, Unit, 2*Unit, and 4*Unitefficiency: approximately 8%Helped
Increase K from 1 to 2 in state-aware 1F1B chunk scheduling (ablation)Variable-length pipeline scheduling · Four sequences with lengths Unit, Unit, 2*Unit, and 4*Unitbubble ratio: 54.1% -> 47.8%Helped
Increase K from 1 to 2 in state-aware 1F1B chunk scheduling (ablation)Variable-length pipeline scheduling · Four sequences with lengths Unit, Unit, 2*Unit, and 4*Unitend-to-end efficiency: 12%Helped
Set ChunkSize to 4*Unit and K to 1, yielding only 2 chunks (ablation)ChunkFlow state-aware pipeline scheduling · Four-sequence pipeline scheduling exampletraining performance: 15%Hurt
Set ChunkSize to 4*Unit and K to 1, yielding only 2 chunks (ablation)ChunkFlow state-aware pipeline scheduling · Four-sequence pipeline scheduling examplebubble ratio: 60%Hurt
Use ChunkSize 2K and K 16 instead of ChunkSize 8K and K 4 (ablation)ChunkFlow on Qwen2.5-7B · 256K contextaverage iteration time: 23774 -> 29810Hurt
Use ChunkSize 32K and K 1 instead of ChunkSize 8K and K 4 (ablation)ChunkFlow on Qwen2.5-7B · 256K contextaverage iteration time: 23774 -> 28942Hurt
Increase ChunkSize from 2K to 4K to 8K (ablation)ChunkFlow on Qwen2.5-7B · 32K contextpeak memory: 41.6 GiB; 47.5 GiB; 59.3 GiBHurt
Increase ChunkSize from 2K to 4K to 8K (ablation)ChunkFlow on Qwen2.5-7B · 256K contextpeak memory: 45.6 GiB; 50.8 GiB; 63.8 GiBHurt

Surprising findings

Limitations

Experimental setup

Datasets: LMSysChat1M constructed long-context evaluation dataset (context lengths 32K and 256K)

Metrics: average iteration time (training performance) peak memory usage pipeline bubble ratio speedup over Megatron-LM

Baselines: Megatron-LM

Builds on: Megatron-LM 1F1B pipeline scheduling sequence packing token-level pipeline parallelism

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy