Skip to content
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

finetune没效果 #34

Open
ChenBinfighting1 opened this issue Apr 25, 2023 · 4 comments
Open

finetune没效果 #34

ChenBinfighting1 opened this issue Apr 25, 2023 · 4 comments

Comments

@ChenBinfighting1
Copy link

针对你是谁finetune,输出还是原模型的回答,新finetune的pt模型加载没有问题吧,如下:
tokenizer = AutoTokenizer.from_pretrained("ChatGLM-6B/chatglm-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("ChatGLM-6B/chatglm-6b", trust_remote_code=True).half().cuda()

加载finetune模型

peft_path = "ChatGLM-finetune-LoRA/saved/finetune_test/finetune_test_epoch_2.pt"
model.load_state_dict(torch.load(peft_path), strict=False)
model.eval()

@lich99
Copy link
Owner

lich99 commented Apr 25, 2023

如果用LoRA需要的step数较多才会看到效果. 如要更快速/稳定可使用全参数fintune

@ChenBinfighting1
Copy link
Author

如果用LoRA需要的step数较多才会看到效果. 如要更快速/稳定可使用全参数fintune

1,step较多大概是需要多少才会有效果啊?
2,全参数fintune,在单张3090,24g显存会OOM

@lich99
Copy link
Owner

lich99 commented Apr 27, 2023

  1. step一般需要1k以上,视任务而定
  2. 全参数一张24G确实...也许one-bit optimizer能救一下

@Andylau-BIT
Copy link

Andylau-BIT commented May 11, 2023

@lich99 ,请问作者提供的LORA finetune权重训练参数怎么设置的呢?复现不了效果。r=8, lora_alpha=16, droput=0.1, enable_lora=[True, False, True], 其他参数比如MAX_LENGTH, NUM_EPOCHES, LR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants