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

如何生成更长的文本内容 #37

Open
zhenhao-huang opened this issue Feb 8, 2021 · 2 comments
Open

如何生成更长的文本内容 #37

zhenhao-huang opened this issue Feb 8, 2021 · 2 comments

Comments

@zhenhao-huang
Copy link

尝试生成更长的文本,修改了generate_text.sh脚本中的一些参数,但是没达到预期效果,请问怎么生成更长的文本?

@achriush
Copy link

猜测训练时未有过更长的训练数据,所以理论上不支持更长文本的生成(主要因为pos embed的问题),如果一定要生成更长的文本,可以尝试修改下生成的代码,采用滑动窗口的方式进行生成。

@zhenhao-huang
Copy link
Author

实现了一个无限生成,但是只能在最初的生成代码版本使用,因为在新的生成代码中添加了past_key_values(相应的修改了past_key_values部分),后续生成的文本完全不通顺。不太理解past_key_values是怎么起到作用的。@zzy14

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

2 participants