|
| 1 | +# Copyright 2026 FlagOS Contributors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +defaults: |
| 16 | + - data |
| 17 | + |
| 18 | +data: |
| 19 | + data_path: /opt/flagscale/test_data/pile_wikipedia_demo |
| 20 | + tokenizer: |
| 21 | + tokenizer_path: /home/gitlab-runner/data/Qwen3-4B |
| 22 | + |
| 23 | +system: |
| 24 | + # torch_npu maps Megatron's supported NCCL choice to HCCL on Ascend. |
| 25 | + distributed_backend: nccl |
| 26 | + tensor_model_parallel_size: 1 |
| 27 | + pipeline_model_parallel_size: 1 |
| 28 | + disable_bias_linear: true |
| 29 | + reset_position_ids: true |
| 30 | + reset_attention_mask: true |
| 31 | + qk_layernorm: true |
| 32 | + use_distributed_optimizer: false |
| 33 | + precision: |
| 34 | + bf16: true |
| 35 | + attention_softmax_in_fp32: true |
| 36 | + accumulate_allreduce_grads_in_fp32: true |
| 37 | + logging: |
| 38 | + log_interval: 1 |
| 39 | + no_log_loss_scale_to_tensorboard: true |
| 40 | + checkpoint: |
| 41 | + no_save_optim: true |
| 42 | + no_save_rng: true |
| 43 | + no_load_optim: true |
| 44 | + no_load_rng: true |
| 45 | + save_interval: 100000 |
| 46 | + ckpt_format: torch |
| 47 | + tensorboard_log_interval: 999999 |
| 48 | + |
| 49 | +model: |
| 50 | + deterministic_mode: true |
| 51 | + transformer_impl: transformer_engine |
| 52 | + attention_backend: unfused |
| 53 | + te_fl_prefer: reference |
| 54 | + te_fl_per_op: "rmsnorm_fwd=reference" |
| 55 | + te_fl_allow_vendors: "npu" |
| 56 | + te_fl_deny_vendors: "cuda" |
| 57 | + enable_flag_gems: false |
| 58 | + no_persist_layer_norm: true |
| 59 | + no_masked_softmax_fusion: true |
| 60 | + no_check_for_nan_in_loss_and_grad: false |
| 61 | + no_gradient_accumulation_fusion: true |
| 62 | + num_layers: 28 |
| 63 | + hidden_size: 1024 |
| 64 | + ffn_hidden_size: 3072 |
| 65 | + kv_channels: 128 |
| 66 | + num_attention_heads: 16 |
| 67 | + group_query_attention: true |
| 68 | + num_query_groups: 8 |
| 69 | + seq_length: 256 |
| 70 | + max_position_embeddings: 40960 |
| 71 | + norm_epsilon: 1e-6 |
| 72 | + use_rotary_position_embeddings: true |
| 73 | + rotary_base: 1000000 |
| 74 | + no_rope_fusion: true |
| 75 | + swiglu: true |
| 76 | + normalization: RMSNorm |
| 77 | + untie_embeddings_and_output_weights: false |
| 78 | + no_position_embedding: true |
| 79 | + init_method_std: 0.006 |
| 80 | + attention_dropout: 0.0 |
| 81 | + hidden_dropout: 0.0 |
| 82 | + clip_grad: 1.0 |
| 83 | + train_iters: 10 |
| 84 | + eval_iters: 0 |
| 85 | + eval_interval: 1000 |
| 86 | + micro_batch_size: 1 |
| 87 | + global_batch_size: 2 |
| 88 | + seed: 42 |
| 89 | + |
| 90 | + optimizer: |
| 91 | + weight_decay: 0.1 |
| 92 | + adam_beta1: 0.9 |
| 93 | + adam_beta2: 0.95 |
| 94 | + lr_scheduler: |
| 95 | + lr: 1.0e-5 |
| 96 | + min_lr: 1.0e-6 |
| 97 | + lr_warmup_samples: 0 |
| 98 | + lr_warmup_fraction: 0.01 |
| 99 | + lr_decay_style: cosine |
0 commit comments