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
Some questions about constrained decoding #20
Comments
Hi, This is because T5 uses the |
I use XLMRobertaToken, it takes config.eos_token_id = tokenizer.eos_token_id
config.pad_token_id = tokenizer.pad_token_id Does that mean my judgment should be At present, the program can run without constraint decoding algorithm, and the effect is OK; With the constraint decoding algorithm, the program F value is 0. So what's the problem? |
I think it is no need to add You can rewrite the constraint decoding based on the XLMRobertaTokenizer, as you stated that For the problem of F=0, it is better to analyze the content of the generation. |
Thank you for your analysis. I seem to have some ideas! |
Hello, Mr. Lu. In the constraint decoding algorithm, there is a judgment that is not clear. Can you help explain it?
Here,
tgt_generated[-1]==self.tokenizer.pad_token_id
meansstart
,Why?Can we substitutedecoder_start_token_id
forself.tokenizer.pad_token_id
?Or just use the value 0?In my opinion, if
tgt_generated[-1] == self.tokenizer.pad_token_id
,It means that the last one is pad_token, so the generation enters the end phase instead of the start phase.So judge the start of generation withdecoder_ start_ token_ id
is recommended, is it right?The text was updated successfully, but these errors were encountered: