Closed csm276 closed 11 months ago
Hi, I hope this email finds you well. I believe the issue you encountered might be due to running the code in a CPU-only environment, whereas FP16 mixed-precision training requires a GPU environment. To address this, you can try removing the "--fp16" parameter when running the fine-tuning code. While this might have some impact on the final results, the difference shouldn't be significant.
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年2月8日(星期四) 晚上6:00 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Zhihan1996/DNABERT_2] dtype=next(self.parameters()).dtype) # fp16 compatibility StopIteration (Issue #58)
Hi @csm276 how did you resolve this problem?
I've got this error:
Traceback (most recent call last): File "train.py", line 303, in <module> train() File "train.py", line 227, in train model_args, data_args, training_args = parser.parse_args_into_dataclasses() File "/data/jess_tmp/fh/miniconda3/envs/dna/lib/python3.8/site-packages/transformers/hf_argparser.py", line 346, in parse_args_into_dataclasses obj = dtype(inputs) File "<string>", line 117, in init File "/data/jess_tmp/fh/miniconda3/envs/dna/lib/python3.8/site-packages/transformers/training_args.py", line 1337, in __post_init__ raise ValueError( ValueError: FP16 Mixed precision training with AMP or APEX (--fp16
) and FP16 half precision evaluation (--fp16_full_eval
) can only be used on CUDA devices.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: **@.***>
Hi, I'm having this problem while following your finetune runtime steps on github, can you provide some help? Thanks a lot!