ReRoPE-test-report
#47
by
tpoisonooo
- opened
No description provided.
测试&魔改了 llama2+ReRoPE+triton 看起来还行 效果点击这里。
于是尝试把 ReRoPE 移植进 qwen
作为还算深度的用户,提供移植期间的测试和修改反馈,供参考。
一、测试环境
模型: 7B-chat
baseline commit-id:03752a6cef673d523b433c110f7eaab7788ddbee (10 月份版本)
测试方法: PR 里的 passkey_retrieval
baseline 测试结果
不做任何源码修改。
打开 dynamic-NTK+logn,topk=1, 5k 长度精度为 0
accuracy on the token length
886 is 1.000000
1978 is 0.933333
2797 is 0.533333
3890 is 0.100000
4981 is 0.000000
关闭 dynamic-NTK,保留 logn,topk=1。结论一样
accuracy on the token length
886 is 1.000000
1978 is 0.966667
2797 is 0.533333
3890 is 0.100000
4981 is 0.000000
BTW,早期的 20230926 的版本在这个测试上表现好很多。
二、修改后测试结果
用 bf16
按 PR 的 config.json 来。 use_rerope + rerope_window 用 512 + 打开 logn + 用 bf16
accuracy on the token length
886 is 1.000000
1978 is 0.533333
2797 is 0.400000
3890 is 0.266667
4981 is 0.300000
5801 is 0.266667
6893 is 0.133333
7985 is 0.066667
俺也 debug 不出来,为啥 2k 长度精度骤降到 0.5。如果我写出 bug 应该乱码才对。
实际运行的样子,它有时候就是找不到 pass_key,也没有相对距离的规律。
('I\'m sorry, but the given text does not contain any explicit mention of a "pass key." It appears to be a collection of repetitive sentences describing the c[1640/1922]
ass, sky, and sun. Can you please provide more context or clarify your question?', '40062')
('I\'m sorry, but I cannot find any mention of a "pass key" in the given text. It seems to be a collection of unrelated sentences describing the colors of various object
s such as grass, sky, and sun. Can you please provide more context or clarify your question?', '36544')
('The pass key is 38556.', '38556')
('The pass key is 47281.', '47281')
三、如果用 fp16
不能 fp16,否则乱码。我估计是溢出了:
('I решил招商引 решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил решил ..
四、一些问题
- 看起来 ReRoPE 似乎是有点效果的(两次算 attn_score 的 triton kernel 在其他 PR 已经测好),可惜 bug 没能力 fix.. QAQ
- 看 qwen 论文
- 提到用了 window_attn,在源码里翻了一下没有找到,head_mask=None,是否方便讲解?
- 提到的 code-qwen,哪里可以体验?
tpoisonooo
changed pull request status to
open
tpoisonooo
changed pull request status to
closed