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

jev35b moe模型训练报错

Open wade0604 opened this issue 2 weeks ago • 1 comments

Checklist / 检查清单

  • [x] I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。

Bug Description / Bug 描述

报错日志:[INFO:swift] Setting max_ratio: 200. You can adjust this hyperparameter through the environment variable: MAX_RATIO. [INFO:swift] Setting frame_factor: 2. You can adjust this hyperparameter through the environment variable: FRAME_FACTOR. [INFO:swift] Setting fps: 2.0. You can adjust this hyperparameter through the environment variable: FPS. [INFO:swift] Setting fps_min_frames: 4. You can adjust this hyperparameter through the environment variable: FPS_MIN_FRAMES. [INFO:swift] Setting fps_max_frames: 768. You can adjust this hyperparameter through the environment variable: FPS_MAX_FRAMES. [INFO:swift] Setting image_max_token_num: 16384. You can adjust this hyperparameter through the environment variable: IMAGE_MAX_TOKEN_NUM. [INFO:swift] Setting image_min_token_num: 4. You can adjust this hyperparameter through the environment variable: IMAGE_MIN_TOKEN_NUM. [INFO:swift] Setting spatial_merge_size: 2. You can adjust this hyperparameter through the environment variable: SPATIAL_MERGE_SIZE. [INFO:swift] Setting video_max_token_num: 768. You can adjust this hyperparameter through the environment variable: VIDEO_MAX_TOKEN_NUM. [INFO:swift] Setting video_min_token_num: 128. You can adjust this hyperparameter through the environment variable: VIDEO_MIN_TOKEN_NUM. [INFO:swift] model_kwargs: {'device_map': 'cuda:0', 'dtype': torch.bfloat16} The fast path is not available because one of the required library is not installed. Falling back to torch implementation. To install follow https://github.com/fla-org/flash-linear-attention#installation and https://github.com/Dao-AILab/causal-conv1d Traceback (most recent call last): File "/mnt/workspace/zhuye/ms-swift/swift/cli/sft.py", line 20, in sft_main() File "/mnt/workspace/zhuye/ms-swift/swift/pipelines/train/sft.py", line 345, in sft_main return SwiftSft(args).main() File "/mnt/workspace/zhuye/ms-swift/swift/pipelines/train/sft.py", line 30, in init self._prepare_model_tokenizer() File "/mnt/workspace/zhuye/ms-swift/swift/ray_utils/base.py", line 168, in wrapper return func(self, *args, **kwargs) File "/mnt/workspace/zhuye/ms-swift/swift/pipelines/train/sft.py", line 54, in _prepare_model_tokenizer self.model, self.processor = args.get_model_processor(**kwargs) File "/mnt/workspace/zhuye/ms-swift/swift/arguments/base_args/base_args.py", line 427, in get_model_processor return get_model_processor(**res) File "/mnt/workspace/zhuye/ms-swift/swift/model/register.py", line 663, in get_model_processor return loader.load() File "/mnt/workspace/zhuye/ms-swift/swift/model/register.py", line 510, in load model, processor = self._get_model_processor(model_dir, config) File "/mnt/workspace/zhuye/ms-swift/swift/model/register.py", line 500, in _get_model_processor model = self.get_model(model_dir, config, processor, self.model_kwargs.copy()) File "/mnt/workspace/zhuye/ms-swift/swift/model/models/decision.py", line 120, in get_model return super().get_model(model_dir, config, processor, model_kwargs) File "/mnt/workspace/zhuye/ms-swift/swift/model/models/decision.py", line 33, in get_model model = Qwen2VLLoader.get_model(self, model_dir, config, processor, model_kwargs) File "/mnt/workspace/zhuye/ms-swift/swift/model/models/qwen.py", line 781, in get_model File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4030, in from_pretrained model = cls(config, *model_args, **model_kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/models/qwen3_5/modeling_qwen3_5.py", line 1831, in init model = cls(config, **kwargs) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/models/qwen3_5/modeling_qwen3_5.py", line 1305, in init [Qwen3_5DecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)] File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/models/qwen3_5/modeling_qwen3_5.py", line 1305, in [Qwen3_5DecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)] File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/models/qwen3_5/modeling_qwen3_5.py", line 836, in init self.mlp = Qwen3_5MLP(config, config.intermediate_size) File "/opt/conda/envs/python3.10.13/lib/python3.10/site-packages/transformers/configuration_utils.py", line 164, in getattribute return super().getattribute(key)

How to Reproduce / 如何复现

USE_HF=0
CUDA_VISIBLE_DEVICES=0
swift sft
--external_plugins xxxev_train_plugin.py
--model xxx/JEV-35B
--model_type jev
--tuner_type lora
--lora_rank 16
--lora_alpha 32
--task_type decision
--loss_type distill_rps
--dataset dxm_jev_tool_train
--val_dataset dxm_jev_tool_val
--torch_dtype bfloat16
--num_train_epochs 1
--per_device_train_batch_size 1
--learning_rate 1e-4
--gradient_accumulation_steps 4
--gradient_checkpointing true
--logging_steps 1
--save_steps 50
--save_total_limit 2
--max_length 32768
--split_dataset_ratio 0
--output_dir xxx/jev_35b
--dataloader_num_workers 1

Additional Information / 补充信息

No response

wade0604 avatar Nov 16 '26 11:11 wade0604

The failure occurred because this model was not integrated. I have now integrated the model; please pull the latest code from the main branch and proceed with training.

z0o0ey avatar Nov 17 '26 09:11 z0o0ey