openchat icon indicating copy to clipboard operation
openchat copied to clipboard

Need pad_token_id?

Open ShiJiawenwen opened this issue 1 year ago • 4 comments

Thanks for your great work! I know openchat-3.5 use the padding-free training strategy. May I ask if it is necessary to add pad_token during the inference stage?

The example code is as follows:

tokenizer = AutoTokenizer.from_pretrained("openchat/openchat_3.5") tokenizer.pad_token="<|pad_0|>"

When I use this model for generation get the warning message: "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results. Setting pad_token_id to eos_token_id:32000 for open-end generation."

ShiJiawenwen avatar Dec 19 '23 06:12 ShiJiawenwen

Looks like naive-ui is up-to-date now, so this is no longer needed.

dependabot[bot] avatar May 28 '24 10:05 dependabot[bot]