最近在使用官网的教程训练chatGLM3,但是出现了“RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn”错误,查阅了官方的文档,目前这个问题还没什么解决方案 但是其中有人回复说:是注释掉503行的model.gradient_checkpointing_enable() 。个人验证确实是可以成功的,那么问题来...
#8-bitACCELERATE_LOG_LEVEL=info TRANSFORMERS_VERBOSITY=info accelerate launch --config_file=examples/accelerate_configs/multi_gpu.yaml examples/scripts/reward_trainer.py --use_peft True --load_in_8bit True --gradient_checkpointing=True --gradient_accumulation_steps 1#4-bitACCELERATE_LOG_LEVEL=info...
"'{}' object has no attribute '{}'".format( AttributeError: 'UNet2DConditionModel' object has no attribute 'enable_gradient_checkpointing' Given I'm mostly using the default values I'm wondering if I'm just not formatting the file path correctly?
from transformers import AutoModelForCausalLM, TraininArgumentsmodel = AutoModelForCausalLM.from_pretrained( model_id, use_cache=False, # False if gradient_checkpointing=True **default_args)model.gradient_checkpointing_enable()LoRA LoRA是微软团队开发的一种技术,用于加速大型语言模型的微调。他...
Note that, whenmodel.gradient_checkpointing_enableis commented out, the model will train fine on 2 gpus: $ accelerate launch --use_fsdp -m train_multi The following values were not passed to`accelerate launch`and had defaults used instead:`--num_processes`wassetto a value of`2`More than ...
🐛 Describe the bug Hello, when I am using DDP to train a model, I found that using multi-task loss and gradient checkpointing at the same time can lead to gradient synchronization failure between GPUs, which in turn causes the parameters...
zhouenxianmentioned this issueNov 10, 2023 Q-LoRa微调Qwen-14B-Chat-Int4报错:ValueError: Target module QuantLinear() is not supported.或者TypeError: QWenPreTrainedModel._set_gradient_checkpointing() got an unexpected keyword argument 'enable'QwenLM/Qwen#610 Closed 2 tasks...
hiyougaadded thesolvedThis problem has been already solvedlabelNov 6, 2023 hiyougaclosed this ascompletedNov 6, 2023 hiyougamentioned this issueNov 6, 2023 TypeError: ChatGLMPreTrainedModel._set_gradient_checkpointing() got an unexpected keyword argument 'enable'#1405 ...