Skip to content

Commit 09e1ca1

Browse files
lxd-cumtclaudeheavyrain-lzy
authored
FlagScale Train Upgrade: Synchronization with Megatron-LM Core0.17.0 (#1193)
**FlagScale Training Upgrade** Sync FlagScale training layer with upstream Megatron-LM core_r0.17.0. Key changes: - Replace training/ and legacy/ with upstream 0.17.0 content, then re-apply FlagScale patches - Unify tokenizer system with registration-based factory dispatch, remove legacy_tokenizer flag - Replace torch.cuda calls with cur_platform abstraction in training/models - Sync arguments.py with upstream FP4 param gather changes, guard hetero-specific args - Fix loss accumulator reset bug (halved lm_loss at iter 2) - Remove FlagScale-forked Muon optimizer code, use upstream 0.17.0 implementation - Remove stale moe_use_legacy_grouped_gemm references - Found that test_train_robobrain_x0.py was leaking MagicMock objects into sys.modules during collection, breaking test_parallel_context.py. Applied the fix by restoring modules immediately after import instead of deferring cleanup. --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: heavyrain <1528794076@qq.com>
1 parent b65bca6 commit 09e1ca1

137 files changed

Lines changed: 5683 additions & 9769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ folder to get started.
4949
pip install -U scikit-build-core==0.11 pybind11 ninja cmake
5050
git clone https://github.com/flagos-ai/FlagGems
5151
cd FlagGems
52-
pip install --no-build-isolation .
52+
pip install --no-build-isolation .
5353
```
5454
See more details in [FlagGems](https://github.com/flagos-ai/FlagGems)
5555

examples/aquila/conf/train/1_8b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ model:
6060
clip_grad: 1.0
6161
train_samples: 8192 #8192 #29297664 #120B tokens 100step
6262
eval_iters: 0
63+
eval_interval: 1000
6364
micro_batch_size: 8
6465
global_batch_size: 1024
6566
seed: 42

examples/aquila/conf/train/3b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ model:
6868
clip_grad: 1.0
6969
train_samples: 244141056 #1TB tokens #29297664 #120B tokens
7070
eval_iters: 0
71+
eval_interval: 1000
7172
micro_batch_size: 2
7273
global_batch_size: 2048
7374
seed: 42

examples/aquila/conf/train/7b.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ model:
3939
clip_grad: 1.0
4040
train_samples: 1002539063
4141
eval_iters: 0
42+
eval_interval: 1000
4243
micro_batch_size: 2
4344
global_batch_size: 1728
4445
seed: 1234
@@ -57,7 +58,6 @@ data:
5758
data_path: ${data_path:??}
5859
split: 1
5960
tokenizer:
60-
legacy_tokenizer: true
6161
tokenizer_type: AquilaTokenizerFS
6262
vocab_file: ./examples/aquila/tokenizer/vocab.json
6363
merge_file: ./examples/aquila/tokenizer/merges.txt

examples/deepseek_v3/conf/train/11b_a2b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ model:
9090
micro_batch_size: 1
9191
global_batch_size: 256
9292
eval_iters: 0
93+
eval_interval: 1000
9394
train_samples: 244141056 #1T #29297664 #120B tokens
9495

9596
optimizer:

examples/deepseek_v3/conf/train/16b_a3b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ model:
8989
micro_batch_size: 1
9090
global_batch_size: 128 #2048
9191
eval_iters: 0
92+
eval_interval: 1000
9293
train_iters: 102400
9394

9495
optimizer:

examples/deepseek_v3/conf/train/16b_a3b_finetune.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ model:
8888
micro_batch_size: 1
8989
global_batch_size: 128 #2048
9090
eval_iters: 0
91+
eval_interval: 1000
9192
train_iters: 102400
9293

9394
# lora finetune

examples/deepseek_v3/conf/train/engram.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ model:
120120
micro_batch_size: 2
121121
global_batch_size: 2048
122122
eval_iters: 0
123+
eval_interval: 1000
123124
train_iters: 20
124125

125126
optimizer:
@@ -142,7 +143,6 @@ data:
142143
split: 1
143144
no_mmap_bin_files: true
144145
tokenizer:
145-
legacy_tokenizer: true
146146
tokenizer_type: QwenTokenizerFS
147147
tokenizer_path: /workspace/qwentokenizer
148148
vocab_size: 151851

examples/llava_onevision/conf/train/1_5b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ model:
5050
profile_ranks: 7
5151
use_pytorch_profiler: True
5252
eval_iters: 0
53+
eval_interval: 1000
5354
micro_batch_size: 2
5455
global_batch_size: 512
5556
allow_missing_vision_projection_checkpoint: True

examples/llava_onevision/conf/train/7b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ model:
4444
clip_grad: 1.0
4545
train_iters: 625
4646
eval_iters: 0
47+
eval_interval: 1000
4748
micro_batch_size: 1
4849
global_batch_size: 320
4950
allow_missing_vision_projection_checkpoint: True

0 commit comments

Comments
 (0)