-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 模型进行全量微调后,loss正常,但推理时乱码 #472
Comments
使用的是 finetune_ds.sh 进行训练,没有改过其他参数 |
训练后ckpt的目录如下config.json |
想问一下全量微调需要的显存多大呢,我们在h20上batchsize只能开2 |
@whycantfindaname 我开的per_divice_train_batch_size是1 |
我们用的是zero stage3,应该是最省显存的了。那看起来全量微调需要的资源还是挺贵的。 |
看起来好像是模型保存的问题,理论上应该得保存四个safetensor,但实际上最后只保存了一个,但是看中间的checkpoint保存是正常的,目前我没有找到原因。有人知道怎么解决吗? |
我发现这个问题只在使用zero2的时候出现,zero3时正常,具体表现为最终训练完保存的时候输出了 看起来和transformer版本有关,我将transformers==4.37.2改为transformers==4.32.0后就正常了 |
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
self.model = AutoModelForCausalLM.from_pretrained(
model_path, device_map='cuda', trust_remote_code=True).eval()
token_result = self.tokenizer([prompt],
return_tensors='pt',
padding='longest')
input_ids = token_result.input_ids # print(self.tokenizer.decode(input_ids[0]))
模型预测全部乱码
期望行为 | Expected Behavior
模型应该正常预测输出。
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: