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

data_utils.tokenization_gpt2.GPT2Tokenizer is different from transformers.CpmTokenizer #75

Open
ShaneTian opened this issue Aug 11, 2022 · 0 comments

Comments

@ShaneTian
Copy link

See https://huggingface.co/TsinghuaAI/CPM-Generate/discussions/1

For LM fine-tuning or generation, how do I prepare my input data?

  • [token_id_1, token_id_2, ..., eod_token_id], where eod_token_id is the id of <eod> token in transformers.CpmTokenizer
  • [token_id_1, token_id_2, ..., eos_token_id], where eos_token_id is the id of </s> token in transformers.CpmTokenizer
  • [token_id_1, token_id_2, ..., eos_token_id], where eos_token_id is the id of <|endoftext|> token in transformers.GPT2Tokenizer
  • [token_id_1, token_id_2, ..., sep_token_id, cls_token_id], just call CpmTokenizer
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

1 participant