This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from torch import Tensor | |
| def varlen_attn( | |
| query: Tensor, | |
| key: Tensor, | |
| value: Tensor, | |
| cum_seq_q: Tensor, | |
| cum_seq_k: Tensor, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uv venv --python=3.12 --managed-python | |
| source .venv/bin/activate | |
| uv pip install --group dev | |
| uv pip install ninja # or sudo apt install ninja-build | |
| USE_DISTRIBUTED=0 USE_MKLDNN=0 BUILD_TEST=0 USE_FBGEMM=0 USE_NNPACK=0 USE_QNNPACK=0 USE_XNNPACK=0 USE_FLASH_ATTENTION=0 USE_MEM_EFF_ATTENTION=0 uv pip install --no-build-isolation -v -e . |
OlderNewer