[GH-ISSUE #10] finetune 过程出错 #7

Closed
opened 2026-10-26 21:01:34 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @ifromeast on GitHub (Jan 16, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-MoE/issues/10

你好,我按照官方指导进行全参数 finetune , 遇到以下问题,请问应该怎么解决呢?

Detected kernel version 4.19.118, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
Traceback (most recent call last):
  File "/data/share_user//training/fintune.py", line 332, in <module>
    train()
  File "/data/share_user/training/fintune.py", line 322, in train
    trainer = Trainer(model=model, tokenizer=tokenizer, args=training_args, **data_module)
  File "/root/miniconda3/envs/moe-env/lib/python3.10/site-packages/transformers/trainer.py", line 408, in __init__
    raise ValueError(
ValueError: You cannot perform fine-tuning on purely quantized models. Please attach trainable adapters on top of the quantized model to correctly perform fine-tuning. Please see: https://huggingface.co/docs/transformers/peft for more details

运行的命令是

DATA_PATH="garage-bAInd/Open-Platypus"
OUTPUT_PATH="/test"
MODEL_PATH="deepseek-ai/deepseek-moe-16b-base"

deepspeed training/finetune.py \
    --model_name_or_path $MODEL_PATH \
    --data_path $DATA_PATH \
    --output_dir $OUTPUT_PATH \
    --cache_dir ./cache \
    --num_train_epochs 1 \
    --model_max_length 1024 \
    --per_device_train_batch_size 16 \
    --per_device_eval_batch_size 1 \
    --gradient_accumulation_steps 4 \
    --evaluation_strategy "no" \
    --save_strategy "steps" \
    --save_steps 100 \
    --save_total_limit 2 \
    --learning_rate 2e-5 \
    --warmup_steps 10 \
    --logging_steps 1 \
    --lr_scheduler_type "cosine" \
    --gradient_checkpointing True \
    --report_to "tensorboard" \
    --deepspeed training/configs/ds_config_zero3.json \
    --bf16 True 
Originally created by @ifromeast on GitHub (Jan 16, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-MoE/issues/10 你好,我按照官方指导进行全参数 finetune , 遇到以下问题,请问应该怎么解决呢? ``` Detected kernel version 4.19.118, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. Traceback (most recent call last): File "/data/share_user//training/fintune.py", line 332, in <module> train() File "/data/share_user/training/fintune.py", line 322, in train trainer = Trainer(model=model, tokenizer=tokenizer, args=training_args, **data_module) File "/root/miniconda3/envs/moe-env/lib/python3.10/site-packages/transformers/trainer.py", line 408, in __init__ raise ValueError( ValueError: You cannot perform fine-tuning on purely quantized models. Please attach trainable adapters on top of the quantized model to correctly perform fine-tuning. Please see: https://huggingface.co/docs/transformers/peft for more details ``` 运行的命令是 ``` DATA_PATH="garage-bAInd/Open-Platypus" OUTPUT_PATH="/test" MODEL_PATH="deepseek-ai/deepseek-moe-16b-base" deepspeed training/finetune.py \ --model_name_or_path $MODEL_PATH \ --data_path $DATA_PATH \ --output_dir $OUTPUT_PATH \ --cache_dir ./cache \ --num_train_epochs 1 \ --model_max_length 1024 \ --per_device_train_batch_size 16 \ --per_device_eval_batch_size 1 \ --gradient_accumulation_steps 4 \ --evaluation_strategy "no" \ --save_strategy "steps" \ --save_steps 100 \ --save_total_limit 2 \ --learning_rate 2e-5 \ --warmup_steps 10 \ --logging_steps 1 \ --lr_scheduler_type "cosine" \ --gradient_checkpointing True \ --report_to "tensorboard" \ --deepspeed training/configs/ds_config_zero3.json \ --bf16 True ```
Author
Owner

@zwd003 commented on GitHub (Jan 16, 2024):

你好,已经修复了,可以pull一下代码

<!-- gh-comment-id:1893633006 --> @zwd003 commented on GitHub (Jan 16, 2024): 你好,已经修复了,可以pull一下代码
Sign in to join this conversation.
No labels
pull-request
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-MoE#7
No description provided.