Qwen3_VL_A3B_30B Lora合并问题
合并代码:
CUDA_VISIBLE_DEVICES=0,1
swift export
--mcore_adapters ./output/megatron_output/Qwen3-VL-30B-A3B-Instructs/sft_gr/v0-20251214-000945
--torch_dtype bfloat16
--merge_lora true
--output_dir ./output/megatron_output/Qwen3-VL-30B-A3B-Instructs/sft_gr_hf \
训练代码:
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True'
OMP_NUM_THREADS=10
NPROC_PER_NODE=8
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
IMAGE_MAX_TOKEN_NUM=16384
IMAGE_MIN_TOKEN_NUM=4
megatron sft
--load ./output/Qwen3-VL-30B-A3B-Instruct-mcore
--dataset ./output/Grounding/moe_sft_data.json
--loss_scale ignore_empty_think
--train_type lora
--lora_rank 8
--lora_alpha 32
--target_modules all-linear
--load_from_cache_file true
--split_dataset_ratio 0.01
--moe_permute_fusion true
--moe_grouped_gemm true
--expert_model_parallel_size 4
--moe_shared_expert_overlap true
--moe_aux_loss_coeff 1e-3
--micro_batch_size 4
--global_batch_size 32
--recompute_granularity full
--recompute_method uniform
--recompute_num_layers 1
--max_epochs 1
--finetune true
--cross_entropy_loss_fusion true
--lr 1e-5
--lr_warmup_fraction 0.05
--min_lr 1e-6
--save ./output/megatron_output/Qwen3-VL-30B-A3B-Instructs/sft
--eval_interval 1000
--save_interval 1000
--max_length 4096
--packing true
--num_workers 8
--dataset_num_proc 8
--no_save_optim true
--no_save_rng true
--sequence_parallel true
--moe_expert_capacity_factor 2
--optimizer_cpu_offload true
--use_precision_aware_optimizer true
--optimizer_offload_fraction 0.2
--attention_backend flash \
报错:
Traceback (most recent call last):
File "/root/paddlejob/workspace/env_run/output/ms-swift/swift/cli/export.py", line 5, in
请问这个报错应该怎么修复?
try use release/3.11 or main branch
https://swift.readthedocs.io/zh-cn/latest/Megatron-SWIFT/LoRA-Training.html#mcorehf
https://swift.readthedocs.io/zh-cn/latest/Megatron-SWIFT/LoRA-Training.html#mcorehf
That's helpful, thanks!
This issue has been inactive for over 3 months and will be automatically closed in 7 days. If this issue is still relevant, please reply to this message.