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

Modify the code for computing relative_position_index to fix the AssertionError #79

Closed
wants to merge 3 commits into from

Conversation

jxl152
Copy link

@jxl152 jxl152 commented Jan 7, 2023

  1. Remove "include THC.h" for PyTorch 1.10+. It is the same as this pull request.
  2. Modify the code for computing relative_position_index. As described in this issue, the code
       relative_position_index = (relative_position + 2 * self.window_size - 0.0001) // self.quant_size
    can guarantee all the values of relative_position_index do not exceed the upper bound (63) but cannot ensure that any of them is less than the lower bound (0).
  3. The test.py for evaluating the pre-trained model is successful.

jxl152 and others added 3 commits January 4, 2023 16:49
Remove "include THC.h" and Modify the code for computing relative_position_index
@DominikVincent
Copy link

Made the same observations independently.
Using your code snippet for relative_position_index works for me. Thanks

@jxl152 jxl152 closed this by deleting the head repository Mar 20, 2024
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

Successfully merging this pull request may close these issues.

2 participants