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

关于gen_kwargs["eos_token_id"]设置的问题 #4203

Closed
1 task done
wanghuii1 opened this issue Jun 11, 2024 · 1 comment
Closed
1 task done

关于gen_kwargs["eos_token_id"]设置的问题 #4203

wanghuii1 opened this issue Jun 11, 2024 · 1 comment
Labels
solved This problem has been already solved

Comments

@wanghuii1
Copy link

Reminder

  • I have read the README and searched the existing issues.

System Info

LLaMA Factory, version 0.7.2.dev0

Reproduction

这部分是用来设置gen_kwargs["eos_token_id"]

gen_kwargs["eos_token_id"] = [tokenizer.eos_token_id] + tokenizer.additional_special_tokens_ids

请教一下,tokenizer.additional_special_tokens_ids添加至gen_kwargs["eos_token_id"]的考虑是什么。
用户自己扩展的additional_special_tokens_ids不一定表示结束标志,可能让模型predict时不符合预期地提前终止生成。

Expected behavior

No response

Others

No response

@github-actions github-actions bot added the pending This problem is yet to be addressed label Jun 11, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jun 11, 2024

在本框架的语义内,additional_special_tokens 标志了除了 eos_token 以外的结束符

@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Jun 11, 2024
@hiyouga hiyouga closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants