-
Notifications
You must be signed in to change notification settings - Fork 1.8k
try to support rwkv-4-world #848
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
Merged
Merged
Conversation
This file contains hidden or 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
|
后面我逐层定位发现是因为系统Prompt使用tokenzier encode之后出现了45个数字,一旦有45这个数字(对应逗号)就会炸精度。rwkv团队反馈大概率是K炸现象,也就是小模型,第一层需要fp32。我在换3b和7b world模型验证,看看这个问题是否消失 |
|
后面换了3b和7b发现可以成功运行,不会出现nan了。 |
Hzfengsy
reviewed
Sep 1, 2023
BBuf
commented
Sep 2, 2023
Hzfengsy
approved these changes
Sep 2, 2023
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通过外挂一个tokenizer的方式支持了rwkv-4-world模型推理:
但是在推理的时候会因为推理结果nan导致sampler取index挂掉,我定位了一下tokenizer的结果是符合预期的,但是经过模型推理之后的输出prob全是nan,我想问一下这个应该怎么定位?
报错如下:
复现方式为:按照官方编译步骤去量化这个模型 https://huggingface.co/StarRing2022/RWKV-4-World-1.5B 。然后在输出的模型的params下把这里外挂的tokenizer_model文件放进去,地址为:https://github.com/daquexian/faster-rwkv/blob/master/tokenizer_model 。结构为:
然后就可以复现了。