-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug Fixes] update chatglm1 tokenizer #7870
Merged
wj-Mcat
merged 5 commits into
PaddlePaddle:develop
from
wj-Mcat:fix-chatglm1-tokenizer-training-predictor
Jan 23, 2024
Merged
[Bug Fixes] update chatglm1 tokenizer #7870
wj-Mcat
merged 5 commits into
PaddlePaddle:develop
from
wj-Mcat:fix-chatglm1-tokenizer-training-predictor
Jan 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for your contribution! |
chatglm1 tokenizer 的结果是: grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
�[32m[2024-01-19 08:12:28,699] [ INFO]�[0m - Found /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/tokenizer_config.json�[0m
�[32m[2024-01-19 08:12:28,699] [ INFO]�[0m - We are using <class 'paddlenlp.transformers.chatglm.tokenizer.ChatGLMTokenizer'> to load 'THUDM/chatglm-6b-v1.1'.�[0m
�[32m[2024-01-19 08:12:28,700] [ INFO]�[0m - Already cached /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/ice_text.model�[0m
�[32m[2024-01-19 08:12:28,700] [ INFO]�[0m - Downloading https://bj.bcebos.com/paddlenlp/models/community/THUDM/chatglm-6b-v1.1/added_tokens.json and saved to /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/�[0m
�[33m[2024-01-19 08:12:31,287] [ WARNING]�[0m - file<https://bj.bcebos.com/paddlenlp/models/community/THUDM/chatglm-6b-v1.1/added_tokens.json> not exist�[0m
�[32m[2024-01-19 08:12:31,287] [ INFO]�[0m - Downloading https://bj.bcebos.com/paddlenlp/models/community/THUDM/chatglm-6b-v1.1/special_tokens_map.json and saved to /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/�[0m
�[33m[2024-01-19 08:12:33,327] [ WARNING]�[0m - file<https://bj.bcebos.com/paddlenlp/models/community/THUDM/chatglm-6b-v1.1/special_tokens_map.json> not exist�[0m
�[32m[2024-01-19 08:12:33,327] [ INFO]�[0m - Already cached /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/tokenizer_config.json�[0m
�[32m[2024-01-19 08:12:33,328] [ INFO]�[0m - Already cached /root/.paddlenlp/models/THUDM/chatglm-6b-v1.1/chat_template.json�[0m
�[32m[2024-01-19 08:12:33,587] [ INFO]�[0m - Assigning ['[gMASK]'] to the additional_special_tokens key of the tokenizer�[0m
============================================================
token -> [MASK]
tokens-> ['[MASK]']
ids -> [130000]
============================================================
token -> [gMASK]
tokens-> ['[gMASK]']
ids -> [130001]
============================================================
token -> <sop>
tokens-> ['<sop>']
ids -> [130004]
============================================================
token -> <eop>
tokens-> ['<eop>']
ids -> [130005]
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7870 +/- ##
========================================
Coverage 56.67% 56.68%
========================================
Files 588 588
Lines 89243 89249 +6
========================================
+ Hits 50580 50590 +10
+ Misses 38663 38659 -4 ☔ View full report in Codecov by Sentry. |
…nto fix-chatglm1-tokenizer-training-predictor
调整之后的 chat_template.json 为: {
"conversation": ["[Round {{index}}]\n问:{{user}}\n答:{% if is_last %}[gMASK]<sop>{% endif %}", "{{bot}}\n<eop>"],
"query": "[Round {{index}}]\n问:{{query}}\n答:[gMASK]<sop>"
} chatglm1 只支持单轮训练。 |
JunnYu
approved these changes
Jan 23, 2024
JunnYu
pushed a commit
that referenced
this pull request
Jan 24, 2024
* update chatglm1 tokenizer * update additional_special_token * add is_training tag * fix linting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
Models
Description
修复 ChatGLM1 中 tokenizer 无法 分词 [gMASK]的问题。