Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

指令微调报错:A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set padding_side='left' when initializing the tokenizer. #633

Open
1 of 2 tasks
1938225289 opened this issue Nov 1, 2024 · 4 comments
Assignees

Comments

@1938225289
Copy link

System Info / 系統信息

transformers 4.46.0,python3.10

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
tokenizer.padding_side = 'left' # 设置左侧填充

Expected behavior / 期待表现

有人遇到相同情况吗?

@sixsixcoder
Copy link
Collaborator

你用的哪个模型,用的哪个微调脚本

@sixsixcoder sixsixcoder self-assigned this Nov 1, 2024
@zRzRzRzRzRzRzR
Copy link
Member

这个地方不应该出现

tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True,padding_side = 'left')

尝试这样呢

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR self-assigned this Nov 1, 2024
@1938225289
Copy link
Author

你用的哪个模型,用的哪个微调脚本

9B-Chat,lora微调,我将finetune.py修改了,用来适配指令微调数据集格式。

@1938225289
Copy link
Author

这个地方不应该出现

tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True,padding_side = 'left')

尝试这样呢
这种方法我试过,还是会出现一样的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants