Now published as indexer v2 (2026-11-20). These weights are byte-identical to the v2 indexer in higa2515/Qwen3.8-27B-QSA-BF16 and the GGUF series (tag
v2in both); use those repositories. This repository is kept as the record of the training run. The evaluation below is the development-time result on the exploration question set (two V100-class GPUs). The held-out validation result (215/240 with thinking off, against 169 for v1 and 227 for dense attention) is in the BF16 model card. "hub" below means the v1 indexer, now at tagv1of the BF16 repository.
Training code (qsa-indexer-forge) | Training write-up | QSA llama.cpp engine | BF16 base | GGUF series | QSA Paper
This repository contains only the QSA indexer weights (16 layers × 5 tensors, 52,434,944 FP32 parameters) for higa2515/Qwen3.8-27B-QSA-BF16. The backbone, vision encoder, projector, and MTP weights are not included and were not changed.
It is a continued distillation of the indexer aimed at mix-ups at 128k context: answering with a record whose key differs by one character, taking the value of another record, or confusing null with a value. On a 240-question recall-grid set at 128k it scored 212/240, against 205 for its starting point, 223 for dense attention, and 207 for a weight-edited variant. This is a single run on one question set. See Limitations.
Full write-up (Japanese): docs/training-64k-mixup.md in qsa-indexer-forge.
| File | Format | SHA256 |
|---|---|---|
qsa-indexers.safetensors |
Same tensor names, shapes, and dtype as qsa-indexers.safetensors in the BF16 repository (model.language_model.layers.{L}.self_attn._qsa_indexer.{q_proj.weight,k_proj.weight,q_norm,k_norm,k_block_norm}, F32) |
985345467f60a2c0ae6cf9d8c875ce36d6a6da4aef4aa7428e04e457e4aad6d4 |
indexers/qsa_indexers.pt |
Trainer format: {layer_idx: state_dict}, as indexers/qsa_indexers.pt in the BF16 repository |
6a6bb0decc88f3a8d411e423069f6634f2a5a69d832853ddf9b6504535d136bc |
Both files hold the same weights. Norm weights are zero-centred (the GGUF format stores 1 + weight).
Download the BF16 repository, replace its qsa-indexers.safetensors with the file from this repository, and load the local copy as described in the BF16 model card. The tensor names are identical, so the existing weight index works unchanged.
hf download higa2515/Qwen3.8-27B-QSA-BF16 --local-dir Qwen3.8-27B-QSA-BF16
hf download higa2515/Qwen3.8-27B-QSA-indexer-mix64k qsa-indexers.safetensors --local-dir mix64k
cp mix64k/qsa-indexers.safetensors Qwen3.8-27B-QSA-BF16/qsa-indexers.safetensors
No GGUF is provided. To use these weights with the QSA llama.cpp engine, write the 80 FP32 tensors into a copy of a QSA GGUF from the GGUF series. Use these GGUF names and add 1 to each norm:
| HF name | GGUF name |
|---|---|
q_proj.weight |
q_proj.weight |
k_proj.weight |
k_proj.weight |
q_norm |
q_norm.weight (1 + w) |
k_norm |
k_norm.pre_weight (1 + w) |
k_block_norm |
k_norm.weight (1 + w) |
The evaluation below was run this way, on a Q8_0 GGUF.
indexers/qsa_indexers.pt).| Item | Value |
|---|---|
| Initialisation | 300b |
| Frozen | Backbone (BF16), vision, projector, MTP |
| Sequence length | 65,536 |
| Steps | 300 (one sequence per step, each question used once) |
| Optimizer | AdamW, lr 5e-5, betas (0.9, 0.95), gradient clip 1.0 |
| Budget | K = 2,048 tokens (512 blocks of 4) |
| Loss | KL to the dense block teacher inside the selected top-512 blocks, plus answer-block mass (λ = 0.3) and decoy margin (μ = 0.3, margin 2.0) on every question token |
| KL positions | All question tokens plus 4,096 random document positions per step |
| Hardware | One A100 80GB (Colab), 5.26 h, 63 s per step, peak 78.7 GB |
These changes were checked against the original computation on CPU in float64. Scores, masks, and attention outputs agree to 1e-14; teacher rows agree to 2e-9 (float32 rounding).
Recall-grid, 128k context, 240 questions (eight types × 30), K = 2,048, Q8_0 GGUF on two V100-class GPUs, thinking off, greedy decoding. All indexers were placed into the same GGUF copy, so only the indexer differs.
| Indexer | Correct / 240 |
|---|---|
| mix64k (this) | 212 |
| 300b (start) | 205 |
| best (300b + direct weight edits) | 207 |
| Dense attention | 223 |
Paired comparisons of mix64k with each indexer (exact McNemar test):
| Compared with | Only mix64k correct | Only the other correct | p |
|---|---|---|---|
| 300b | 19 | 12 | 0.28 |
| best | 14 | 9 | 0.41 |
| Dense | 9 | 20 | 0.061 |
Errors by kind, as classified by the generator:
| Kind | mix64k | 300b | best | Dense |
|---|---|---|---|---|
| Key one character off (decoy) | 9 | 11 | 16 | 7 |
| Value of another record | 7 | 11 | 8 | 4 |
| Value instead of null | 4 | 3 | 4 | 6 |
| Null instead of value | 0 | 1 | 1 | 0 |
| Wrong ingredient set | 4 | 3 | 2 | 0 |
| No answer, "not in the document", other | 4 | 6 | 2 | 0 |
| Total | 28 | 35 | 33 | 17 |
Results by type for the revision task (latest record wins): mix64k 26/30, 300b 23, best 17, dense 23.
Apache-2.0, as for higa2515/Qwen3.8-27B-QSA-BF16. Use with the base model is subject to the base model's license.
indexers/qsa_indexers.pt 210 MBqsa-indexers.safetensors 210 MBhiga2515/Qwen3.8-27B-QSA-BF16