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

Update sub_quadratic_attention.py #10266

Merged
merged 1 commit into from
May 11, 2023
Merged

Update sub_quadratic_attention.py #10266

merged 1 commit into from
May 11, 2023

Commits on May 11, 2023

  1. Update sub_quadratic_attention.py

    1. Determine the number of query chunks.
    2. Calculate the final shape of the res tensor.
    3. Initialize the tensor with the calculated shape and dtype, (same dtype as the input tensors, usually)
    
    Can initialize the tensor as a zero-filled tensor with the correct shape and dtype, then compute the attention scores for each query chunk and fill the corresponding slice of tensor.
    nero-dv authored May 11, 2023
    Configuration menu
    Copy the full SHA
    c8732df View commit details
    Browse the repository at this point in the history