flashinfer-ai / flashinfer

FlashInfer: Kernel Library for LLM Serving
https://flashinfer.ai
Apache License 2.0
1.48k stars 147 forks source link

The PyTorch API reference for flashinfer.rope.apply_rope_pos_ids appears to contain inaccuracies. #615

Closed ovowei closed 1 week ago

ovowei commented 1 week ago

In the code at this line, the pos_ids used have a shape of (nnz). However, the documentation at flashinfer.rope.apply_rope_pos_ids describes pos_ids as having a shape of (batch_size + 1).

yzh119 commented 1 week ago

Thank you for reporting this issue, pos_ids should have shape (nnz,), and the documentation was not updated.