-
Notifications
You must be signed in to change notification settings - Fork 3
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
Attention mask的计算? #3
Comments
以及check了下clip的code,attention mask在clip里应该-float('inf')才是表示mask而不是0或1表示mask? |
确实,您说的有道理,我会在后续更新中修改这个bug |
这是我从
是不是我们的transformers版本不一样? |
我也注意到了这个注释,但是我去看了源代码,他是把这个attention_mask直接加到了attention weight上? |
感谢您的关注与反馈。 P.S. 对于开放视觉encoder训练的支持,还有一点小问题,我会尽快更新(主要我这两天没卡了,训练推迟了)。如果您要跑实验,建议先不打开这个选项。 |
还真是!!!看起来这属于官方犯的一个小bug,估计他们没料到有人想要在视觉上做mask,所以忽视了这个问题。我看了代码, 再次,感谢您的真知灼见! |
如果您愿意,你可以基于现在的代码版本提交您的pr修复上述问题,我可以进行merge。当然我来update也可以。 |
嗯嗯,我也把这个提给transformer 官方的issue了,原LLAVA-UHD的code真的bug太多了,您的codebase也在复现路上给了我很大的帮助 :) |
@hust-nj 您好,我更新了代码中的这两个bug。您可以再看看写的有没有问题(特别是attention的部分) |
@hust-nj 微调vision encoder训练的bug已修复 |
@aosong01 现在这套代码在我的机器上loss是正常的。我之前遇到过这个情况,是学习率太大导致的。您试试看缩小学习率呢? |
我finetune后的模型最后预测的token全是0,请问下您现在做测试的点数是否正常? @ParadoxZW |
https://github.com/ParadoxZW/LLaVA-UHD-Better/blob/main/llava_uhd/adapt_llava.py#L136-L138
这里由于The first token is for CLS,是不是需要把
改成
The text was updated successfully, but these errors were encountered: