ChatGLM-6B icon indicating copy to clipboard operation
ChatGLM-6B copied to clipboard

ChatGLM能做增量训练吗

Open Bob-Annette opened this issue 1 year ago • 7 comments

以ChatGLM为基座,增加自己的语料库进行预训练,不是微调,这个该怎么做?

Bob-Annette avatar Jun 14 '23 09:06 Bob-Annette

同问

JiaXiao243 avatar Jun 14 '23 11:06 JiaXiao243

+1

ljch2018 avatar Jun 14 '23 11:06 ljch2018

同问

Liuxc2005 avatar Jun 14 '23 14:06 Liuxc2005

应该是不能

runzhi214 avatar Jun 16 '23 07:06 runzhi214

I am currently working on this issue. I have previously dealt with incremental pre-training for llama, and the key to the problem is the function of data_collator processing.

NewNLPer avatar Jun 21 '23 07:06 NewNLPer

I am currently working on this issue. I have previously dealt with incremental pre-training for llama, and the key to the problem is the function of data_collator processing.

现在解决了吗

ArtificialZeng avatar Jun 27 '23 06:06 ArtificialZeng

Yes, I have completed it, but some unexpected situations have occurred and the model has experienced catastrophic forgetting. If it is not particularly necessary, I do not recommend doing so.

NewNLPer avatar Jun 27 '23 06:06 NewNLPer

是的,我已经完成了,但是发生了一些类似的情况,模型经历了灾难性的遗忘。如果不是特别有必要的事情,我不建议这样做。

但是低资源想要训练领域模型好像只能这样做

starphantom666 avatar Jul 03 '23 08:07 starphantom666

是的,我已经完成了,但是发生了一些类似的情况,模型经历了灾难性的遗忘。如果不是特别有必要的事情,我不建议这样做。

但是低资源想要训练领域模型好像只能这样做

低资源是指只有无监督预料,无有监督数据吗?

Alfer-Feng avatar Jul 06 '23 02:07 Alfer-Feng

@NewNLPer 你好,我们也在计划这样做,方便请教下如何修改脚本吗?

guoqiangqi avatar Jul 14 '23 08:07 guoqiangqi

Yes, I need to reiterate that what I am doing is incremental training. Unlike fine-tuning, the purpose of fine-tuning is to make LLMs understand instructions, but the purpose of incremental training is to increase LLMs's domain knowledge. The general approach to pulling down the vertical domain of LLMs is (in conjunction with Lora): 1. LLMs+fine tuning 2. LLMs+incremental training+fine tuning I can provide an example to understand the training method of LLMs:

Fine tuning: Input_ Id: [1,2,3,4] labels: [5,6,7,8] Cat_ Tensor: [-100, -100, -100, -100,5,6,7,8]

Incremental training: Input: [1,2,3,4] labels: [5,6,7,8] Cat_ Tensor: [1,2,3,4,5,6,7,8]

For example, your best choice is to take a look at the data_ collector,observe the input_ ids and labels ,You can understand it.

NewNLPer avatar Jul 14 '23 08:07 NewNLPer

Thank you for your reply. I understand the difference between incremental pretraining and fine-tuning that you mentioned. But I'm not very familiar with the data processing and model parameter update pipeline of LLMs. Is it convenient for you to share me a training script (perhaps a trainer)? I would greatly appreciate it !

NewNLPer @.***> 于2023年7月14日周五 16:55写道:

Yes, I need to reiterate that what I am doing is incremental training. Unlike fine-tuning, the purpose of fine-tuning is to make LLM understand instructions, but the purpose of incremental training is to increase LLM's domain knowledge. The general approach to pulling down the vertical domain of LLM is (in conjunction with Lora): 1. LLM+fine tuning 2. LLM+incremental training+fine tuning

I can provide an example to understand the training method of LLM: Fine tuning: Input_ Id: [1,2,3,4] labels: [5,6,7,8] Cat_ Tensor: [-100, -100, -100, -100,5,6,7,8] Incremental training: Input: [1,2,3,4] labels: [5,6,7,8] Cat_ Tensor: [1,2,3,4,5,6,7,8] For example, your best choice is to take a look at the data_ Collector,observe the input_ ids and labels ,You can understand it.

— Reply to this email directly, view it on GitHub https://github.com/THUDM/ChatGLM-6B/issues/1239#issuecomment-1635531574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI6KWV6I7KMSOFV4LIGBER3XQECQLANCNFSM6AAAAAAZGB3KHM . You are receiving this because you commented.Message ID: @.***>

guoqiangqi avatar Jul 14 '23 09:07 guoqiangqi

https://github.com/shibing624/MedicalGPT 参考这个项目,预训练,指令微调,rm模型训练,ppo都有现成的。

tomcat123a avatar Jul 20 '23 03:07 tomcat123a