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

代码context_manager.py上的问题 #52

Open
YL-9 opened this issue Sep 21, 2024 · 3 comments
Open

代码context_manager.py上的问题 #52

YL-9 opened this issue Sep 21, 2024 · 3 comments

Comments

@YL-9
Copy link

YL-9 commented Sep 21, 2024

你好,我读了context_manager的代码之后有几点问题,能否解答下:

  1. get_global_hidden_and_mask 函数中,kv 拼接顺序为什么是 block+init+local,而不是 init+block+local
  2. _append 函数中,global_h_q, global_h_k, global_h_v 似乎未使用 rope

(代码注释太少,,刚看起来参数都不知道什么含义

@guyan364
Copy link
Collaborator

  1. 顺序对结果没有影响,计算是等价的
  2. global_h_q 已经做过旋转了,global_h_k 没做 rope 相当于旋转 0 度

如果只需要对应论文算法的代码,初始版本会好读一些,目前的版本优化了性能。

@YL-9
Copy link
Author

YL-9 commented Sep 23, 2024

  1. 顺序对结果没有影响,计算是等价的
  2. global_h_q 已经做过旋转了,global_h_k 没做 rope 相当于旋转 0 度

如果只需要对应论文算法的代码,初始版本会好读一些,目前的版本优化了性能。

好的感谢!
请问你们有没有做过对 global_h_k 做旋转的相关实验呢

@guyan364
Copy link
Collaborator

好的感谢!
请问你们有没有做过对 global_h_k 做旋转的相关实验呢

目前没有,因为按照rerope的长度拓展应该使用相同的旋转角度,你可以尝试一下其他旋转方法

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

2 participants