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

标签词的token超过1 #18

Open
Tincsvsv opened this issue Jan 17, 2024 · 2 comments
Open

标签词的token超过1 #18

Tincsvsv opened this issue Jan 17, 2024 · 2 comments

Comments

@Tincsvsv
Copy link

你好,如果标签词的token超过1之后,会对后面实验和锚点重加权有什么影响吗?谢谢

@leanwang326
Copy link
Collaborator

好问题,其实在gpt2/gptj上token基本都是1(四个数据集里只有abbreviation不是),所以我就没怎么仔细考虑这个问题。理论上是有影响的,简单的方案就是多个token的话取首个/取平均(我代码实现里如果有多token就直接取第一个了)。llama上似乎token就比较多,也许几个token都取比较合适(比如anchor-only compression或许取多个token平均,重加权对几个token的注意力乘以相同的可学习权重并除以token数做平均)

@Tincsvsv
Copy link
Author

好的!谢谢您提供的思路,我会进行相关操作的~

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