Developer kuraneko1 (Ryu on X) released a model with QSA (Qwen Sparse Attention) added to Qwen3.8-27B on Hugging Face on November 4, 2026. The goal is to minimize performance degradation when processing long contexts. As of November 11, the GGUF version had been downloaded 11,175 times on Hugging Face.
What is QSA?
QSA (Qwen Sparse Attention) is an attention mechanism used in Qwen3.8-Flash-Next, released by Qwen in August 2026. Qwen positions this model as a precursor to the architecture used in Qwen4. Attention refers to the mechanism that determines “where to look” when reading text. A detailed explanation of the mechanism is provided in the paper arXiv 2608.30320, "On the Design of Qwen3.8-Next Architecture" (arXiv).
QSA does not discard or compress past KV (key and value, i.e., information from previous tokens). Instead, a lightweight indexer divides the past into chunks of 4 tokens each, scores them, and directs attention only to the top-scoring chunks and the current chunk. In the port to 27B, the top K=2,048 tokens were used, which corresponds to 12.5% of the total context length of 16k. The paper states that in Flash-Next, GDN (Gated DeltaNet) and full attention were mixed in a 3:1 ratio, and full attention was replaced with QSA through continued pre-training.
Porting to 27B
Qwen3.8-27B consists of 64 layers, comprising 48 GDN layers and 16 layers of full attention. The author added the indexer only to the 16 layers of full attention. The indexer consists of 52,434,944 parameters in FP32, and the original weights remain unchanged in terms of byte size. Only the indexer was trained. According to the author, the training was conducted for 300 steps with a sequence length of 16,384, using a dataset with 50% images.
The released assets include BF16 weights (higa2515/Qwen3.8-27B-QSA-BF16), the GGUF version (higa2515/Qwen3.8-27B-QSA-GGUF), and a dedicated engine (GitHub). The model is licensed under Apache-2.0, and the engine is licensed under MIT.
Author’s Measurements
In the author’s measurements, the configuration consisted of Q8_0 quantization, two V100 32GB GPUs, FP16 KV cache, and MTP draft length of 2. These results are compared against a version of the same weights with QSA removed. The unit is tokens per second (according to the author).
| Input Tokens | Metric | QSA Version | Without QSA |
|---|---|---|---|
| 0 | Prefill | 660.75 | 658.87 |
| 0 | Decode | 49.28 | 49.87 |
| 261,120 | Prefill | 1,071.53 | 366.84 (2.92x) |
| 261,120 | Decode | 41.07 | 22.91 (1.79x) |
When input tokens are 0, performance is nearly identical, but differences emerge with longer inputs. When increasing the input from 0 to 261,120 tokens, the degradation in decode speed was 16.66% for the QSA version and 54.06% for the version without QSA (according to the author’s measurements). However, the author notes that these two measurements were taken in separate runs. Furthermore, this speed refers to the token generation rate, not whether the inferences are correct in long contexts.
Quality and Caveats
The author’s quality checks are limited. For a 32,766-token text in BF16, the PPL (perplexity, an indicator of how difficult it is to predict the text) was 7.0714 for the QSA version and 7.0730 for the original. In a 50-question multiple-choice DocVQA test created by the author, both versions achieved identical results of 50/50.
On the other hand, with 4-bit quantization (Unsloth UD-Q4_K_M), the PPL aggregated over six intervals up to 64,000 tokens was 1.41% lower for QSA, but when looking only at the 64k prose interval, QSA showed a 2.44% higher (worse) result (according to the author’s measurements). The author cautions that having a lower overall PPL does not necessarily indicate improved quality. The author states that “general quality cannot be considered the same” and notes that quality for mixed-image contexts at 128k and 262k tokens remains unverified.
How to Run It
It does not run on standard llama.cpp. The dedicated engine is built for Linux x86_64 and NVIDIA sm70 (V100 generation), with the reference configuration being two 32GB GPUs and a context length of 262,144. The author notes that settings may need to be adjusted for other hardware. The 4-bit version requires 16.67GB of VRAM.
While this report is helpful for those looking to reduce prefill overhead in long contexts, since we have not tested it ourselves, it is appropriate to treat the speed and quality figures as the author’s measurements. We cover the fundamentals of prefill and decode in Current State of Local LLMs Episode 3 and Episode 4. Another method to speed up token generation by speculating output tokens is covered in DSpine Article. QSA employs a “selective context reading” approach, so its underlying principle differs.
The mechanism of QSA and an evaluation of the paper are detailed in Decoding QSA from the Paper.