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

Update convert.py #280

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Update convert.py #280

merged 2 commits into from
Mar 13, 2024

Conversation

futz12
Copy link
Contributor

@futz12 futz12 commented Mar 13, 2024

fix: Fixed a conversion error caused by a version recognition error

fix: Fixed a conversion error caused by a version recognition error
@futz12
Copy link
Contributor Author

futz12 commented Mar 13, 2024

错误原因是,转换工具通过识别tranformer版本号判断是glm2还是3。但是chatglm3-6b-128k的tranformer版本和glm2相同,导致识别错误。在推理过程中会出现异常输出。

@li-plus
Copy link
Owner

li-plus commented Mar 13, 2024

感谢,我换了一种写法,因为 ChatGLM3 支持 system prompt,所以 tokenizer 里一定有 <|system|> token,这样来判断 ChatGLM2 vs ChatGLM3 应该是比较鲁棒的。之前根据版本来判断模型还是太 hack 了。

@li-plus li-plus merged commit f7a2457 into li-plus:main Mar 13, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants