Yushi Bai

Results 102 comments of Yushi Bai

你这里应该是没有成功替换,我们训练时的[modeling_chatglm.py](https://github.com/THUDM/LongWriter/blob/main/train/patch/modeling_chatglm.py)代码中没有这一行:File "/home/hnjj/.cache/huggingface/modules/transformers_modules/glm-4-9b-chat/modeling_chatglm.py", line 416, in init [rank7]: self.core_attention = CORE_ATTENTION_CLASSES[config._attn_implementation](config, self.layer_number)。这是原始hf库中的代码才有的。

我们建议从glm-4-9b(base)模型开始进行混训(通用SFT数据+LongWriter-6k数据)。直接从glm-4-9b-chat训练的效果会大打折扣。

> > 你这里应该是没有成功替换,我们训练时的[modeling_chatglm.py](https://github.com/THUDM/LongWriter/blob/main/train/patch/modeling_chatglm.py)代码中没有这一行:File "/home/hnjj/.cache/huggingface/modules/transformers_modules/glm-4-9b-chat/modeling_chatglm.py", line 416, in init [rank7]: self.core_attention = CORE_ATTENTION_CLASSES[config._attn_implementation](config, self.layer_number)。这是原始hf库中的代码才有的。 > > 我试了确实是,替换了原来的文件后,运行train文件,就会使用的还是原来的modeling_chatglm.py文件 你需要在load时候传入参数`trust_remote_code=True`

@sunzhufeng12345 @badarrrr 请看我们在[README](https://github.com/THUDM/LongWriter/blob/main/train/README.md)中的FAQ是否能解决你们遇到的问题。不好意思让你们久等了。

抱歉,我们没有在评测代码中支持ollama, xinference等的近期计划。

Thanks for pointing out this typo! Fixed.

Maybe with the right prompt, base models can also be elegantly evaluated on LongBench v2. Don't hesitate to let us know the results!

Great suggestion! I will update the code to support LLM-as-a-judge evaluation in the next few days.

LongWriter的上下文长度为32k(输入长度+输出长度),但是我们在训练数据中并没有加入长输入的数据,模型可能在长输入场景下表现不理想。我们推荐在glm4-9b模型上做微调训练,你只需要下载LongWriter-6k数据即可,直接用LLaMA-Factory的代码就可以训练。

在deepspeed config里将stage3_prefetch_bucket_size设为15099494试试呢?