Skip to content

[Bad Case]: finetune后模型输出很奇怪 #82

Description

@Dr-Corgi

Description / 描述

使用在其他模型上训练成功的数据集,用sft_finetune.sh做全量微调后,模型结果很奇怪。出来一大串空格+一个句号。

使用hf上的代码,载入原始模型(MiniCPM-2B-sft-bf16)运行一致,载入微调模型后输出:

[{'role': 'user', 'content': '山东省最高的山是哪座山, 它比黄山高还是矮?差距多少?'}, {'role': 'assistant', 'content': '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             。'}]

注1:deepspeed用的是stage_2非offload,这点跟给的原始脚本不太一样,不知道有没有影响
注2:已经将每条训练数据长度限制在512个tokens内。

Case Explaination / 案例解释

No response

Activity

  1. LiangYong1216 commented on Mar 5, 2024

    @LiangYong1216

    使用我lora微调后也很奇怪,感觉没有任何作用,啥也学不到
    image

  2. SwordFaith commented on Mar 6, 2024

    @SwordFaith
    Contributor

    抱歉给您带来的不便,之前开源的代码中确实存在 bug,目前已经尝试修复,具体的性能测试还在跟进

  3. locked and limited conversation to collaborators on Mar 11, 2024
  4. converted this issue into a discussion #99 on Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions