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

Prevent generating excess tokens #118

Closed
msakthiganesh opened this issue Sep 2, 2021 · 1 comment
Closed

Prevent generating excess tokens #118

msakthiganesh opened this issue Sep 2, 2021 · 1 comment

Comments

@msakthiganesh
Copy link

Hi,

Is there a way to prevent the GPT-J model from generating excess tokens after generating the required answer? For example, GPT-3 uses ### to prevent unnecessary tokens. Is there any way I can achieve the same without manually restricting the gen_len parameter?

Thanks in advance!

@kingoflolz
Copy link
Owner

This is not implemented (and there are no plans to implement this in the foreseeable future) in the JAX codebase, however you can do so using the huggingface implementation (huggingface/transformers#13022)

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