Results comments of Running_you

可能参考这里解决,https://github.com/huggingface/peft/issues/286

将run_clm_sft_with_peft.py脚本中这段代码注释掉即可。 ``` old_state_dict = model.state_dict model.state_dict = ( lambda self, *_, **__: get_peft_model_state_dict(self, old_state_dict()) ).__get__(model, type(model)) ```

> 除了之前发现的在 `rollout` 阶段由于人为干预导致的不对齐问题外,我们在后续测试中还发现,在拼接多轮对话时也存在类似的情况。具体来说,之前我们在拼接多轮对话时,会先将模型输出的 `response` 转换为文本,方便后续工具调用,然后再将模型的 `response` 和工具调用的返回结果一起重新转换为 `token_id` 进行拼接。然而,这种 decode 然后 encode 的过程会导致类似的不对齐问题。如下图所示,模型生成了 `` 三个 token,但在经过 decode-encode 后,变成了 ``。 > > ![Image](https://github.com/user-attachments/assets/fe1a6e78-251a-47b3-ad80-fa3c464f2a45) > > ![Image](https://github.com/user-attachments/assets/ef66e170-2e77-4138-a744-17540c709a64) > > 通过直接拼接原始 `response`...