potentialpaper

Efficient Scaling of LLM Training with Flexible Context Parallelism

Yifan Niu, Han Xiao, Dongyi Liu, Wei zhou, Jia Li

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Scaling long-context capabilities is crucial for Large Language Models (LLMs). However, real-world data contain a large number of sequences with heterogeneous lengths. Existing training libraries for LLMs rely on static parallelism strategies, which suffer from severe load imbalance, redundant communication, and suboptimal hardware utilization under data heterogeneity. In this work, we propose Flexible Context Parallelism (FCP), an efficient parallelism strategy that adaptively reconfigures communication groups and context parallelism degrees during LLM training. We support non-power-of-two Ring-CP degrees and combine memory-aware grouping with polynomial-time degree allocation, whose solve takes tens of milliseconds in the evaluated configurations. FCP is able to maintain high hardware efficiency even under extreme data heterogeneity. Experimental results demonstrate that FCP significantly outperforms Megatron-LM and DeepSpeed in both LLM and MLLM training, improving throughput across heterogeneous workloads on clusters of up to 64 devices. For extremely unbalanced batches, FCP even achieves 2.24 ×\times speedup. The code is available at https://github.com/ivanniu/FCP.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:45 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

FCP addresses an important and well-motivated systems problem: static context-parallel layouts can waste computation and communication under long-tailed sequence-length distributions. The paper presents a practical, non-intrusive implementation, a low-overhead allocator, and broad LLM/MLLM results. The main uncertainty is whether the evaluation demonstrates the paper's claimed advance over existing dynamic methods, rather than only over static baselines. The paper therefore needs clarification on the following prioritized points:

Please isolate the source of the gains. Using the existing implementation, report (i) fixed CP with cost-aware cross-DP assignment/packing and (ii) FCP restricted to power-of-two CP degrees. This would show how much improvement comes from better assignment versus variable/non-power-of-two CP.

Please substantiate the claim that the schedule is near-optimal. On small instances where exact search is feasible, report the makespan or throughput gap of BFD plus 2D-DP, and compare it with a simple greedy stage-2 allocator. This is more informative than solver latency alone.

Please sharpen the comparison with FlexSP and ByteScale. Identify which mechanisms are genuinely new and explain the remaining benefit if FlexSP's solver is fully overlapped. A feature/algorithm comparison plus the in-framework ablations above is sufficient; a full reimplementation of closed-source systems is not required for rebuttal.

Please clarify scope: support for FSDP x CP x TP meshes, applicability to non-ring backends, and portability beyond Ascend. New NVIDIA-cluster experiments are not required for rebuttal, but unsupported generality claims should be narrowed.

Final justification

The authors have addressed the reviewers concerns in their rebuttal, and the responsive reviewers acknowledge this.

Area Chair bENR · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

FCP addresses an important and well-motivated systems problem: static context-parallel layouts can waste computation and communication under long-tailed sequence-length distributions. The paper presents a practical, non-intrusive implementation, a low-overhead allocator, and broad LLM/MLLM results. The main uncertainty is whether the evaluation demonstrates the paper's claimed advance over existing dynamic methods, rather than only over static baselines. The paper therefore needs clarification on the following prioritized points:

Please isolate the source of the gains. Using the existing implementation, report (i) fixed CP with cost-aware cross-DP assignment/packing and (ii) FCP restricted to power-of-two CP degrees. This would show how much improvement comes from better assignment versus variable/non-power-of-two CP.

Please substantiate the claim that the schedule is near-optimal. On small instances where exact search is feasible, report the makespan or throughput gap of BFD plus 2D-DP, and compare it with a simple greedy stage-2 allocator. This is more informative than solver latency alone.

Please sharpen the comparison with FlexSP and ByteScale. Identify which mechanisms are genuinely new and explain the remaining benefit if FlexSP's solver is fully overlapped. A feature/algorithm comparison plus the in-framework ablations above is sufficient; a full reimplementation of closed-source systems is not required for rebuttal.

Please clarify scope: support for FSDP x CP x TP meshes, applicability to non-ring backends, and portability beyond Ascend. New NVIDIA-cluster experiments are not required for rebuttal, but unsupported generality claims should be narrowed.

Final justification

The authors have addressed the reviewers concerns in their rebuttal, and the responsive reviewers acknowledge this.

