ms-swift icon indicating copy to clipboard operation
ms-swift copied to clipboard

请帮我用 Megatron 为 qwen3-30b-a3b-instruct-2507 训练一个 LoRA

Open swagdowdlez opened this issue 1 year ago • 5 comments

我过去几周一直在尝试用 Megatron 为 qwen3-moe 训练 LoRA,但一直没有进展。

我完全按照说明操作。

我使用了两张 A100 SXM。

安装了 ms-swift。

然后我严格按照以下两篇文章的内容来做:

https://swift.readthedocs.io/zh-cn/latest/GetStarted/SWIFT安装.html

https://swift.readthedocs.io/zh-cn/latest/GetStarted/快速开始.html#id3

但不管怎么样我还是不断报错。我一直尝试用 AI 调试这些错误来解决问题,但完全没有接近成功的迹象。这已经快四周了,我在其他方法(比如 unsloth、llama-factory、trl、oumi 等)上也尝试过,但仍然没有任何进展。

swagdowdlez avatar Sep 04 '25 15:09 swagdowdlez

报错信息发一下

https://swift.readthedocs.io/zh-cn/latest/Megatron-SWIFT/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B.html

Jintao-Huang avatar Sep 04 '25 16:09 Jintao-Huang

报错信息发一下

root@885babbd6e48:/workspace# pip install ms-swift -U
(installed ms-swift 3.7.3 and dependencies)

root@885babbd6e48:/workspace# python -m pip install --upgrade pip
(installed pip 25.2)

pip install pybind11
(installed pybind11 3.0.1)

pip install --no-build-isolation transformer_engine[pytorch]
(downloaded transformer_engine 2.6.0.post1 and transformer_engine_cu12 2.6.0.post1, building transformer_engine_torch wheel, completion not shown)

git clone https://github.com/NVIDIA/apex
cd apex
git checkout e13873debc4699d39c6861074b9a3b2a02327f92
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./

pip install git+https://github.com/NVIDIA/Megatron-LM.git@core_r0.13.0
(installed everything)


root@885babbd6e48:/workspace/apex# WORKDIR=/workspace MODELDIR=$WORKDIR/Qwen3-0.6b-mcore OUTDIR=$WORKDIR/output DATASET=$WORKDIR/81norm.jsonl mkdir -p "$WORKDIR" "$MODELDIR" "$OUTDIR" # (optional) sanity: pin compatible libs if needed # pip install -U "ms-swift>=3.7.3" # pip install "flash-attn<=2.8.1,>=2.1.1" "transformer_engine[pytorch]" # 1) Export HF Qwen3-0.6B -> Megatron (mcore) weights swift export \ --model Qwen/Qwen3-0.6b \ --to_mcore true \ --torch_dtype bfloat16 \ --output_dir "$MODELDIR" \ --use_hf true \ --exist_ok true run sh: /usr/bin/python /usr/local/lib/python3.11/dist-packages/swift/cli/export.py --model Qwen/Qwen3-0.6b --to_mcore true --torch_dtype bfloat16 --output_dir /workspace/Qwen3-0.6b-mcore --use_hf true --exist_ok true [INFO:swift] Successfully registered /usr/local/lib/python3.11/dist-packages/swift/llm/dataset/data/dataset_info.json. [INFO:swift] rank: 0, local_rank: 0, world_size: 1, local_world_size: 1 [INFO:swift] Downloading the model from HuggingFace Hub, model_id: Qwen/Qwen3-0.6b LICENSE: 11.3kB [00:00, 2.90MB/s] | 0/9 [00:00<?, ?it/s] config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 726/726 [00:00<00:00, 3.60MB/s] tokenizer_config.json: 9.73kB [00:00, 17.5MB/s] | 0.00/726 [00:00<?, ?B/s] merges.txt: 1.67MB [00:00, 99.3MB/s] ?B/s] .gitattributes: 1.57kB [00:00, 8.17MB/s] README.md: 14.0kB [00:00, 52.3MB/s]██████▊ | 1/9 [00:00<00:02, 3.20it/s] generation_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 239/239 [00:00<00:00, 2.29MB/s] vocab.json: 2.78MB [00:00, 80.9MB/s] tokenizer.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:00<00:00, 25.5MB/s] Fetching 9 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 12.76it/s] [INFO:swift] Loading the model using model_dir: /root/.cache/huggingface/hub/models--Qwen--Qwen3-0.6b/snapshots/c1899de289a04d12100db370d81485cdf75e47ca [INFO:swift] Setting args.lazy_tokenize: False [INFO:swift] args.output_dir: /workspace/Qwen3-0.6b-mcore [INFO:swift] Global seed set to 42 [INFO:swift] args: ExportArguments(model='Qwen/Qwen3-0.6b', model_type='qwen3', model_revision=None, task_type='causal_lm', torch_dtype=torch.bfloat16, attn_impl=None, new_special_tokens=[], num_labels=None, problem_type=None, rope_scaling=None, device_map=None, max_memory={}, max_model_len=None, local_repo_path=None, init_strategy=None, template='qwen3', system=None, max_length=2048, truncation_strategy='delete', max_pixels=None, agent_template=None, norm_bbox=None, use_chat_template=True, padding_free=False, padding_side='right', loss_scale='default', sequence_parallel_size=1, response_prefix=None, template_backend='swift', dataset=[], val_dataset=[], split_dataset_ratio=0.0, data_seed=42, dataset_num_proc=1, load_from_cache_file=True, dataset_shuffle=True, val_dataset_shuffle=False, streaming=False, interleave_prob=None, stopping_strategy='first_exhausted', shuffle_buffer_size=1000, download_mode='reuse_dataset_if_exists', columns={}, strict=False, remove_unused_columns=True, model_name=None, model_author=None, custom_dataset_info=[], quant_method=None, quant_bits=None, hqq_axis=None, bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_quant_type='nf4', bnb_4bit_use_double_quant=True, bnb_4bit_quant_storage=None, max_new_tokens=None, temperature=None, top_k=None, top_p=None, repetition_penalty=None, num_beams=1, stream=False, stop_words=[], logprobs=False, top_logprobs=None, ckpt_dir=None, lora_modules=[], tuner_backend='peft', train_type='lora', adapters=[], external_plugins=[], seed=42, model_kwargs={}, load_args=True, load_data_args=False, packing=False, lazy_tokenize=False, cached_dataset=[], custom_register_path=[], use_hf=True, hub_token=None, ddp_timeout=18000000, ddp_backend=None, ignore_args_error=False, use_swift_lora=False, merge_lora=False, safe_serialization=True, max_shard_size='5GB', output_dir='/workspace/Qwen3-0.6b-mcore', quant_n_samples=256, quant_batch_size=1, group_size=128, to_cached_dataset=False, to_ollama=False, to_mcore=True, to_hf=False, mcore_model=None, mcore_adapters=[], thread_count=None, test_convert_precision=False, push_to_hub=False, hub_model_id=None, hub_private_repo=False, commit_message='update files', to_peft_format=False, exist_ok=True) [INFO:swift] Start time of running main: 2025-09-04 18:07:09.122975 [INFO:swift] swift.__version__: 3.7.3 [INFO:swift] Run the command: git -C /root/.cache/modelscope/hub/_github clone https://github.com/NVIDIA/Megatron-LM.git Megatron-LM --branch core_r0.13.0 Cloning into 'Megatron-LM'... remote: Enumerating objects: 62743, done. remote: Counting objects: 100% (1555/1555), done. remote: Compressing objects: 100% (536/536), done. remote: Total 62743 (delta 1274), reused 1034 (delta 1019), pack-reused 61188 (from 2) Receiving objects: 100% (62743/62743), 27.02 MiB | 2.39 MiB/s, done. Resolving deltas: 100% (43627/43627), done. [rank0]:[W904 18:07:22.855397941 ProcessGroupNCCL.cpp:4721] [PG ID 0 PG GUID 0 Rank 0] using GPU 0 as device used by this process is currently unknown. This can potentially cause a hang if this rank to GPU mapping is incorrect. You can pecify device_id in init_process_group() to force use of a particular device. [INFO:swift] local_repo_path: /root/.cache/modelscope/hub/_github/Megatron-LM [INFO:swift] Patch apply_rotary_pos_emb successfully applied. [INFO:swift] Patch _SplitAlongDim successfully applied. [INFO:swift] Patch FileSystemReader successfully applied. [INFO:swift] Patch peft successfully applied. [INFO:swift] megatron.core.__version__: 0.13.2 [INFO:swift] Downloading the model from HuggingFace Hub, model_id: Qwen/Qwen3-0.6b model.safetensors: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.50G/1.50G [00:01<00:00, 1.00GB/s] Fetching 10 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:01<00:00, 5.68it/s] [INFO:swift] Loading the model using model_dir: /root/.cache/huggingface/hub/models--Qwen--Qwen3-0.6b/snapshots/c1899de289a04d12100db370d81485cdf75e47ca [INFO:swift] Patch tp_plan. [INFO:swift] model_kwargs: {'device_map': 'auto'} [INFO:swift] default_system: None [INFO:swift] max_length: 2048 [INFO:swift] response_prefix: '' [INFO:swift] agent_template: hermes [INFO:swift] megatron_config: {'num_layers': 28, 'hidden_size': 1024, 'ffn_hidden_size': 3072, 'num_attention_heads': 16, 'num_query_groups': 8, 'max_position_embeddings': 40960, 'norm_epsilon': 1e-06, 'rotary_base': 1000000, 'padded_vocab_size': 151936, 'attention_dropout': 0.0, 'untie_embeddings_and_output_weights': False, 'swiglu': True, 'add_qkv_bias': False, 'kv_channels': 128, 'architectures': 'Qwen3ForCausalLM', 'qk_layernorm': True} [INFO:swift] Setting args.no_rope_fusion: False. using world size: 1, data-parallel size: 1, context-parallel size: 1, hierarchical context-parallel sizes: None, tensor-model-parallel size: 1, encoder-tensor-model-parallel size: 0, pipeline-model-parallel size: 1, encoder-pipeline-model-parallel size: 0 Number of virtual stages per pipeline stage: None accumulate and all-reduce gradients in fp32 for bfloat16 data type. using torch.bfloat16 for parameters ... ------------------------ arguments ------------------------ account_for_embedding_in_pipeline_split ......... False account_for_loss_in_pipeline_split .............. False accumulate_allreduce_grads_in_fp32 .............. True adam_beta1 ...................................... 0.9 adam_beta2 ...................................... 0.95 adam_eps ........................................ 1e-08 adapter_load .................................... None add_bias_linear ................................. False add_position_embedding .......................... True add_qkv_bias .................................... False adlr_autoresume ................................. False adlr_autoresume_interval ........................ 1000 align_grad_reduce ............................... True align_param_gather .............................. False wandb_project ................................... wandb_save_dir .................................. weight_decay .................................... 0.1 weight_decay_incr_style ......................... constant wgrad_deferral_limit ............................ 0 world_size ...................................... 1 yaml_cfg ........................................ None -------------------- end of arguments --------------------- INFO:megatron.core.num_microbatches_calculator:setting number of microbatches to constant 16 > setting tensorboard ... WARNING: one_logger package is required to enable e2e metrics tracking. please go to https://confluence.nvidia.com/display/MLWFO/Package+Repositories for details to install it WARNING:megatron.core.rerun_state_machine:RerunStateMachine initialized in mode RerunMode.DISABLED torch distributed is already initialized, skipping initialization ... > initialized tensor model parallel with size 1 > initialized pipeline model parallel with size 1 > setting random seeds to 42 ... > compiling dataset index builder ... make: Entering directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets' make: python3-config: No such file or directory make: python3-config: No such file or directory g++ -O3 -Wall -shared -std=c++11 -fPIC -fdiagnostics-color -I/usr/include/python3.11 -I/usr/local/lib/python3.11/dist-packages/pybind11/include helpers.cpp -o helpers_cpp In file included from helpers.cpp:12: /usr/local/lib/python3.11/dist-packages/pybind11/include/pybind11/numpy.h: In function ‘void build_exhaustive_blending_indices(pybind11::array_t<short int>&, pybind11::array_t<long int>&, const pybind11::array_t<long int>&, int32_t)’: /usr/local/lib/python3.11/dist-packages/pybind11/include/pybind11/numpy.h:633:14: warning: ‘error_argmax’ may be used uninitialized in this function [-Wmaybe-uninitialized] 633 | return i * strides[Dim] + byte_offset_unsafe<Dim + 1>(strides, index...); | ~~^~~~~~~~~~ helpers.cpp:49:13: note: ‘error_argmax’ was declared here 49 | int64_t error_argmax; | ^~~~~~~~~~~~ make: Leaving directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets' >>> done with dataset index builder. Compilation time: 5.914 seconds WARNING: constraints for invoking optimized fused softmax kernel are not met. We default back to unfused kernel invocations. > compiling and loading fused kernels ... >>> done with compiling and loading fused kernels. Compilation time: 0.004 seconds building GPT model ... /root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_config.py:837: UserWarning: If you are using transformer_engine as the transformer implementation, the core_attn is from transformer_engine and may be the fused version. For fused attention, you have no need to set 'core_attn' to recompute. Please check that the core_attn recompute is really needed. warnings.warn( /root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:102: UserWarning: The fp8 argument in "get_gpt_layer_with_transformer_engine_spec" has been deprecated and will be removed soon. Please update your code accordingly. warnings.warn( /usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/cpu_offload.py:673: DeprecationWarning: Offloading weights is deprecated. Using offload_weights=True does not have any effect. warnings.warn( [INFO:swift] Megatron model created successfully. [INFO:swift] Successfully transferred HF model weights to MG model. [INFO:swift] The ExportArguments will be saved in: /workspace/Qwen3-0.6b-mcore/args.json saving checkpoint at iteration 1 to /workspace/Qwen3-0.6b-mcore in torch_dist format Storing distributed optimizer sharded state of type fully_sharded_model_space [INFO:swift] Successfully registered /usr/local/lib/python3.11/dist-packages/swift/llm/dataset/data/dataset_info.json. successfully saved checkpoint from iteration 1 to /workspace/Qwen3-0.6b-mcore [ t 1/1, p 1/1 ] [INFO:swift] Successfully saved Megatron model weights in /workspace/Qwen3-0.6b-mcore. [INFO:swift] End time of running main: 2025-09-04 18:07:43.618503 [rank0]:[W904 18:07:45.097280534 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator()) root@885babbd6e48:/workspace/apex# 




-------------------- end of arguments ---------------------
INFO:megatron.core.num_microbatches_calculator:setting number of microbatches to constant 16
> setting tensorboard ...
WARNING: one_logger package is required to enable e2e metrics tracking. please go to https://confluence.nvidia.com/display/MLWFO/Package+Repositories for details to install it
WARNING:megatron.core.rerun_state_machine:RerunStateMachine initialized in mode RerunMode.DISABLED
torch distributed is already initialized, skipping initialization ...
> initialized tensor model parallel with size 1
> initialized pipeline model parallel with size 1
> setting random seeds to 42 ...
> compiling dataset index builder ...
make: Entering directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets'
make: python3-config: No such file or directory
make: python3-config: No such file or directory
make: Nothing to be done for 'default'.
make: Leaving directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets'
>>> done with dataset index builder. Compilation time: 0.003 seconds
WARNING: constraints for invoking optimized fused softmax kernel are not met. We default back to unfused kernel invocations.
> compiling and loading fused kernels ...
>>> done with compiling and loading fused kernels. Compilation time: 0.003 seconds
time to initialize megatron (seconds): 12.201
[after megatron is initialized] datetime: 2025-09-04 18:10:33 
building GPT model ...
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_config.py:837: UserWarning: If you are using transformer_engine as the transformer implementation, the core_attn is from transformer_engine and may be the fused version. For fused attention, you have no need to set 'core_attn' to recompute. Please check that the core_attn recompute is really needed.
  warnings.warn(
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:102: UserWarning: The fp8 argument in "get_gpt_layer_with_transformer_engine_spec" has been deprecated and will be removed soon. Please update your code accordingly.
  warnings.warn(
/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/cpu_offload.py:673: DeprecationWarning: Offloading weights is deprecated. Using offload_weights=True does not have any effect.
  warnings.warn(
[INFO:swift] model: GPTModel(
  (embedding): LanguageModelEmbedding(
    (word_embeddings): VocabParallelEmbedding()
    (embedding_dropout): Dropout(p=0.0, inplace=False)
  )
  (rotary_pos_emb): RotaryEmbedding()
  (decoder): TransformerBlock(
    (layers): ModuleList(
      (0-27): 28 x TransformerLayer(
        (input_layernorm): IdentityOp()
        (self_attention): SelfAttention(
          (core_attention): TEDotProductAttention(
            (flash_attention): FlashAttention()
            (fused_attention): FusedAttention()
            (unfused_attention): UnfusedDotProductAttention(
              (scale_mask_softmax): FusedScaleMaskSoftmax()
              (attention_dropout): Dropout(p=0.0, inplace=False)
            )
          )
          (linear_proj): TERowParallelLinear(in_features=2048, out_features=1024, bias=False, TP=1)
          (linear_qkv): TELayerNormColumnParallelLinear(in_features=1024, out_features=4096, bias=False, TP=1)
          (q_layernorm): RMSNorm()
          (k_layernorm): RMSNorm()
        )
        (pre_cross_attn_layernorm): IdentityOp()
        (cross_attention): IdentityOp()
        (cross_attn_bda): IdentityFuncOp()
        (pre_mlp_layernorm): IdentityOp()
        (mlp): MLP(
          (linear_fc1): TELayerNormColumnParallelLinear(in_features=1024, out_features=6144, bias=False, TP=1)
          (linear_fc2): TERowParallelLinear(in_features=3072, out_features=1024, bias=False, TP=1)
        )
      )
    )
    (final_layernorm): RMSNorm()
  )
  (output_layer): ColumnParallelLinear(in_features=1024, out_features=151936, bias=False, TP=1)
)
[INFO:swift] [rank0] model_parameter_info: GPTModel: 596.0499M Params (596.0499M Trainable [100.0000%]), 0.0000M Buffers.
 > number of parameters on (tensor, pipeline) model parallel rank (0, 0): 596049920
INFO:megatron.core.distributed.distributed_data_parallel:Setting up DistributedDataParallel with config DistributedDataParallelConfig(grad_reduce_in_fp32=True, overlap_grad_reduce=False, overlap_param_gather=False, align_param_gather=False, use_distributed_optimizer=True, num_distributed_optimizer_instances=1, check_for_nan_in_grad=True, check_for_large_grads=False, bucket_size=None, pad_buckets_for_high_nccl_busbw=False, average_in_collective=False, fp8_param_gather=False, reuse_grad_buf_for_mxfp8_param_ag=False, use_custom_fsdp=False, data_parallel_sharding_strategy='no_shard', gradient_reduce_div_fusion=True, suggested_communication_unit_size=None, preserve_fp32_weights=True, keep_fp8_transpose_cache_when_using_custom_fsdp=False, nccl_ub=False, fsdp_double_buffer=False)
INFO:megatron.core.distributed.param_and_grad_buffer:Number of buckets for gradient all-reduce / reduce-scatter: 1
Params for bucket 1 (596049920 elements, 596049920 padded size):
        module.decoder.layers.5.mlp.linear_fc2.weight
        module.decoder.layers.1.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.25.mlp.linear_fc1.weight
        module.decoder.layers.27.self_attention.linear_proj.weight
        module.decoder.layers.20.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.16.self_attention.q_layernorm.weight
        module.decoder.layers.16.self_attention.linear_qkv.weight
        module.decoder.layers.15.self_attention.k_layernorm.weight
        module.decoder.layers.13.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.11.mlp.linear_fc2.weight
        module.decoder.layers.9.mlp.linear_fc2.weight
        module.decoder.layers.7.self_attention.linear_proj.weight
        module.decoder.layers.5.self_attention.linear_qkv.weight
        module.embedding.word_embeddings.weight
        module.decoder.layers.2.self_attention.q_layernorm.weight
        module.decoder.layers.22.self_attention.k_layernorm.weight
        module.decoder.layers.18.mlp.linear_fc2.weight
        module.decoder.layers.25.self_attention.q_layernorm.weight
        module.decoder.layers.25.self_attention.linear_qkv.weight
        module.decoder.layers.23.self_attention.q_layernorm.weight
        module.decoder.layers.20.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.23.self_attention.linear_qkv.weight
        module.decoder.layers.16.self_attention.linear_proj.weight
        module.decoder.layers.14.mlp.linear_fc1.weight
        module.decoder.layers.11.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.2.mlp.linear_fc1.weight
        module.decoder.layers.3.self_attention.k_layernorm.weight
        module.decoder.layers.4.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.1.self_attention.k_layernorm.weight
        module.decoder.layers.18.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.21.mlp.linear_fc1.weight
        module.decoder.layers.27.mlp.linear_fc2.weight
        module.decoder.layers.25.self_attention.linear_proj.weight
        module.decoder.layers.24.self_attention.k_layernorm.weight
        module.decoder.layers.23.self_attention.linear_proj.weight
        module.decoder.layers.14.self_attention.q_layernorm.weight
        module.decoder.layers.14.self_attention.linear_qkv.weight
        module.decoder.layers.13.self_attention.k_layernorm.weight
        module.decoder.layers.11.self_attention.k_layernorm.weight
        module.decoder.layers.3.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.k_layernorm.weight
        module.decoder.layers.4.self_attention.linear_proj.weight
        module.decoder.layers.1.self_attention.q_layernorm.weight
        module.decoder.layers.21.self_attention.q_layernorm.weight
        module.decoder.layers.21.self_attention.linear_qkv.weight
        module.decoder.layers.27.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.20.self_attention.k_layernorm.weight
        module.decoder.layers.18.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.16.mlp.linear_fc2.weight
        module.decoder.layers.14.self_attention.linear_proj.weight
        module.decoder.layers.12.mlp.linear_fc1.weight
        module.decoder.layers.7.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.6.self_attention.q_layernorm.weight
        module.decoder.layers.5.mlp.linear_fc1.weight
        module.decoder.layers.5.self_attention.k_layernorm.weight
        module.decoder.layers.0.self_attention.k_layernorm.weight
        module.decoder.layers.6.mlp.linear_fc2.weight
        module.decoder.layers.27.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.25.mlp.linear_fc2.weight
        module.decoder.layers.24.self_attention.linear_proj.weight
        module.decoder.layers.19.mlp.linear_fc1.weight
        module.decoder.layers.21.self_attention.linear_proj.weight
        module.decoder.layers.16.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.12.self_attention.q_layernorm.weight
        module.decoder.layers.12.self_attention.linear_qkv.weight
        module.decoder.layers.10.self_attention.q_layernorm.weight
        module.decoder.layers.10.self_attention.linear_qkv.weight
        module.decoder.layers.5.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc2.weight
        module.decoder.layers.7.mlp.linear_fc1.weight
        module.decoder.layers.6.self_attention.linear_qkv.weight
        module.decoder.layers.2.mlp.linear_fc2.weight
        module.decoder.layers.19.self_attention.q_layernorm.weight
        module.decoder.final_layernorm.weight
        module.decoder.layers.25.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.23.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.19.self_attention.linear_qkv.weight
        module.decoder.layers.18.self_attention.k_layernorm.weight
        module.decoder.layers.16.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.14.mlp.linear_fc2.weight
        module.decoder.layers.12.self_attention.linear_proj.weight
        module.decoder.layers.10.self_attention.linear_proj.weight
        module.decoder.layers.9.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.5.self_attention.linear_proj.weight
        module.decoder.layers.8.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc1.weight
        module.decoder.layers.2.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.2.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.linear_proj.weight
        module.decoder.layers.21.mlp.linear_fc2.weight
        module.decoder.layers.27.self_attention.k_layernorm.weight
        module.decoder.layers.25.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.23.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.19.self_attention.linear_proj.weight
        module.decoder.layers.17.mlp.linear_fc1.weight
        module.decoder.layers.14.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.8.self_attention.q_layernorm.weight
        module.decoder.layers.8.self_attention.linear_qkv.weight
        module.decoder.layers.7.self_attention.k_layernorm.weight
        module.decoder.layers.4.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.11.self_attention.q_layernorm.weight
        module.decoder.layers.6.self_attention.k_layernorm.weight
        module.decoder.layers.1.self_attention.linear_proj.weight
        module.decoder.layers.21.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.26.mlp.linear_fc1.weight
        module.decoder.layers.17.self_attention.q_layernorm.weight
        module.decoder.layers.17.self_attention.linear_qkv.weight
        module.decoder.layers.16.self_attention.k_layernorm.weight
        module.decoder.layers.14.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.12.mlp.linear_fc2.weight
        module.decoder.layers.10.mlp.linear_fc1.weight
        module.decoder.layers.8.self_attention.linear_proj.weight
        module.decoder.layers.6.mlp.linear_fc1.weight
        module.decoder.layers.0.self_attention.linear_proj.weight
        module.decoder.layers.4.mlp.linear_fc2.weight
        module.decoder.layers.2.self_attention.k_layernorm.weight
        module.decoder.layers.23.self_attention.k_layernorm.weight
        module.decoder.layers.26.self_attention.q_layernorm.weight
        module.decoder.layers.26.self_attention.linear_qkv.weight
        module.decoder.layers.25.self_attention.k_layernorm.weight
        module.decoder.layers.23.mlp.linear_fc2.weight
        module.decoder.layers.19.mlp.linear_fc2.weight
        module.decoder.layers.21.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.17.self_attention.linear_proj.weight
        module.decoder.layers.15.mlp.linear_fc1.weight
        module.decoder.layers.12.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.mlp.linear_fc2.weight
        module.decoder.layers.3.self_attention.q_layernorm.weight
        module.decoder.layers.8.mlp.linear_fc1.weight
        module.decoder.layers.5.self_attention.q_layernorm.weight
        module.decoder.layers.26.self_attention.linear_proj.weight
        module.decoder.layers.24.mlp.linear_fc1.weight
        module.decoder.layers.19.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.22.mlp.linear_fc1.weight
        module.decoder.layers.15.self_attention.q_layernorm.weight
        module.decoder.layers.15.self_attention.linear_qkv.weight
        module.decoder.layers.14.self_attention.k_layernorm.weight
        module.decoder.layers.12.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.10.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.10.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.6.self_attention.linear_proj.weight
        module.decoder.layers.2.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.0.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.9.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.4.mlp.linear_fc1.weight
        module.decoder.layers.0.mlp.linear_fc1.weight
        module.decoder.layers.3.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.q_layernorm.weight
        module.decoder.layers.19.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.24.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.linear_qkv.weight
        module.decoder.layers.21.self_attention.k_layernorm.weight
        module.decoder.layers.17.mlp.linear_fc2.weight
        module.decoder.layers.15.self_attention.linear_proj.weight
        module.decoder.layers.13.mlp.linear_fc1.weight
        module.decoder.layers.11.self_attention.linear_proj.weight
        module.decoder.layers.8.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.2.self_attention.linear_proj.weight
        module.decoder.layers.0.self_attention.q_layernorm.weight
        module.decoder.layers.5.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.20.mlp.linear_fc1.weight
        module.decoder.layers.26.mlp.linear_fc2.weight
        module.decoder.layers.24.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.22.self_attention.linear_proj.weight
        module.decoder.layers.17.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.13.self_attention.q_layernorm.weight
        module.decoder.layers.13.self_attention.linear_qkv.weight
        module.decoder.layers.12.self_attention.k_layernorm.weight
        module.decoder.layers.10.mlp.linear_fc2.weight
        module.decoder.layers.10.self_attention.k_layernorm.weight
        module.decoder.layers.0.mlp.linear_fc2.weight
        module.decoder.layers.26.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.20.self_attention.q_layernorm.weight
        module.decoder.layers.20.self_attention.linear_qkv.weight
        module.decoder.layers.19.self_attention.k_layernorm.weight
        module.decoder.layers.17.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.15.mlp.linear_fc2.weight
        module.decoder.layers.13.self_attention.linear_proj.weight
        module.decoder.layers.11.mlp.linear_fc1.weight
        module.decoder.layers.9.mlp.linear_fc1.weight
        module.decoder.layers.6.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.8.mlp.linear_fc2.weight
        module.decoder.layers.1.mlp.linear_fc1.weight
        module.decoder.layers.0.self_attention.linear_qkv.weight
        module.decoder.layers.4.self_attention.q_layernorm.weight
        module.decoder.layers.6.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.mlp.linear_fc2.weight
        module.decoder.layers.18.mlp.linear_fc1.weight
        module.decoder.layers.26.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.24.mlp.linear_fc2.weight
        module.decoder.layers.23.mlp.linear_fc1.weight
        module.decoder.layers.22.mlp.linear_fc2.weight
        module.decoder.layers.20.self_attention.linear_proj.weight
        module.decoder.layers.15.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.11.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.q_layernorm.weight
        module.decoder.layers.9.self_attention.linear_qkv.weight
        module.decoder.layers.0.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.22.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.27.mlp.linear_fc1.weight
        module.decoder.layers.24.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.24.self_attention.q_layernorm.weight
        module.decoder.layers.18.self_attention.q_layernorm.weight
        module.decoder.layers.18.self_attention.linear_qkv.weight
        module.decoder.layers.17.self_attention.k_layernorm.weight
        module.decoder.layers.15.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.13.mlp.linear_fc2.weight
        module.decoder.layers.11.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.4.self_attention.linear_qkv.weight
        module.decoder.layers.8.self_attention.k_layernorm.weight
        module.decoder.layers.3.self_attention.linear_proj.weight
        module.decoder.layers.20.mlp.linear_fc2.weight
        module.decoder.layers.26.self_attention.k_layernorm.weight
        module.decoder.layers.27.self_attention.q_layernorm.weight
        module.decoder.layers.27.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.18.self_attention.linear_proj.weight
        module.decoder.layers.16.mlp.linear_fc1.weight
        module.decoder.layers.13.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.self_attention.q_layernorm.weight
        module.decoder.layers.7.self_attention.linear_qkv.weight
        module.decoder.layers.4.self_attention.k_layernorm.weight
INFO:megatron.core.optimizer:Setting up optimizer with config OptimizerConfig(optimizer='adam', lr=1e-05, min_lr=0.0, decoupled_lr=None, decoupled_min_lr=None, weight_decay=0.1, fp8_recipe='delayed', fp16=False, bf16=True, reuse_grad_buf_for_mxfp8_param_ag=False, params_dtype=torch.bfloat16, use_precision_aware_optimizer=False, store_param_remainders=True, main_grads_dtype=torch.float32, main_params_dtype=torch.float32, exp_avg_dtype=torch.float32, exp_avg_sq_dtype=torch.float32, loss_scale=None, initial_loss_scale=4294967296, min_loss_scale=1.0, loss_scale_window=1000, hysteresis=2, adam_beta1=0.9, adam_beta2=0.95, adam_eps=1e-08, sgd_momentum=0.9, use_distributed_optimizer=True, overlap_param_gather_with_optimizer_step=False, optimizer_cpu_offload=False, optimizer_offload_fraction=1.0, use_torch_optimizer_for_cpu_offload=False, overlap_cpu_optimizer_d2h_h2d=False, pin_cpu_grads=True, pin_cpu_params=True, clip_grad=1.0, log_num_zeros_in_grad=False, barrier_with_L1_time=True, timers=<megatron.core.timers.Timers object at 0x77d342a22e90>, config_logger_dir='')
INFO:megatron.core.optimizer_param_scheduler:> learning rate decay style: cosine
sharded_state_dict metadata loaded from the checkpoint: {'distrib_optim_sharding_type': 'fully_sharded_model_space'}
 loading distributed checkpoint from /workspace/Qwen3-0.6b-mcore at iteration 1
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/dist_checkpointing/strategies/torch.py:915: FutureWarning: `load_state_dict` is deprecated and will be removed in future versions. Please use `load` instead.
  checkpoint.load_state_dict(
/usr/local/lib/python3.11/dist-packages/torch/distributed/checkpoint/planner_helpers.py:406: FutureWarning: Please use DTensor instead and we are deprecating ShardedTensor.
  device = getattr(value, "device", None)
/usr/local/lib/python3.11/dist-packages/torch/distributed/checkpoint/default_planner.py:463: FutureWarning: Please use DTensor instead and we are deprecating ShardedTensor.
  and md.size != obj.size()
Loading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 451/451 [00:01<00:00, 392.09it/s]
could not find arguments in the checkpoint ...
 checkpoint version 3.0
WARNING:megatron.core.rerun_state_machine:RerunStateMachine disabled via CLI, ignoring machine state saved in checkpoint
  successfully loaded checkpoint from /workspace/Qwen3-0.6b-mcore [ t 1/1, p 1/1 ] at iteration 0
(min, max) time across ranks (ms):
    load-checkpoint ................................: (1667.92, 1667.92)
[after model, optimizer, and learning rate scheduler are built] datetime: 2025-09-04 18:10:35 
> building train, validation, and test datasets ...
 > datasets target sizes (minimum size):
    train:      80
    validation: 0
    test:       0
[after dataloaders are built] datetime: 2025-09-04 18:10:35 
done with setup ...
(min, max) time across ranks (ms):
    model-and-optimizer-setup ......................: (1939.23, 1939.23)
    train/valid/test-data-iterators-setup ..........: (0.66, 0.66)
training ...
Setting rerun_state_machine.current_iteration to 0...
[before the start of training step] datetime: 2025-09-04 18:10:36 
[INFO:swift] The training of Epoch 0 starts...
WARNING:DotProductAttention:flash-attn may provide important feature support or performance improvement. Please install flash-attn >= 2.1.1, <= 2.8.1 by pip3 install flash-attn==<version>.
WARNING:megatron.core.utils:No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.
['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/trainer.py", line 104, in forward_step\n    output_tensor = model(**data)\n                    ^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/distributed/data_parallel_base.py", line 22, in forward\n    return self.module(*inputs, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/module.py", line 237, in forward\n    outputs = self.module(*inputs, **kwargs)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/model/gpt_model.py", line 186, in forward\n    hidden_states = self.decoder(\n                    ^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_block.py", line 581, in forward\n    hidden_states, context = layer(\n                             ^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 875, in __call__\n    return super(MegatronModule, self).__call__(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/init.py", line 716, in forward\n    hidden_states, context = self._forward_attention(*_args, **kwargs)\n                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 501, in _forward_attention\n    attention_output_with_bias = self.self_attention(\n                                 ^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 725, in forward\n    core_attn_out = self._checkpointed_attention_forward(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 215, in _checkpointed_attention_forward\n    hidden_states = tensor_parallel.checkpoint(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 477, in checkpoint\n    return CheckpointFunction.apply(function, distribute_saved_activations, *args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/autograd/function.py", line 575, in apply\n    return super().apply(*args, **kwargs)  # type: ignore[misc]\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 423, in forward\n    outputs = run_function(*args)\n              ^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 201, in custom_forward\n    output_ = self.core_attention(\n              ^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/extensions/transformer_engine.py", line 931, in forward\n    core_attn_out = super().forward(\n                    ^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py", line 1018, in forward\n    raise ValueError(\n', 'ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.\n']
[INFO:swift] images_dir: /workspace/output/v0-20250904-181025/images
INFO:matplotlib.font_manager:generated new fontManager
[rank0]: Traceback (most recent call last):
[rank0]:   File "<frozen runpy>", line 198, in _run_module_as_main
[rank0]:   File "<frozen runpy>", line 88, in _run_code
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/cli/_megatron/sft.py", line 5, in <module>
[rank0]:     megatron_sft_main()
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/train/sft.py", line 72, in megatron_sft_main
[rank0]:     return MegatronSft(args).main()
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/llm/base.py", line 49, in main
[rank0]:     result = self.run()
[rank0]:              ^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/train/sft.py", line 62, in run
[rank0]:     self.trainer.train(train_dataset, val_dataset, data_collator)
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/base.py", line 415, in train
[rank0]:     pretrain(
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 864, in pretrain
[rank0]:     iteration, num_floating_point_operations_so_far = train(
[rank0]:                                                       ^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 2279, in train
[rank0]:     ) = train_step(
[rank0]:         ^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/base.py", line 245, in train_step
[rank0]:     return self._origin_train_step(forward_step_func, new_data_iterator, model, optimizer, opt_param_scheduler,
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 1395, in train_step
[rank0]:     losses_reduced = forward_backward_func(
[rank0]:                      ^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/pipeline_parallel/schedules.py", line 500, in forward_backward_no_pipelining
[rank0]:     output_tensor, num_tokens = forward_step(
[rank0]:                                 ^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/pipeline_parallel/schedules.py", line 289, in forward_step
[rank0]:     output_tensor, loss_func = forward_step_func(data_iterator, model)
[rank0]:                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/trainer.py", line 104, in forward_step
[rank0]:     output_tensor = model(**data)
[rank0]:                     ^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/distributed/data_parallel_base.py", line 22, in forward
[rank0]:     return self.module(*inputs, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/module.py", line 237, in forward
[rank0]:     outputs = self.module(*inputs, **kwargs)
[rank0]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/model/gpt_model.py", line 186, in forward
[rank0]:     hidden_states = self.decoder(
[rank0]:                     ^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_block.py", line 581, in forward
[rank0]:     hidden_states, context = layer(
[rank0]:                              ^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 875, in __call__
[rank0]:     return super(MegatronModule, self).__call__(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/init.py", line 716, in forward
[rank0]:     hidden_states, context = self._forward_attention(*_args, **kwargs)
[rank0]:                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 501, in _forward_attention
[rank0]:     attention_output_with_bias = self.self_attention(
[rank0]:                                  ^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 725, in forward
[rank0]:     core_attn_out = self._checkpointed_attention_forward(
[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 215, in _checkpointed_attention_forward
[rank0]:     hidden_states = tensor_parallel.checkpoint(
[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 477, in checkpoint
[rank0]:     return CheckpointFunction.apply(function, distribute_saved_activations, *args)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/autograd/function.py", line 575, in apply
[rank0]:     return super().apply(*args, **kwargs)  # type: ignore[misc]
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 423, in forward
[rank0]:     outputs = run_function(*args)
[rank0]:               ^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 201, in custom_forward
[rank0]:     output_ = self.core_attention(
[rank0]:               ^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/extensions/transformer_engine.py", line 931, in forward
[rank0]:     core_attn_out = super().forward(
[rank0]:                     ^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py", line 1018, in forward
[rank0]:     raise ValueError(
[rank0]: ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.
[rank0]:[W904 18:10:58.255650724 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
E0904 18:11:00.496000 3112 torch/distributed/elastic/multiprocessing/api.py:874] failed (exitcode: 1) local_rank: 0 (pid: 3177) of binary: /usr/bin/python
Traceback (most recent call last):
  File "/usr/local/bin/torchrun", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/run.py", line 892, in main
    run(args)
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/run.py", line 883, in run
    elastic_launch(
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/launcher/api.py", line 139, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/launcher/api.py", line 270, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError: 
============================================================
swift.cli._megatron.sft FAILED
------------------------------------------------------------
Failures:
  <NO_OTHER_FAILURES>
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2025-09-04_18:11:00
  host      : 885babbd6e48
  rank      : 0 (local_rank: 0)
  exitcode  : 1 (pid: 3177)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================
root@885babbd6e48:/workspace/apex# 



swagdowdlez avatar Sep 04 '25 18:09 swagdowdlez

@

报错信息发一下

root@885babbd6e48:/workspace# pip install ms-swift -U
(installed ms-swift 3.7.3 and dependencies)

root@885babbd6e48:/workspace# python -m pip install --upgrade pip
(installed pip 25.2)

pip install pybind11
(installed pybind11 3.0.1)

pip install --no-build-isolation transformer_engine[pytorch]
(downloaded transformer_engine 2.6.0.post1 and transformer_engine_cu12 2.6.0.post1, building transformer_engine_torch wheel, completion not shown)

git clone https://github.com/NVIDIA/apex
cd apex
git checkout e13873debc4699d39c6861074b9a3b2a02327f92
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./

pip install git+https://github.com/NVIDIA/Megatron-LM.git@core_r0.13.0
(installed everything)


root@885babbd6e48:/workspace/apex# WORKDIR=/workspace MODELDIR=$WORKDIR/Qwen3-0.6b-mcore OUTDIR=$WORKDIR/output DATASET=$WORKDIR/81norm.jsonl mkdir -p "$WORKDIR" "$MODELDIR" "$OUTDIR" # (optional) sanity: pin compatible libs if needed # pip install -U "ms-swift>=3.7.3" # pip install "flash-attn<=2.8.1,>=2.1.1" "transformer_engine[pytorch]" # 1) Export HF Qwen3-0.6B -> Megatron (mcore) weights swift export \ --model Qwen/Qwen3-0.6b \ --to_mcore true \ --torch_dtype bfloat16 \ --output_dir "$MODELDIR" \ --use_hf true \ --exist_ok true run sh: /usr/bin/python /usr/local/lib/python3.11/dist-packages/swift/cli/export.py --model Qwen/Qwen3-0.6b --to_mcore true --torch_dtype bfloat16 --output_dir /workspace/Qwen3-0.6b-mcore --use_hf true --exist_ok true [INFO:swift] Successfully registered /usr/local/lib/python3.11/dist-packages/swift/llm/dataset/data/dataset_info.json. [INFO:swift] rank: 0, local_rank: 0, world_size: 1, local_world_size: 1 [INFO:swift] Downloading the model from HuggingFace Hub, model_id: Qwen/Qwen3-0.6b LICENSE: 11.3kB [00:00, 2.90MB/s] | 0/9 [00:00<?, ?it/s] config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 726/726 [00:00<00:00, 3.60MB/s] tokenizer_config.json: 9.73kB [00:00, 17.5MB/s] | 0.00/726 [00:00<?, ?B/s] merges.txt: 1.67MB [00:00, 99.3MB/s] ?B/s] .gitattributes: 1.57kB [00:00, 8.17MB/s] README.md: 14.0kB [00:00, 52.3MB/s]██████▊ | 1/9 [00:00<00:02, 3.20it/s] generation_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 239/239 [00:00<00:00, 2.29MB/s] vocab.json: 2.78MB [00:00, 80.9MB/s] tokenizer.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:00<00:00, 25.5MB/s] Fetching 9 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 12.76it/s] [INFO:swift] Loading the model using model_dir: /root/.cache/huggingface/hub/models--Qwen--Qwen3-0.6b/snapshots/c1899de289a04d12100db370d81485cdf75e47ca [INFO:swift] Setting args.lazy_tokenize: False [INFO:swift] args.output_dir: /workspace/Qwen3-0.6b-mcore [INFO:swift] Global seed set to 42 [INFO:swift] args: ExportArguments(model='Qwen/Qwen3-0.6b', model_type='qwen3', model_revision=None, task_type='causal_lm', torch_dtype=torch.bfloat16, attn_impl=None, new_special_tokens=[], num_labels=None, problem_type=None, rope_scaling=None, device_map=None, max_memory={}, max_model_len=None, local_repo_path=None, init_strategy=None, template='qwen3', system=None, max_length=2048, truncation_strategy='delete', max_pixels=None, agent_template=None, norm_bbox=None, use_chat_template=True, padding_free=False, padding_side='right', loss_scale='default', sequence_parallel_size=1, response_prefix=None, template_backend='swift', dataset=[], val_dataset=[], split_dataset_ratio=0.0, data_seed=42, dataset_num_proc=1, load_from_cache_file=True, dataset_shuffle=True, val_dataset_shuffle=False, streaming=False, interleave_prob=None, stopping_strategy='first_exhausted', shuffle_buffer_size=1000, download_mode='reuse_dataset_if_exists', columns={}, strict=False, remove_unused_columns=True, model_name=None, model_author=None, custom_dataset_info=[], quant_method=None, quant_bits=None, hqq_axis=None, bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_quant_type='nf4', bnb_4bit_use_double_quant=True, bnb_4bit_quant_storage=None, max_new_tokens=None, temperature=None, top_k=None, top_p=None, repetition_penalty=None, num_beams=1, stream=False, stop_words=[], logprobs=False, top_logprobs=None, ckpt_dir=None, lora_modules=[], tuner_backend='peft', train_type='lora', adapters=[], external_plugins=[], seed=42, model_kwargs={}, load_args=True, load_data_args=False, packing=False, lazy_tokenize=False, cached_dataset=[], custom_register_path=[], use_hf=True, hub_token=None, ddp_timeout=18000000, ddp_backend=None, ignore_args_error=False, use_swift_lora=False, merge_lora=False, safe_serialization=True, max_shard_size='5GB', output_dir='/workspace/Qwen3-0.6b-mcore', quant_n_samples=256, quant_batch_size=1, group_size=128, to_cached_dataset=False, to_ollama=False, to_mcore=True, to_hf=False, mcore_model=None, mcore_adapters=[], thread_count=None, test_convert_precision=False, push_to_hub=False, hub_model_id=None, hub_private_repo=False, commit_message='update files', to_peft_format=False, exist_ok=True) [INFO:swift] Start time of running main: 2025-09-04 18:07:09.122975 [INFO:swift] swift.__version__: 3.7.3 [INFO:swift] Run the command: git -C /root/.cache/modelscope/hub/_github clone https://github.com/NVIDIA/Megatron-LM.git Megatron-LM --branch core_r0.13.0 Cloning into 'Megatron-LM'... remote: Enumerating objects: 62743, done. remote: Counting objects: 100% (1555/1555), done. remote: Compressing objects: 100% (536/536), done. remote: Total 62743 (delta 1274), reused 1034 (delta 1019), pack-reused 61188 (from 2) Receiving objects: 100% (62743/62743), 27.02 MiB | 2.39 MiB/s, done. Resolving deltas: 100% (43627/43627), done. [rank0]:[W904 18:07:22.855397941 ProcessGroupNCCL.cpp:4721] [PG ID 0 PG GUID 0 Rank 0] using GPU 0 as device used by this process is currently unknown. This can potentially cause a hang if this rank to GPU mapping is incorrect. You can pecify device_id in init_process_group() to force use of a particular device. [INFO:swift] local_repo_path: /root/.cache/modelscope/hub/_github/Megatron-LM [INFO:swift] Patch apply_rotary_pos_emb successfully applied. [INFO:swift] Patch _SplitAlongDim successfully applied. [INFO:swift] Patch FileSystemReader successfully applied. [INFO:swift] Patch peft successfully applied. [INFO:swift] megatron.core.__version__: 0.13.2 [INFO:swift] Downloading the model from HuggingFace Hub, model_id: Qwen/Qwen3-0.6b model.safetensors: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.50G/1.50G [00:01<00:00, 1.00GB/s] Fetching 10 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:01<00:00, 5.68it/s] [INFO:swift] Loading the model using model_dir: /root/.cache/huggingface/hub/models--Qwen--Qwen3-0.6b/snapshots/c1899de289a04d12100db370d81485cdf75e47ca [INFO:swift] Patch tp_plan. [INFO:swift] model_kwargs: {'device_map': 'auto'} [INFO:swift] default_system: None [INFO:swift] max_length: 2048 [INFO:swift] response_prefix: '' [INFO:swift] agent_template: hermes [INFO:swift] megatron_config: {'num_layers': 28, 'hidden_size': 1024, 'ffn_hidden_size': 3072, 'num_attention_heads': 16, 'num_query_groups': 8, 'max_position_embeddings': 40960, 'norm_epsilon': 1e-06, 'rotary_base': 1000000, 'padded_vocab_size': 151936, 'attention_dropout': 0.0, 'untie_embeddings_and_output_weights': False, 'swiglu': True, 'add_qkv_bias': False, 'kv_channels': 128, 'architectures': 'Qwen3ForCausalLM', 'qk_layernorm': True} [INFO:swift] Setting args.no_rope_fusion: False. using world size: 1, data-parallel size: 1, context-parallel size: 1, hierarchical context-parallel sizes: None, tensor-model-parallel size: 1, encoder-tensor-model-parallel size: 0, pipeline-model-parallel size: 1, encoder-pipeline-model-parallel size: 0 Number of virtual stages per pipeline stage: None accumulate and all-reduce gradients in fp32 for bfloat16 data type. using torch.bfloat16 for parameters ... ------------------------ arguments ------------------------ account_for_embedding_in_pipeline_split ......... False account_for_loss_in_pipeline_split .............. False accumulate_allreduce_grads_in_fp32 .............. True adam_beta1 ...................................... 0.9 adam_beta2 ...................................... 0.95 adam_eps ........................................ 1e-08 adapter_load .................................... None add_bias_linear ................................. False add_position_embedding .......................... True add_qkv_bias .................................... False adlr_autoresume ................................. False adlr_autoresume_interval ........................ 1000 align_grad_reduce ............................... True align_param_gather .............................. False wandb_project ................................... wandb_save_dir .................................. weight_decay .................................... 0.1 weight_decay_incr_style ......................... constant wgrad_deferral_limit ............................ 0 world_size ...................................... 1 yaml_cfg ........................................ None -------------------- end of arguments --------------------- INFO:megatron.core.num_microbatches_calculator:setting number of microbatches to constant 16 > setting tensorboard ... WARNING: one_logger package is required to enable e2e metrics tracking. please go to https://confluence.nvidia.com/display/MLWFO/Package+Repositories for details to install it WARNING:megatron.core.rerun_state_machine:RerunStateMachine initialized in mode RerunMode.DISABLED torch distributed is already initialized, skipping initialization ... > initialized tensor model parallel with size 1 > initialized pipeline model parallel with size 1 > setting random seeds to 42 ... > compiling dataset index builder ... make: Entering directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets' make: python3-config: No such file or directory make: python3-config: No such file or directory g++ -O3 -Wall -shared -std=c++11 -fPIC -fdiagnostics-color -I/usr/include/python3.11 -I/usr/local/lib/python3.11/dist-packages/pybind11/include helpers.cpp -o helpers_cpp In file included from helpers.cpp:12: /usr/local/lib/python3.11/dist-packages/pybind11/include/pybind11/numpy.h: In function ‘void build_exhaustive_blending_indices(pybind11::array_t<short int>&, pybind11::array_t<long int>&, const pybind11::array_t<long int>&, int32_t)’: /usr/local/lib/python3.11/dist-packages/pybind11/include/pybind11/numpy.h:633:14: warning: ‘error_argmax’ may be used uninitialized in this function [-Wmaybe-uninitialized] 633 | return i * strides[Dim] + byte_offset_unsafe<Dim + 1>(strides, index...); | ~~^~~~~~~~~~ helpers.cpp:49:13: note: ‘error_argmax’ was declared here 49 | int64_t error_argmax; | ^~~~~~~~~~~~ make: Leaving directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets' >>> done with dataset index builder. Compilation time: 5.914 seconds WARNING: constraints for invoking optimized fused softmax kernel are not met. We default back to unfused kernel invocations. > compiling and loading fused kernels ... >>> done with compiling and loading fused kernels. Compilation time: 0.004 seconds building GPT model ... /root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_config.py:837: UserWarning: If you are using transformer_engine as the transformer implementation, the core_attn is from transformer_engine and may be the fused version. For fused attention, you have no need to set 'core_attn' to recompute. Please check that the core_attn recompute is really needed. warnings.warn( /root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:102: UserWarning: The fp8 argument in "get_gpt_layer_with_transformer_engine_spec" has been deprecated and will be removed soon. Please update your code accordingly. warnings.warn( /usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/cpu_offload.py:673: DeprecationWarning: Offloading weights is deprecated. Using offload_weights=True does not have any effect. warnings.warn( [INFO:swift] Megatron model created successfully. [INFO:swift] Successfully transferred HF model weights to MG model. [INFO:swift] The ExportArguments will be saved in: /workspace/Qwen3-0.6b-mcore/args.json saving checkpoint at iteration 1 to /workspace/Qwen3-0.6b-mcore in torch_dist format Storing distributed optimizer sharded state of type fully_sharded_model_space [INFO:swift] Successfully registered /usr/local/lib/python3.11/dist-packages/swift/llm/dataset/data/dataset_info.json. successfully saved checkpoint from iteration 1 to /workspace/Qwen3-0.6b-mcore [ t 1/1, p 1/1 ] [INFO:swift] Successfully saved Megatron model weights in /workspace/Qwen3-0.6b-mcore. [INFO:swift] End time of running main: 2025-09-04 18:07:43.618503 [rank0]:[W904 18:07:45.097280534 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator()) root@885babbd6e48:/workspace/apex# 




-------------------- end of arguments ---------------------
INFO:megatron.core.num_microbatches_calculator:setting number of microbatches to constant 16
> setting tensorboard ...
WARNING: one_logger package is required to enable e2e metrics tracking. please go to https://confluence.nvidia.com/display/MLWFO/Package+Repositories for details to install it
WARNING:megatron.core.rerun_state_machine:RerunStateMachine initialized in mode RerunMode.DISABLED
torch distributed is already initialized, skipping initialization ...
> initialized tensor model parallel with size 1
> initialized pipeline model parallel with size 1
> setting random seeds to 42 ...
> compiling dataset index builder ...
make: Entering directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets'
make: python3-config: No such file or directory
make: python3-config: No such file or directory
make: Nothing to be done for 'default'.
make: Leaving directory '/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/datasets'
>>> done with dataset index builder. Compilation time: 0.003 seconds
WARNING: constraints for invoking optimized fused softmax kernel are not met. We default back to unfused kernel invocations.
> compiling and loading fused kernels ...
>>> done with compiling and loading fused kernels. Compilation time: 0.003 seconds
time to initialize megatron (seconds): 12.201
[after megatron is initialized] datetime: 2025-09-04 18:10:33 
building GPT model ...
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_config.py:837: UserWarning: If you are using transformer_engine as the transformer implementation, the core_attn is from transformer_engine and may be the fused version. For fused attention, you have no need to set 'core_attn' to recompute. Please check that the core_attn recompute is really needed.
  warnings.warn(
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:102: UserWarning: The fp8 argument in "get_gpt_layer_with_transformer_engine_spec" has been deprecated and will be removed soon. Please update your code accordingly.
  warnings.warn(
/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/cpu_offload.py:673: DeprecationWarning: Offloading weights is deprecated. Using offload_weights=True does not have any effect.
  warnings.warn(
[INFO:swift] model: GPTModel(
  (embedding): LanguageModelEmbedding(
    (word_embeddings): VocabParallelEmbedding()
    (embedding_dropout): Dropout(p=0.0, inplace=False)
  )
  (rotary_pos_emb): RotaryEmbedding()
  (decoder): TransformerBlock(
    (layers): ModuleList(
      (0-27): 28 x TransformerLayer(
        (input_layernorm): IdentityOp()
        (self_attention): SelfAttention(
          (core_attention): TEDotProductAttention(
            (flash_attention): FlashAttention()
            (fused_attention): FusedAttention()
            (unfused_attention): UnfusedDotProductAttention(
              (scale_mask_softmax): FusedScaleMaskSoftmax()
              (attention_dropout): Dropout(p=0.0, inplace=False)
            )
          )
          (linear_proj): TERowParallelLinear(in_features=2048, out_features=1024, bias=False, TP=1)
          (linear_qkv): TELayerNormColumnParallelLinear(in_features=1024, out_features=4096, bias=False, TP=1)
          (q_layernorm): RMSNorm()
          (k_layernorm): RMSNorm()
        )
        (pre_cross_attn_layernorm): IdentityOp()
        (cross_attention): IdentityOp()
        (cross_attn_bda): IdentityFuncOp()
        (pre_mlp_layernorm): IdentityOp()
        (mlp): MLP(
          (linear_fc1): TELayerNormColumnParallelLinear(in_features=1024, out_features=6144, bias=False, TP=1)
          (linear_fc2): TERowParallelLinear(in_features=3072, out_features=1024, bias=False, TP=1)
        )
      )
    )
    (final_layernorm): RMSNorm()
  )
  (output_layer): ColumnParallelLinear(in_features=1024, out_features=151936, bias=False, TP=1)
)
[INFO:swift] [rank0] model_parameter_info: GPTModel: 596.0499M Params (596.0499M Trainable [100.0000%]), 0.0000M Buffers.
 > number of parameters on (tensor, pipeline) model parallel rank (0, 0): 596049920
INFO:megatron.core.distributed.distributed_data_parallel:Setting up DistributedDataParallel with config DistributedDataParallelConfig(grad_reduce_in_fp32=True, overlap_grad_reduce=False, overlap_param_gather=False, align_param_gather=False, use_distributed_optimizer=True, num_distributed_optimizer_instances=1, check_for_nan_in_grad=True, check_for_large_grads=False, bucket_size=None, pad_buckets_for_high_nccl_busbw=False, average_in_collective=False, fp8_param_gather=False, reuse_grad_buf_for_mxfp8_param_ag=False, use_custom_fsdp=False, data_parallel_sharding_strategy='no_shard', gradient_reduce_div_fusion=True, suggested_communication_unit_size=None, preserve_fp32_weights=True, keep_fp8_transpose_cache_when_using_custom_fsdp=False, nccl_ub=False, fsdp_double_buffer=False)
INFO:megatron.core.distributed.param_and_grad_buffer:Number of buckets for gradient all-reduce / reduce-scatter: 1
Params for bucket 1 (596049920 elements, 596049920 padded size):
        module.decoder.layers.5.mlp.linear_fc2.weight
        module.decoder.layers.1.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.25.mlp.linear_fc1.weight
        module.decoder.layers.27.self_attention.linear_proj.weight
        module.decoder.layers.20.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.16.self_attention.q_layernorm.weight
        module.decoder.layers.16.self_attention.linear_qkv.weight
        module.decoder.layers.15.self_attention.k_layernorm.weight
        module.decoder.layers.13.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.11.mlp.linear_fc2.weight
        module.decoder.layers.9.mlp.linear_fc2.weight
        module.decoder.layers.7.self_attention.linear_proj.weight
        module.decoder.layers.5.self_attention.linear_qkv.weight
        module.embedding.word_embeddings.weight
        module.decoder.layers.2.self_attention.q_layernorm.weight
        module.decoder.layers.22.self_attention.k_layernorm.weight
        module.decoder.layers.18.mlp.linear_fc2.weight
        module.decoder.layers.25.self_attention.q_layernorm.weight
        module.decoder.layers.25.self_attention.linear_qkv.weight
        module.decoder.layers.23.self_attention.q_layernorm.weight
        module.decoder.layers.20.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.23.self_attention.linear_qkv.weight
        module.decoder.layers.16.self_attention.linear_proj.weight
        module.decoder.layers.14.mlp.linear_fc1.weight
        module.decoder.layers.11.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.2.mlp.linear_fc1.weight
        module.decoder.layers.3.self_attention.k_layernorm.weight
        module.decoder.layers.4.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.1.self_attention.k_layernorm.weight
        module.decoder.layers.18.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.21.mlp.linear_fc1.weight
        module.decoder.layers.27.mlp.linear_fc2.weight
        module.decoder.layers.25.self_attention.linear_proj.weight
        module.decoder.layers.24.self_attention.k_layernorm.weight
        module.decoder.layers.23.self_attention.linear_proj.weight
        module.decoder.layers.14.self_attention.q_layernorm.weight
        module.decoder.layers.14.self_attention.linear_qkv.weight
        module.decoder.layers.13.self_attention.k_layernorm.weight
        module.decoder.layers.11.self_attention.k_layernorm.weight
        module.decoder.layers.3.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.k_layernorm.weight
        module.decoder.layers.4.self_attention.linear_proj.weight
        module.decoder.layers.1.self_attention.q_layernorm.weight
        module.decoder.layers.21.self_attention.q_layernorm.weight
        module.decoder.layers.21.self_attention.linear_qkv.weight
        module.decoder.layers.27.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.20.self_attention.k_layernorm.weight
        module.decoder.layers.18.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.16.mlp.linear_fc2.weight
        module.decoder.layers.14.self_attention.linear_proj.weight
        module.decoder.layers.12.mlp.linear_fc1.weight
        module.decoder.layers.7.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.6.self_attention.q_layernorm.weight
        module.decoder.layers.5.mlp.linear_fc1.weight
        module.decoder.layers.5.self_attention.k_layernorm.weight
        module.decoder.layers.0.self_attention.k_layernorm.weight
        module.decoder.layers.6.mlp.linear_fc2.weight
        module.decoder.layers.27.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.25.mlp.linear_fc2.weight
        module.decoder.layers.24.self_attention.linear_proj.weight
        module.decoder.layers.19.mlp.linear_fc1.weight
        module.decoder.layers.21.self_attention.linear_proj.weight
        module.decoder.layers.16.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.12.self_attention.q_layernorm.weight
        module.decoder.layers.12.self_attention.linear_qkv.weight
        module.decoder.layers.10.self_attention.q_layernorm.weight
        module.decoder.layers.10.self_attention.linear_qkv.weight
        module.decoder.layers.5.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc2.weight
        module.decoder.layers.7.mlp.linear_fc1.weight
        module.decoder.layers.6.self_attention.linear_qkv.weight
        module.decoder.layers.2.mlp.linear_fc2.weight
        module.decoder.layers.19.self_attention.q_layernorm.weight
        module.decoder.final_layernorm.weight
        module.decoder.layers.25.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.23.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.19.self_attention.linear_qkv.weight
        module.decoder.layers.18.self_attention.k_layernorm.weight
        module.decoder.layers.16.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.14.mlp.linear_fc2.weight
        module.decoder.layers.12.self_attention.linear_proj.weight
        module.decoder.layers.10.self_attention.linear_proj.weight
        module.decoder.layers.9.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.5.self_attention.linear_proj.weight
        module.decoder.layers.8.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc1.weight
        module.decoder.layers.2.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.2.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.linear_proj.weight
        module.decoder.layers.21.mlp.linear_fc2.weight
        module.decoder.layers.27.self_attention.k_layernorm.weight
        module.decoder.layers.25.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.23.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.19.self_attention.linear_proj.weight
        module.decoder.layers.17.mlp.linear_fc1.weight
        module.decoder.layers.14.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.8.self_attention.q_layernorm.weight
        module.decoder.layers.8.self_attention.linear_qkv.weight
        module.decoder.layers.7.self_attention.k_layernorm.weight
        module.decoder.layers.4.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.11.self_attention.q_layernorm.weight
        module.decoder.layers.6.self_attention.k_layernorm.weight
        module.decoder.layers.1.self_attention.linear_proj.weight
        module.decoder.layers.21.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.26.mlp.linear_fc1.weight
        module.decoder.layers.17.self_attention.q_layernorm.weight
        module.decoder.layers.17.self_attention.linear_qkv.weight
        module.decoder.layers.16.self_attention.k_layernorm.weight
        module.decoder.layers.14.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.12.mlp.linear_fc2.weight
        module.decoder.layers.10.mlp.linear_fc1.weight
        module.decoder.layers.8.self_attention.linear_proj.weight
        module.decoder.layers.6.mlp.linear_fc1.weight
        module.decoder.layers.0.self_attention.linear_proj.weight
        module.decoder.layers.4.mlp.linear_fc2.weight
        module.decoder.layers.2.self_attention.k_layernorm.weight
        module.decoder.layers.23.self_attention.k_layernorm.weight
        module.decoder.layers.26.self_attention.q_layernorm.weight
        module.decoder.layers.26.self_attention.linear_qkv.weight
        module.decoder.layers.25.self_attention.k_layernorm.weight
        module.decoder.layers.23.mlp.linear_fc2.weight
        module.decoder.layers.19.mlp.linear_fc2.weight
        module.decoder.layers.21.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.17.self_attention.linear_proj.weight
        module.decoder.layers.15.mlp.linear_fc1.weight
        module.decoder.layers.12.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.mlp.linear_fc2.weight
        module.decoder.layers.3.self_attention.q_layernorm.weight
        module.decoder.layers.8.mlp.linear_fc1.weight
        module.decoder.layers.5.self_attention.q_layernorm.weight
        module.decoder.layers.26.self_attention.linear_proj.weight
        module.decoder.layers.24.mlp.linear_fc1.weight
        module.decoder.layers.19.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.22.mlp.linear_fc1.weight
        module.decoder.layers.15.self_attention.q_layernorm.weight
        module.decoder.layers.15.self_attention.linear_qkv.weight
        module.decoder.layers.14.self_attention.k_layernorm.weight
        module.decoder.layers.12.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.10.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.10.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.6.self_attention.linear_proj.weight
        module.decoder.layers.2.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.0.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.9.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.4.mlp.linear_fc1.weight
        module.decoder.layers.0.mlp.linear_fc1.weight
        module.decoder.layers.3.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.q_layernorm.weight
        module.decoder.layers.19.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.24.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.linear_qkv.weight
        module.decoder.layers.21.self_attention.k_layernorm.weight
        module.decoder.layers.17.mlp.linear_fc2.weight
        module.decoder.layers.15.self_attention.linear_proj.weight
        module.decoder.layers.13.mlp.linear_fc1.weight
        module.decoder.layers.11.self_attention.linear_proj.weight
        module.decoder.layers.8.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.2.self_attention.linear_proj.weight
        module.decoder.layers.0.self_attention.q_layernorm.weight
        module.decoder.layers.5.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.20.mlp.linear_fc1.weight
        module.decoder.layers.26.mlp.linear_fc2.weight
        module.decoder.layers.24.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.22.self_attention.linear_proj.weight
        module.decoder.layers.17.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.13.self_attention.q_layernorm.weight
        module.decoder.layers.13.self_attention.linear_qkv.weight
        module.decoder.layers.12.self_attention.k_layernorm.weight
        module.decoder.layers.10.mlp.linear_fc2.weight
        module.decoder.layers.10.self_attention.k_layernorm.weight
        module.decoder.layers.0.mlp.linear_fc2.weight
        module.decoder.layers.26.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.20.self_attention.q_layernorm.weight
        module.decoder.layers.20.self_attention.linear_qkv.weight
        module.decoder.layers.19.self_attention.k_layernorm.weight
        module.decoder.layers.17.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.15.mlp.linear_fc2.weight
        module.decoder.layers.13.self_attention.linear_proj.weight
        module.decoder.layers.11.mlp.linear_fc1.weight
        module.decoder.layers.9.mlp.linear_fc1.weight
        module.decoder.layers.6.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.8.mlp.linear_fc2.weight
        module.decoder.layers.1.mlp.linear_fc1.weight
        module.decoder.layers.0.self_attention.linear_qkv.weight
        module.decoder.layers.4.self_attention.q_layernorm.weight
        module.decoder.layers.6.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.1.mlp.linear_fc2.weight
        module.decoder.layers.18.mlp.linear_fc1.weight
        module.decoder.layers.26.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.24.mlp.linear_fc2.weight
        module.decoder.layers.23.mlp.linear_fc1.weight
        module.decoder.layers.22.mlp.linear_fc2.weight
        module.decoder.layers.20.self_attention.linear_proj.weight
        module.decoder.layers.15.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.11.self_attention.linear_qkv.weight
        module.decoder.layers.9.self_attention.q_layernorm.weight
        module.decoder.layers.9.self_attention.linear_qkv.weight
        module.decoder.layers.0.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.3.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.22.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.27.mlp.linear_fc1.weight
        module.decoder.layers.24.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.24.self_attention.q_layernorm.weight
        module.decoder.layers.18.self_attention.q_layernorm.weight
        module.decoder.layers.18.self_attention.linear_qkv.weight
        module.decoder.layers.17.self_attention.k_layernorm.weight
        module.decoder.layers.15.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.13.mlp.linear_fc2.weight
        module.decoder.layers.11.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.4.self_attention.linear_qkv.weight
        module.decoder.layers.8.self_attention.k_layernorm.weight
        module.decoder.layers.3.self_attention.linear_proj.weight
        module.decoder.layers.20.mlp.linear_fc2.weight
        module.decoder.layers.26.self_attention.k_layernorm.weight
        module.decoder.layers.27.self_attention.q_layernorm.weight
        module.decoder.layers.27.self_attention.linear_qkv.weight
        module.decoder.layers.22.self_attention.linear_qkv.layer_norm_weight
        module.decoder.layers.18.self_attention.linear_proj.weight
        module.decoder.layers.16.mlp.linear_fc1.weight
        module.decoder.layers.13.mlp.linear_fc1.layer_norm_weight
        module.decoder.layers.7.self_attention.q_layernorm.weight
        module.decoder.layers.7.self_attention.linear_qkv.weight
        module.decoder.layers.4.self_attention.k_layernorm.weight
INFO:megatron.core.optimizer:Setting up optimizer with config OptimizerConfig(optimizer='adam', lr=1e-05, min_lr=0.0, decoupled_lr=None, decoupled_min_lr=None, weight_decay=0.1, fp8_recipe='delayed', fp16=False, bf16=True, reuse_grad_buf_for_mxfp8_param_ag=False, params_dtype=torch.bfloat16, use_precision_aware_optimizer=False, store_param_remainders=True, main_grads_dtype=torch.float32, main_params_dtype=torch.float32, exp_avg_dtype=torch.float32, exp_avg_sq_dtype=torch.float32, loss_scale=None, initial_loss_scale=4294967296, min_loss_scale=1.0, loss_scale_window=1000, hysteresis=2, adam_beta1=0.9, adam_beta2=0.95, adam_eps=1e-08, sgd_momentum=0.9, use_distributed_optimizer=True, overlap_param_gather_with_optimizer_step=False, optimizer_cpu_offload=False, optimizer_offload_fraction=1.0, use_torch_optimizer_for_cpu_offload=False, overlap_cpu_optimizer_d2h_h2d=False, pin_cpu_grads=True, pin_cpu_params=True, clip_grad=1.0, log_num_zeros_in_grad=False, barrier_with_L1_time=True, timers=<megatron.core.timers.Timers object at 0x77d342a22e90>, config_logger_dir='')
INFO:megatron.core.optimizer_param_scheduler:> learning rate decay style: cosine
sharded_state_dict metadata loaded from the checkpoint: {'distrib_optim_sharding_type': 'fully_sharded_model_space'}
 loading distributed checkpoint from /workspace/Qwen3-0.6b-mcore at iteration 1
/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/dist_checkpointing/strategies/torch.py:915: FutureWarning: `load_state_dict` is deprecated and will be removed in future versions. Please use `load` instead.
  checkpoint.load_state_dict(
/usr/local/lib/python3.11/dist-packages/torch/distributed/checkpoint/planner_helpers.py:406: FutureWarning: Please use DTensor instead and we are deprecating ShardedTensor.
  device = getattr(value, "device", None)
/usr/local/lib/python3.11/dist-packages/torch/distributed/checkpoint/default_planner.py:463: FutureWarning: Please use DTensor instead and we are deprecating ShardedTensor.
  and md.size != obj.size()
Loading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 451/451 [00:01<00:00, 392.09it/s]
could not find arguments in the checkpoint ...
 checkpoint version 3.0
WARNING:megatron.core.rerun_state_machine:RerunStateMachine disabled via CLI, ignoring machine state saved in checkpoint
  successfully loaded checkpoint from /workspace/Qwen3-0.6b-mcore [ t 1/1, p 1/1 ] at iteration 0
(min, max) time across ranks (ms):
    load-checkpoint ................................: (1667.92, 1667.92)
[after model, optimizer, and learning rate scheduler are built] datetime: 2025-09-04 18:10:35 
> building train, validation, and test datasets ...
 > datasets target sizes (minimum size):
    train:      80
    validation: 0
    test:       0
[after dataloaders are built] datetime: 2025-09-04 18:10:35 
done with setup ...
(min, max) time across ranks (ms):
    model-and-optimizer-setup ......................: (1939.23, 1939.23)
    train/valid/test-data-iterators-setup ..........: (0.66, 0.66)
training ...
Setting rerun_state_machine.current_iteration to 0...
[before the start of training step] datetime: 2025-09-04 18:10:36 
[INFO:swift] The training of Epoch 0 starts...
WARNING:DotProductAttention:flash-attn may provide important feature support or performance improvement. Please install flash-attn >= 2.1.1, <= 2.8.1 by pip3 install flash-attn==<version>.
WARNING:megatron.core.utils:No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.
['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/trainer.py", line 104, in forward_step\n    output_tensor = model(**data)\n                    ^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/distributed/data_parallel_base.py", line 22, in forward\n    return self.module(*inputs, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/module.py", line 237, in forward\n    outputs = self.module(*inputs, **kwargs)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/model/gpt_model.py", line 186, in forward\n    hidden_states = self.decoder(\n                    ^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_block.py", line 581, in forward\n    hidden_states, context = layer(\n                             ^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 875, in __call__\n    return super(MegatronModule, self).__call__(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/swift/megatron/init.py", line 716, in forward\n    hidden_states, context = self._forward_attention(*_args, **kwargs)\n                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 501, in _forward_attention\n    attention_output_with_bias = self.self_attention(\n                                 ^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 725, in forward\n    core_attn_out = self._checkpointed_attention_forward(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 215, in _checkpointed_attention_forward\n    hidden_states = tensor_parallel.checkpoint(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 477, in checkpoint\n    return CheckpointFunction.apply(function, distribute_saved_activations, *args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/autograd/function.py", line 575, in apply\n    return super().apply(*args, **kwargs)  # type: ignore[misc]\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 423, in forward\n    outputs = run_function(*args)\n              ^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 201, in custom_forward\n    output_ = self.core_attention(\n              ^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl\n    return forward_call(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/extensions/transformer_engine.py", line 931, in forward\n    core_attn_out = super().forward(\n                    ^^^^^^^^^^^^^^^^\n', '  File "/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py", line 1018, in forward\n    raise ValueError(\n', 'ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.\n']
[INFO:swift] images_dir: /workspace/output/v0-20250904-181025/images
INFO:matplotlib.font_manager:generated new fontManager
[rank0]: Traceback (most recent call last):
[rank0]:   File "<frozen runpy>", line 198, in _run_module_as_main
[rank0]:   File "<frozen runpy>", line 88, in _run_code
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/cli/_megatron/sft.py", line 5, in <module>
[rank0]:     megatron_sft_main()
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/train/sft.py", line 72, in megatron_sft_main
[rank0]:     return MegatronSft(args).main()
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/llm/base.py", line 49, in main
[rank0]:     result = self.run()
[rank0]:              ^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/train/sft.py", line 62, in run
[rank0]:     self.trainer.train(train_dataset, val_dataset, data_collator)
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/base.py", line 415, in train
[rank0]:     pretrain(
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 864, in pretrain
[rank0]:     iteration, num_floating_point_operations_so_far = train(
[rank0]:                                                       ^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 2279, in train
[rank0]:     ) = train_step(
[rank0]:         ^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/base.py", line 245, in train_step
[rank0]:     return self._origin_train_step(forward_step_func, new_data_iterator, model, optimizer, opt_param_scheduler,
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/training/training.py", line 1395, in train_step
[rank0]:     losses_reduced = forward_backward_func(
[rank0]:                      ^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/pipeline_parallel/schedules.py", line 500, in forward_backward_no_pipelining
[rank0]:     output_tensor, num_tokens = forward_step(
[rank0]:                                 ^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/pipeline_parallel/schedules.py", line 289, in forward_step
[rank0]:     output_tensor, loss_func = forward_step_func(data_iterator, model)
[rank0]:                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/trainers/trainer.py", line 104, in forward_step
[rank0]:     output_tensor = model(**data)
[rank0]:                     ^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/distributed/data_parallel_base.py", line 22, in forward
[rank0]:     return self.module(*inputs, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/module.py", line 237, in forward
[rank0]:     outputs = self.module(*inputs, **kwargs)
[rank0]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/model/gpt_model.py", line 186, in forward
[rank0]:     hidden_states = self.decoder(
[rank0]:                     ^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_block.py", line 581, in forward
[rank0]:     hidden_states, context = layer(
[rank0]:                              ^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 875, in __call__
[rank0]:     return super(MegatronModule, self).__call__(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/swift/megatron/init.py", line 716, in forward
[rank0]:     hidden_states, context = self._forward_attention(*_args, **kwargs)
[rank0]:                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/transformer_layer.py", line 501, in _forward_attention
[rank0]:     attention_output_with_bias = self.self_attention(
[rank0]:                                  ^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 725, in forward
[rank0]:     core_attn_out = self._checkpointed_attention_forward(
[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 215, in _checkpointed_attention_forward
[rank0]:     hidden_states = tensor_parallel.checkpoint(
[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 477, in checkpoint
[rank0]:     return CheckpointFunction.apply(function, distribute_saved_activations, *args)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/autograd/function.py", line 575, in apply
[rank0]:     return super().apply(*args, **kwargs)  # type: ignore[misc]
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/tensor_parallel/random.py", line 423, in forward
[rank0]:     outputs = run_function(*args)
[rank0]:               ^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/transformer/attention.py", line 201, in custom_forward
[rank0]:     output_ = self.core_attention(
[rank0]:               ^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1762, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/root/.cache/modelscope/hub/_github/Megatron-LM/megatron/core/extensions/transformer_engine.py", line 931, in forward
[rank0]:     core_attn_out = super().forward(
[rank0]:                     ^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.11/dist-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py", line 1018, in forward
[rank0]:     raise ValueError(
[rank0]: ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.
[rank0]:[W904 18:10:58.255650724 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
E0904 18:11:00.496000 3112 torch/distributed/elastic/multiprocessing/api.py:874] failed (exitcode: 1) local_rank: 0 (pid: 3177) of binary: /usr/bin/python
Traceback (most recent call last):
  File "/usr/local/bin/torchrun", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/run.py", line 892, in main
    run(args)
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/run.py", line 883, in run
    elastic_launch(
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/launcher/api.py", line 139, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/distributed/launcher/api.py", line 270, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError: 
============================================================
swift.cli._megatron.sft FAILED
------------------------------------------------------------
Failures:
  <NO_OTHER_FAILURES>
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2025-09-04_18:11:00
  host      : 885babbd6e48
  rank      : 0 (local_rank: 0)
  exitcode  : 1 (pid: 3177)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================
root@885babbd6e48:/workspace/apex# 

It seems that you haven't installed flash-attn?

ling-xing avatar Sep 08 '25 16:09 ling-xing

我遇到过这个问题,flash-attn 没有安装,或者安装版本不对会有这个问题

yhfgyyf avatar Sep 24 '25 01:09 yhfgyyf

截至目前,[TransformerEngine]支持的 flash-attn 最高支持到 2.8.1,因此如果安装了 最新版(2.8.3)会这样报错

Owen1B avatar Oct 17 '25 08:10 Owen1B