Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

为啥照着步骤来,加载dataset example,始终无法加载自定义内容 #2

Closed
poppysix opened this issue Apr 14, 2023 · 9 comments
Labels
solved This problem has been already solved.

Comments

@poppysix
Copy link

1681467261798

@hiyouga
Copy link
Owner

hiyouga commented Apr 14, 2023

没有看到详细的报错信息,请问你微调模型了吗。把微调日志发一下。

@poppysix
Copy link
Author

没有报错,看起来一切正常啊
CUDA_VISIBLE_DEVICES=0 python finetune_chatglm.py
--do_train
--dataset example
--finetuning_type lora
--output_dir output
--per_device_train_batch_size 16
--gradient_accumulation_steps 1
--lr_scheduler_type cosine
--logging_steps 10
--save_steps 1000
--max_train_samples 3000
--learning_rate 5e-5
--num_train_epochs 1.0
--fp16
169

@hiyouga
Copy link
Owner

hiyouga commented Apr 14, 2023

这个只是做个例子。具体微调要准备其他大型数据集,这个示例数据集数据量太小了。

@poppysix
Copy link
Author

这个只是做个例子。具体微调要准备其他大型数据集,这个示例数据集数据量太小了。

用了自己的数据集900条也不出结果,用官方Tuning是可以出来的

@hiyouga
Copy link
Owner

hiyouga commented Apr 14, 2023

可以试着增大Lora的r值,或者使用和官方一样的pre_seq_len=128的P-Tuning方法。同时增大learning_rate=1e-3

默认参数中为了避免模型发生灾难性遗忘并过拟合到新数据集上,采用的都是较为保守的参数。

@LainNetWork
Copy link

可以试着增大Lora的r值,或者使用和官方一样的pre_seq_len=128的P-Tuning方法。同时增大learning_rate=1e-3

默认参数中为了避免模型发生灾难性遗忘并过拟合到新数据集上,采用的都是较为保守的参数。

你好,小白想请教一个问题,这个增大lora的r值具体要怎么做呢?需要加什么参数么?

@hiyouga
Copy link
Owner

hiyouga commented Apr 16, 2023

你好,小白想请教一个问题,这个增大lora的r值具体要怎么做呢?需要加什么参数么?

@LainNetWork 加入参数--lora_rank=16

@hiyouga hiyouga added the pending This problem is yet to be addressed. label Apr 16, 2023
@LainNetWork
Copy link

你好,小白想请教一个问题,这个增大lora的r值具体要怎么做呢?需要加什么参数么?

@LainNetWork 加入参数--lora_rank=16

明白了,感谢回答~

@hiyouga
Copy link
Owner

hiyouga commented Apr 21, 2023

您好,我们写了一份关于加载自定义内容的教程文档,请移步:https://github.com/hiyouga/ChatGLM-Efficient-Tuning/blob/main/examples/alter_self_cognition.md

@hiyouga hiyouga added solved This problem has been already solved. and removed pending This problem is yet to be addressed. labels Apr 21, 2023
@hiyouga hiyouga closed this as completed Apr 22, 2023
hiyouga pushed a commit that referenced this issue Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
solved This problem has been already solved.
Projects
None yet
Development

No branches or pull requests

3 participants