Reviewer fTKxOpenReview ↗
Rating
3/6
Confidence
4/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
1/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary
  • The paper proposes FCP (Flexible Context Parallelism), a dynamic context parallelism scheduling for long context LLM training under heterogeneous sequence lengths, which adaptively reconfigures context parallelism degrees to prevent short sequences from incurring communication overheads.
  • FCP allows arbitrary integer (non power-of-two) CP degrees by building on ring style CP, contrasted with FlexSP's power-of-two restriction.
  • FCP proposes a two-stage approximation algorithm (BFD + 2D-DP) to solve the NP-hard sequence allocation problem in polynomial time complexity.
  • FCP outperforms Megatron-LM and DeepSpeed in both LLM and MLLM training by up to 1.47x speedup in average throughput while maintaining near-linear scaling efficiency across large scale clusters.
Strengths and weaknesses

Strengths

  • Non-intrusive Megatron-LM integration. FCP is implemented as add-on modules without modifying the Megatron core. This allows seamless integration to the existing Megatron-LM based training clusters.
  • Two-stage polynomial time approximation is positioned well. A millisecond-scale BFD + 2D-DP algorithm occupies a reasonable point in the design space between expensive ILP solve (FlexSP) and fully greedy heuristics (ByteScale).

Weaknesses

  • Non-power-of-two ablation. The paper's primary claimed advantage over FlexSP is supporting non-power-of-two CP degrees. However, it provides no algorithm or implementation detail to enable or optimize non-power-of-two ring sizes. Plus, ByteScale allows non-power-of-two CP degrees, which weakens the authors' claim that it is one of their contributions.
  • No comparison against relevant dynamic baselines. The paper positions itself directly against ByteScale and FlexSP, yet the evaluation is done only against static CP, i.e., Megatron-LM and DeepSpeed. The authors justified this in Section 6.1 saying that they are closed-source, however, this is insufficient; (1) a power-of-two-restricted FCP variant can easily be evaluated at practically zero additional cost, and (2) replacing stage-2 DP with a greedy allocation on the same atomic groups is a ByteScale simulation. Neither experiment is run.
  • FlexSP solver cost seems to be overstated. The paper frames FlexSP's 5~15s solving time as a critical bottleneck, but FlexSP paper explicitly demonstrates that this overhead can fully be overlapped with computation (Section 6.6). If scheduling latency can fully be hidden, the comparison to FlexSP should now focus on solution quality (e.g. makespan or throughput), which FCP never directly reports. This weakness makes FCP seem to solve the already addressed problem with a different approach that does not have noticeable improvements.

Minor comments

  • Figure 2, overall workflow, is confusing. Why the scheduler has to chunk the global batch to microbatches? Is it to use pipeline parallelism as well or for gradient accumulation? Both cases are anyway not directly related to paper and there is no explanations about microbatch planning, so it will distract readers.
  • Section structural error; Section 6.4.2 should be a dedicated subsection, not under Section 6.4.
Questions
  • Non-power-of-two ablation. The paper's primary claimed advantage over FlexSP is supporting non-power-of-two CP degrees. However, no experiment shows this contribution clearly. Please run FlexSP (ideally) or at least DeepSpeed Ulysses and FCP with non-power-of-two and power-of-two, and show that Ulysses CP suffers from non-power-of-two CP setup while FCP is better in non-power-of-two setups.
  • The paper compares only to static baselines. Please provide at least two simulated comparisons: (1) FCP with stage-2 DP replaced by greedy rank allocation (a ByteScale style hueristic) and (2) the FCP algorithm introduced in Algorithm 2~6 in page 4 (a FlexSP style optimal algorithm).
  • FlexSP solver time evaluation and comparison. Section 6.3 only includes FCP compute, schedule, and solver time; under the same configuration, how does FlexSP work and how much FCP's two-stage approximation is faster than FlexSP's algorithm? Also, assuming we overlap solving and scheduling with computation, how much net advantages FCP gain over FlexSP? The authors only introduced 5~15s for FlexSP but cannot identify from which configuration such numbers came out.
Limitations
  • The authors introduce one limitation in Conclusion section, which is fair. But such situation (balanced data) is very unlikely, the effectiveness of balanced context parallelism is still in effect.
  • The authors should implement related works (ByteScale and FlexSP) and compare FCP against them to show true advantages of FCP over the SOTA works.
Final justification

As the most critical parts (e.g. missing evaluation against existing SOTA) are addressed during rebuttal, I have raised my score. However, my score remains a borderline reject for the following unaddressed, still critical reasons.

Limited effectiveness of the faster algorithm

  • The authors indicated that the solver algorithm complexity is independent to model size, thus running smaller model execution cannot overlap the solver runtime overhead. It is true that the main algorithm complexity is not affected by the model size thus smaller models may not hide the overhead, however, at the same time this limits the advantage of FCP (more specifically, faster algorithm) only to smaller models (~1B), while recent open weight models' size is getting bigger (30B~1T) and for those models solver overhead can mostly be hidden for both FCP and FlexSP.
  • The author reiterated the same claim over FlexSP that theoretically it has exponential complexity. The authors claim that it is impossible to hide exponentially growing scheduling overhead with linear CPU expansion. While I agree that the FlexSP algorithm is theoretically NP-hard, their scalability analysis shows that FlexSP algorithm overhead can still be hidden even with 1k GPUs, while the authors couldn't provide evidence other than citing 5-15s from the original FlexSP paper that the overhead cannot be hidden.

Limitations of power-of-two CP (This is an acknowledgement, not indicated as a reason of the score decision)

  • The authors claimed that the official Megatron implementation "cannot" run non power-of-two ranks and running all-gather on various world size. First, as far as I know, ulysses CP utilizes all-to-all, not all-gather. But I got the point that collective communications are optimized for power of two ranks while ring based CP can support arbitrary world size.
  • I do no think "because the implementation looks like this it is not possible to run". Algorithm-wise, although it for sure should be slow, can run on non power-of-two world. Even if the number of heads is not divisible to the world size, some rank simply executes more heads, incurring more imbalance and eventually make the entire CP slower, Ulysses can run. It just runs slower. However, the authors provide a very simple evaluation; while it is too rough and naive, I got the authors' point that running collectives on non-power-of-two indeed has high overhead.

Limitations of FlexSP CP backend

  • While providing numbers that collectives on non power-of-two ranks have high overhead is a meaningful improvement to the paper, it is not enough to prove the novelty of FCP. The authors claimed that FlexSP uses power-of-two Ulysses CP and that limits their performance. While it is true that they used Ulysses, I still do not think their main algorithmic design regarding flexible CP is tied to Ulysses CP backend, which the authors do not seem to be able to prove. I asked if FlexSP's algorithm is tied with Ulysses's style CP, but the authors seem to misunderstand my intention as "if Ulysses cannot run on arbitrary world" and provided the result in the second point.
  • The reason I asked to clarify if FlexSP algorithm is tied with Ulysses was that without it we should assume FlexSP also is flexible to use any CP backend, including ring based CP, same as FCP. This means if FlexSP algorithm is fundamentally not tied to power of two rank limitation then it can achieve the same performance benefits from non-power-of-two flexibility by simply replacing their backend implementation. Then, the claimed throughput advantage of FCP over FlexSP, mainly from non power of two ranks, is negligible.

Combined with the limited effectiveness of the faster algorithm and lack of evidence in tackling the limitations of the existing work, I think the contribution of the paper as of the submitted form is limited and recommend not to accept.

Formatting concerns

None

6 comments
Authors · CommentOpenReview ↗

Response to Reviewer fTKx (part 1/2)

Thank you for taking the time to review our paper and for providing valuable feedback. We sincerely appreciate your effort. We would like to address your questions and concerns below.

Weakness 1 & Question 1: The non-power-of-two contribution lacks implementation detail and ablation, while ByteScale already supports non-power-of-two degrees. Please compare FCP with a power-of-two-restricted alternative.

We would like to clarify that although ByteScale supports non-power-of-two degrees, the scheduling algorithms of FCP and ByteScale are different. The core technical contribution of FCP is a cost-aware polynomial-time scheduling algorithm, while ByteScale is a heuristic greedy algorithm. We compared FCP and FCP (power-of-two), using standard Megatron-LM as a baseline in experiments conducted with a batch size (BSZ) of 512 and a cluster size of 64. The results are as follows:

Model Dataset Megatron-LM Power-of-two only FCP
Qwen3-4B GitHub 1.00× 1.20× 1.36×
CommonCrawl 1.00× 1.17× 1.29×
Wikipedia 1.00× 1.14× 1.20×
Qwen3-8B GitHub 1.00× 1.35× 1.45×
CommonCrawl 1.00× 1.24× 1.38×
Wikipedia 1.00× 1.16× 1.28×

Weakness 2 & Question 2: The evaluation lacks dynamic baselines. Please provide a ByteScale-style heuristic comparison and a FlexSP-style optimal comparison.

We implement both requested baselines as described. ByteScale-style baseline: First, the scheduler applies the "Length-sorted, FLOPs-balanced bucketing" to the entire global batch to construct a sequence of executable tasks. Next, it sets the CP parallelism for each task to the minimum feasible size and uses a cost model to estimate execution time. Finally, it sorts the tasks by execution time in descending order and employs a greedy strategy to assign each task to the earliest available Rank. FlexSP-style baseline: First, the scheduler obtains the corresponding sequence buckets using its DP algorithm; then, it uses the solver to address an optimization problem to determine the CP size for each sequence bucket. All numbers below are speedups over standard Megatron-LM. We conduct experiments using the GitHub dataset and Qwen3-4B.

Baseline: ByteScale-style greedy task scheduler

Ranks GBS Megatron-LM ByteScale-style FCP
32 128 1.00× 1.22× 1.34×
32 256 1.00× 1.19× 1.29×
32 512 1.00× 1.26× 1.33×
64 128 1.00× 1.13× 1.29×
64 256 1.00× 1.21× 1.35×
64 512 1.00× 1.20× 1.36×

Baseline: FlexSP-style power-of-two schedule

Ranks GBS Megatron-LM FlexSP-style FCP
32 128 1.00× 1.25× 1.34×
32 256 1.00× 1.19× 1.29×
32 512 1.00× 1.15× 1.33×
64 128 1.00× 1.14× 1.29×
64 256 1.00× 1.24× 1.35×
64 512 1.00× 1.17× 1.36×

FCP’s primary performance advantages stem from global makespan optimization and support for arbitrary Ring-Style CP degree. ByteScale-style scheduling can result in tasks running on sub-optimal CP configurations and creates a significant "long-tail effect" when assigning the final few tasks. FlexSP-style employs Ulysses-Style CP, which prevents communication and computation from overlapping and requires the number of CPs to be limited to powers of 2, reducing the feasible search space.

Authors · CommentOpenReview ↗

Response to Reviewer fTKx (part 2/2)

Weakness 3 & Question 3: FlexSP reports that its solver can be overlapped with computation, so latency alone is insufficient. Please clarify the source of the 5-15 s number, compare solution quality, and report the net advantage under full overlap.

The number of 5-15 s is extracted from the FlexSP paper. The FlexSP paper utilizes a batch size (BSZ) of 512 and a cluster size of 64 GPUs; we conducted experiments at this same scale. Under this configuration, FCP completes scheduling in just 905 milliseconds—a duration 5.5 to 16.6 times shorter than the solving time reported for FlexSP. Furthermore, the algorithm employed by FlexSP has exponential complexity; as BSZ and cluster size increase, scheduling time rises rapidly, making it difficult to achieve overlapping.

Even in scenarios involving full overlap, the advantages of FCP’s scheduling quality remain evident: the experimental results are detailed in "Weakness 2".

Minor comments: Why does the scheduler have to chunk the global batch into micro-batches? Is it to use pipeline parallelism or for gradient accumulation? In addition, Section 6.4.2 should be a dedicated subsection rather than being nested under Section 6.4.

Thanks for the suggestion. The micro-batch planner partitions the global batch into micro-batches to fit within memory. The micro-batch planner is a standard practice across various training frameworks to prevent OOM errors, including Megatron-LM. We included this element to clarify the overall algorithmic workflow. We will remove the micro-batch planner from Figure 2 and promote Section 6.4.2 to a standalone subsection in the final version.

Authors · CommentOpenReview ↗

Dear Reviewer,

We sincerely appreciate your thoughtful review. We would be truly grateful for any further feedback you may have. If any concerns remain unaddressed, we would be more than happy to provide further clarification.

Reviewer xLp8OpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This work addresses the central challenge of efficient long-context LLM and MLLM training under highly heterogeneous sequence-length distributions. The paper proposes Flexible Context Parallelism (FCP), a dynamic context-parallel scheduling framework that adaptively reconfigures communication groups and allows arbitrary non-power-of-two context parallelism degrees. Compared with existing static approaches such as Megatron-LM and DeepSpeed, FCP aims to reduce workload imbalance and redundant communication caused by skewed sequence distributions.

Strengths and weaknesses

Strengths

  1. Clear problem formulation and motivation. The paper clearly identifies the inefficiency of static parallelism under heterogeneous sequence-length distributions and provides intuitive motivation for adaptive context parallelism. The formulation in Section 4 is well-structured and the optimization target is clearly defined.
  2. Strong empirical performance improvements. The paper demonstrates significant speedups on both LLM and MLLM training workloads across multiple datasets and model sizes. The improvements are especially convincing on long-tail datasets and large models, which matches the claimed motivation of handling heterogeneous workloads.

Weaknesses

  1. Limited comparison with the most relevant prior work (FlexSP). One major concern is that this work appears to be closely related to FlexSP, yet the experimental comparison does not include FlexSP itself. Since the core idea also focuses on flexible sequence/context parallelism and dynamic scheduling, the paper should more clearly demonstrate the novelty and performance advantages over FlexSP. At minimum, a theoretical or qualitative comparison should be provided if direct implementation is unavailable.
  2. Novelty beyond engineering extension is not fully convincing. Although the introduction emphasizes arbitrary CP degrees and lower scheduling overhead, the overall framework still resembles an extension of prior dynamic scheduling methods. The paper would benefit from a more explicit discussion of which components are fundamentally new versus engineering adaptations of existing ideas.
  3. All experiments are conducted on Ascend 910C NPUs. Although I think method is hardware-agnostic, it remains unclear how the approach behaves on mainstream NVIDIA GPU clusters. Additional discussion on portability and expected performance would strengthen the paper.
  4. Approximation quality of the solver is insufficiently validated. The paper claims near-optimal scheduling through the proposed dynamic programming approximation, but the quality gap compared with the true optimal solution is not evaluated. For smaller-scale settings where exhaustive search is feasible, showing the approximation gap would make the optimization claims much more convincing.
Questions
  • The baselines only include Megatron-LM and DeepSpeed. Since FlexSP is the most closely related prior work, can the authors include either:
    • direct experimental comparisons, or
    • a more rigorous theoretical and practical discussion explaining the differences and advantages over FlexSP?
  • The experiments are conducted only on Ascend 910C NPUs. Although the method is described as hardware-agnostic, could the authors discuss:
    • the expected behavior on NVIDIA GPU clusters,
    • and whether the same scheduling benefits are expected on GPU systems?
  • The paper claims the proposed DP-based solver produces near-optimal scheduling results. Could the authors provide:
    • comparisons against exact optimal solutions on smaller-scale cases,
    • or approximation-gap analysis to validate the quality of the generated schedules?
Limitations

yes

Final justification

The rebuttal addressed my main concerns to a reasonable extent. In particular, the authors clarified the distinction from FlexSP and provided an additional FlexSP-style comparison, discussed portability to NVIDIA GPU systems, and added quantitative validation showing that the proposed scheduler is within about 9–12% of the exact optimum on the tested cases. These additions strengthen both the novelty argument and the empirical support for the scheduling method. While direct NVIDIA experiments are still missing, I consider this a secondary limitation relative to the clarified contributions and additional evidence. I therefore maintain my borderline-accept recommendation.

Formatting concerns

No paper formatting concerns.

4 comments
Authors · CommentOpenReview ↗

Response to Reviewer xLp8 (part1/2)

Thank you for taking the time to review our paper and for providing valuable feedback. We sincerely appreciate your effort. We would like to address your questions and concerns below.

Weakness 1 & Question 1: Limited comparison with the most relevant prior work (FlexSP). Since the core idea also focuses on flexible sequence/context parallelism and dynamic scheduling, the paper should more clearly demonstrate the novelty and performance advantages over FlexSP. At minimum, a theoretical or qualitative comparison should be provided if direct implementation is unavailable.

Thanks for the comment. We would like to clarify our primary contributions and distinctions from FlexSP:

  • Different target backend: FlexSP is designed for Ulysses-style SP, and FCP is for Ring-style CP. However, for contemporary large-scale long-context training, Ring-style CP is the mainstream paradigm due to its effective communication-computation overlap and superior scalability to larger CP degrees. Developing dynamic parallelism algorithms for Ring-style CP is important.
  • Algorithmic Novelty: The scheduling algorithms are different. Our primary technical contribution is a more lightweight, near-optimal scheduling algorithm for arbitrary CP degrees. Our scheduling algorithm employs dynamic programming to obtain the optimal solution, whereas FlexSP primarily solves an approximate mixed integer programming problem in power-of-two search space.

Regarding the execution time of the scheduling algorithms, FCP has polynomial complexity, whereas FlexSP, despite employing approximations, still has exponential complexity (the overhead is significant for large scale training). To compare the effectiveness of the scheduling, we implement FlexSP-style baseline on our code base: First, the scheduler obtains the sequence buckets using its DP algorithm; then, it uses a solver to address an optimization problem to determine the power-of-two CP size for each bucket. All numbers below are speedups over standard Megatron-LM. We conduct experiments using GitHub dataset and Qwen3-4B.

Ranks GBS Megatron-LM FlexSP-style FCP
32 128 1.00× 1.25× 1.34×
32 256 1.00× 1.19× 1.29×
32 512 1.00× 1.15× 1.33×
64 128 1.00× 1.14× 1.29×
64 256 1.00× 1.24× 1.35×
64 512 1.00× 1.17× 1.36×

Weakness 2: Novelty beyond engineering extension is not fully convincing. Although the introduction emphasizes arbitrary CP degrees and lower scheduling overhead, the overall framework still resembles an extension of prior dynamic scheduling methods. The paper would benefit from a more explicit discussion of which components are fundamentally new versus engineering adaptations of existing ideas.

Thanks for your suggestion. We want to clarify our contribution from two aspects below:

Technical Contribution. The core technical contribution of FCP is a cost-aware polynomial-time scheduling algorithm over arbitrary integer CP sizes, which is completely different from the scheduling algorithm of FlexSP. It jointly addresses memory-aware sequence grouping and CP-size allocation while accounting for the nonlinear computation and communication costs of different candidate allocations. This enlarges the feasible scheduling space beyond power-of-two choices without resorting to a high-overhead problem solver. It is therefore an algorithmic contribution rather than merely an engineering extension.

Engineering Contribution. We have open-sourced the complete FCP codebase, including profiling, scheduling, dynamic process-group management, communication adaptation, and Megatron-LM training integration. To the best of our knowledge, this is the first publicly available end-to-end implementation of dynamic hybrid parallelism covering both the scheduling algorithm and its training framework.

Authors · CommentOpenReview ↗

Response to Reviewer xLp8 (part 2/2)

Weakness 3 & Question 2: All experiments are conducted on Ascend 910C NPUs. Although I think the method is hardware-agnostic, it remains unclear how the approach behaves on mainstream NVIDIA GPU clusters. Additional discussion on portability and expected performance would strengthen the paper. Could the authors discuss the expected behavior on NVIDIA GPU clusters and whether the same scheduling benefits are expected on GPU systems?

FCP's grouping, profiling, allocation, schedule generation, and execution are implemented on top of PyTorch and standard Megatron-LM, ensuring direct compatibility with NVIDIA. Our codebase currently includes a few patches added for Ascend compatibility. Only minor modifications are needed to adapt FCP to NVIDIA GPUs. The same issue also exists on GPUs. Heterogeneous lengths create nonlinear attention costs, while a fixed CP degree causes redundant communication for shorter sequences. This is a performance bottleneck independent of hardware specifications. The FCP algorithm is expected to achieve similar scheduling benefits on GPU systems. The concrete speedup performance requires further experimental verification.

Weakness 4 & Question 3: Approximation quality of the solver is insufficiently validated. The paper claims near-optimal scheduling through the proposed dynamic programming approximation, but the quality gap compared with the true optimal solution is not evaluated. For smaller-scale settings where exhaustive search is feasible, could the authors provide comparisons against exact optimal solutions or approximation-gap analysis?

We compare the complete FCP scheduler (BFD grouping plus 2D-DP allocation) against an exact solver that jointly optimizes sequence grouping and CP-size allocation under the same profiled cost and memory models. We conduct experiments using GitHub dataset and Qwen3-4B.

Devices NN Sequences KK Mean gap
16 16 9.41%
16 18 12.39%
16 20 10.60%

For each micro-batch, we run FCP and the exact solver on the same sequences. Each datapoint is collected by 100 tests (25 from each of the four datasets). Across all configurations, FCP's predicted makespan is only ~9-12% above the exact optimum on average. Since the complexity of obtaining an exact solution is exponential—requiring hours for larger values of N and K—we have limited the sizes of N and K in this experiment.

Authors · CommentOpenReview ↗

Dear Reviewer,

We sincerely appreciate your thoughtful review. We would be truly grateful for any further feedback you may have. If any concerns remain unaddressed, we would be more than happy to provide further clarification.

Reviewer xLp8 · CommentOpenReview ↗

Thank you for the detailed response and the additional experiments. The rebuttal clarifies several aspects of the work, particularly the distinction between FCP and FlexSP, the expected portability to NVIDIA GPU systems, and the approximation quality of the scheduler.

Overall, the rebuttal has addressed my questions to a reasonable extent and strengthened the paper. I will therefore maintain my positive score.

Reviewer vgF9OpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes Flexible Context Parallelism (FCP), a dynamic scheduler for long-context LLM/MLLM training. FCP forms per-microbatch CP groups with variable parallelism degrees based on sequence lengths, memory constraints, and a profiled runtime model, aiming to reduce load imbalance from heterogeneous long-tail contexts. The system is implemented on Megatron/MindSpeed and evaluated against Megatron-LM and DeepSpeed on text and multimodal workloads.

Strengths and weaknesses

Strenghts

  • Strong motivation and clean systems formulation. The paper addresses important bottlenecks in long-context training: fixed CP/DP layouts can be badly load-imbalanced under heterogeneous sequence lengths, and existing dynamic sequence-parallel approaches often restrict group sizes to powers of two. The formulation of dynamically assigning sequences to CP groups with arbitrary integer CP degrees is natural and well-scoped.
  • Reasonable cost model and allocation algorithm. The cost model captures both compute and communication terms, including overlap in ring-attention style CP. The two-stage solver, using memory-aware sequence packing followed by a DP-based CP-degree allocator, is a good pragmatic approximation to the underlying resource-allocation problem.
  • Pragmatic implementation design. Keeping TP/PP fixed while adapting only CP is a sensible choice that avoids expensive model-weight reshuffling. The implementation also directly addresses scheduler overhead through asynchronous/double-buffered scheduling and reports overhead measurements.
  • Broad end-to-end evaluation. The experiments cover both LLM and MLLM training, multiple models and datasets, scaling from 8 to 64 devices, scheduler overhead, communication-group overhead, profiler error, and robustness to profiler noise. The reported speedups are meaningful, especially on long-tail workloads and larger models.

Weakness

  • Missing cost-aware fixed-CP baseline. The evaluation does not clearly isolate the benefit of variable CP degree from the benefit of better cross-DP sample assignment. The paper compares against Megatron-LM and DeepSpeed with "standard packing", but standard packing is usually token-utilization oriented and may not balance the nonlinear causal-attention cost across DP replicas. A stronger baseline would keep CP fixed but assign/pack samples across DP ranks using an estimated cost such as sum_i L_i^2 / CP + comm(L_i).
Questions
  • How should FCP be adapted to common FSDP x CP x TP hybrid meshes where parameters, gradients, and optimizer states are sharded across the DP/FSDP axis?
  • How much of FCP's gain remains over a fixed-CP baseline with cost-aware DP assignment/packing?
  • Can the cost model be calibrated for non-ring CP backends such as plain all-gather or Ulysses-style all-to-all, and how sensitive is FCP’s allocation to this backend choice?
  • What exactly does the "micro-batch planner" in Figure 2 do beyond standard global-batch-to-microbatch chunking?
Limitations
  • FSDP support in hybrid meshes is unclear. FCP reconfigures only CP groups while keeping other parallel dimensions fixed, so it does not directly support common FSDP x CP x Megatron-TP meshes where parameters/optimizer states are sharded over the DP/FSDP axis. The paper should state this scope limitation more explicitly.
Final justification

I would like to keep my positive score. The author's rebuttal directly addressed my concern by adding a cost-aware fixed-CP baseline, and FCP still shows clear gains over it. The responses also clarify backend adaptability and the micr-batch planner. My remaining concern is the lack of practical validation for FSDP x CP x TP mesh and non-ring backends, but these do not overturn the main contribution or the added baseline evidence.

Formatting concerns

No.

2 comments
Authors · CommentOpenReview ↗

Response to Reviewer vgF9

Thank you for taking the time to review our paper and for providing valuable feedback. We sincerely appreciate your effort. We would like to address your questions and concerns below.

Weakness 1 & Question 2: Missing cost-aware fixed-CP baseline. A stronger baseline would keep CP fixed but assign/pack samples across DP ranks using an estimated cost such as ∑iLi2/CP+comm(Li)\sum_i L_i^2 / \mathrm{CP} + \mathrm{comm}(L_i).

Thanks for the valuable suggestion. We uses ∑iLi2/CP+comm(Li)\sum_i L_i^2 / \mathrm{CP} + \mathrm{comm}(L_i) as the cost of the CP group. We sort all sequences in descending order based on the estimated sequence-level cost Li2/CP+comm(Li)L_i^2 / \mathrm{CP} + \mathrm{comm}(L_i). Then each sequence is placed into the CP group (while checking the memory constraints) with the lowest current group load at each step. We conducted the experiment using two sizes of the Qwen3 model across three datasets with a batch size of 512 and a cluster size of 64. The results are as follows:

Model Dataset Megatron-LM Fixed CP + cost-aware packing FCP
Qwen3-4B GitHub 1.00× 1.20× 1.36×
CommonCrawl 1.00× 1.12× 1.29×
Wikipedia 1.00× 1.08× 1.20×
Qwen3-8B GitHub 1.00× 1.30× 1.45×
CommonCrawl 1.00× 1.23× 1.38×
Wikipedia 1.00× 1.17× 1.28×

FCP uses dynamic CP degrees to reduce redundant communication overhead—specifically, the redundant communication overhead incurred by packing massive short sequences under a fixed CP length setting.

Question 1: How should FCP be adapted to common FSDP × CP × TP hybrid meshes where parameters, gradients, and optimizer states are sharded across the DP/FSDP axis?

This is an interesting question. We believe that FCP, TP, and FSDP are theoretically compatible, though this may require practical testing. We illustrate this compatibility from the perspective of TP and FSDP respectively:

TP support is relatively straightforward because the TP dimension is orthogonal to both CP and FSDP. FCP can treat an entire TP group, rather than an individual rank, as one scheduling unit; the TP configuration and membership remain unchanged while FCP adjusts the CP layout.

FSDP requires additional consideration because it performs a mandatory weight all-gather before each forward pass. We distinguish two cases:

  • An FSDP group contained within one CP group. This case is naturally compatible with FCP. Since CP balances the work among ranks within the CP group, the FSDP collective does not introduce additional cross-CP synchronization overhead.
  • An FSDP group spanning multiple CP groups. The pre-forward all-gather can make a faster CP group wait briefly for a slower one. However, FCP explicitly minimizes the load difference across CP groups, so this waiting time is bounded by the residual inter-group imbalance. As the slowest CP group already determines the iteration makespan even without FSDP, the cross-group collective therefore does not create a new bottleneck beyond that residual imbalance.

Therefore, we believe that FCP can be naturally compatible with TP and FSDP without introducing additional overhead. The current code framework does not need to be significantly adjusted, but this requires further practical verification.

Question 3: Can the cost model be calibrated for non-ring CP backends such as plain all-gather or Ulysses-style all-to-all, and how sensitive is FCP's allocation to this backend choice?

Yes. FCP natively supports various CP backends. FCP only requires adjusting the communication cost model to suit a specific backend. For instance, the Ulysses backend employs synchronous all-gather collective communication, requiring the cost model's formulation to be adjusted accordingly. The profiler also collects actual runtime data to fit the corresponding cost model prior to each training run. In this way, FCP ensures the accuracy of the cost model for different CP backends in terms of both the model's mathematical form and its coefficients.

We observe that the FCP allocation strategy is correlated with the choice of backend. This is primarily because different CP backends impose varying requirements on CP sizes (e.g., the Ulysses-style backend requires CP sizes to be powers of two, whereas Ring CP has no such restriction) and employ different collective communication operations, which influence the formulation of the communication cost model. We conducted an ablation study using non-power-of-two CP sizes; please refer to our response regarding "Weakness 1" raised by Reviewer xLp8. FCP still achieves better performance compared to static CP.

Question 4: What exactly does the "micro-batch planner" in Figure 2 do beyond standard global-batch-to-microbatch chunking?

Our micro-batch planner is the same as the standard global-batch-to-microbatch chunking. This component still has room for further optimization.

Authors · CommentOpenReview ↗

Dear Reviewer,

We sincerely appreciate your thoughtful review. We would be truly grateful for any further feedback you may have. If any concerns remain unaddressed, we would be more than happy to provide further clarification.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…