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

Support Position Ids in Rope #33

Closed
fabianlim opened this issue Jun 6, 2024 · 1 comment
Closed

Support Position Ids in Rope #33

fabianlim opened this issue Jun 6, 2024 · 1 comment
Labels
triton involves triton kernels urgent Time sensitivity involved.

Comments

@fabianlim
Copy link
Contributor

This could be very possible by just providing the correct sin and cos values adjusted according to position ids. This can be done outside of the kernel and then passed in:

def _rope_embedding(
    Q,     Q_row_stride,
    cos, cos_row_stride,
    sin, sin_row_stride,
    seqlen,
    head_dim      : tl.constexpr,
    n_heads       : tl.constexpr,
    BACKWARD_PASS : tl.constexpr,
    BLOCK_SIZE    : tl.constexpr,
):
@fabianlim
Copy link
Contributor Author

actually just realized that actually the position_ids arg is depracted huggingface/transformers#29143 and the sin, cos are handled outside of the function. So closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triton involves triton kernels urgent Time sensitivity involved.
Projects
None yet
Development

No branches or pull requests

1 participant