Xinyao (Morry) Niu

Results 10 comments of Xinyao (Morry) Niu

Any update on this? I notice that there is a out of box pretrain version for GLM-10B. Would like to know whether there are any future plan on uploading other...

我个人体感只 finetune attention 效果是不太行的,我把 r 增加到 32 了,然后 finetune 所有 dense layer, 包括 attention 后的 dense 和 FFN. Loss 降低到差不多 2.5 左右,有一些效果。也可以确认一下是否 load 了正确的数据集。另一方面,我觉得 ChatGLM 原模型训练的太过了,只训练很少的 lora 可能很难把原本的模型扳过来。所以可能要非常贴切还是得 finetune 整个模型。

> 谢谢,r指的是训练参数中的--lora_rank 8 吗?我刚学习,参数还不太搞的明白用处了 是的,我的 LoRa config 如下 ```python peft_config = LoraConfig( task_type=TaskType.CAUSAL_LM, inference_mode=False, r=32, lora_alpha=32, lora_dropout=0.1, target_modules=["query_key_value", "dense", "dense_h_to_4h", "dense_4h_to_h"], ) ``` 需要同步的改 Inference 代码里面的 LoRA Config

> 这个是调更多的 linear,如果说你训练的时候也 inject 了这些 lora,那么你推理的时候也需要这些

> > 这个是调更多的 linear,如果说你训练的时候也 inject 了这些 lora,那么你推理的时候也需要这些 > > 谢谢回复,我还有问题就是 > > 如果我训练用了target_modules=["query_key_value", "dense", "dense_h_to_4h", "dense_4h_to_h"],推理的时候怎么使用的?有相关的文档吗? 只需要推理的时候也增加这些就可以了,我这边是能正确 inference 的

> 我这边也有这个问题。 现在我处理数据是参照之前glm的方法,构造成下面的形式,但finetune后的结果不及预期,希望能有哪位同学来帮忙答疑一下 > > input tokens: token1 token2 target tokens: token3 token4 > > input_ids: [token1, token2, gMASK_token, eos_token, token3, token4] > > labels: [-100, -100, -100, -100, token3,...

目前可以 inject LoRA 的 layers 应该是有四个地方,所以正确的应该是 ``` config = LoraConfig( r=LORA_R, lora_alpha=LORA_ALPHA, lora_dropout=LORA_DROPOUT, target_modules=["query_key_value", "dense", "dense_h_to_4h", "dense_4h_to_h"], bias="none", ) ``` 但是问题是,GLM 是 prefix LM,所有的开源工具对这种 LM 支持都非常差。而且 LLaMa finetune 的代码是直接对整个数据用 LM-loss...

> 你这个能跑通吗?我跑得模型可以训练了,但是保存的时候出问题了 > […](#) > ---Original--- From: "Xinyao (Morry) ***@***.***> Date: Fri, Mar 17, 2023 10:28 AM To: ***@***.***>; Cc: ***@***.******@***.***>; Subject: Re: [THUDM/ChatGLM-6B] Finetune with LoRA (Issue #67) 目前可以...

@Chillee Hi there, did you get the fp8 version somewhere or you are currently working on the fp8 quant in this PR?