Reference Sliding Window Attention (R-SWA) from Baidu's Unlimited OCR, reproduced from scratch in PyTorch. Runs on Apple Silicon (MPS) and CPU — no CUDA. Constant KV cache, with benchmarks.
-
Updated
Jun 27, 2026 - Python
Reference Sliding Window Attention (R-SWA) from Baidu's Unlimited OCR, reproduced from scratch in PyTorch. Runs on Apple Silicon (MPS) and CPU — no CUDA. Constant KV cache, with benchmarks.
Add a description, image, and links to the sliding-window-attentio topic page so that developers can more easily learn about it.
To associate your repository with the sliding-window-attentio topic, visit your repo's landing page and select "manage topics."