Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- attention
|
| 5 |
+
- positional-encoding
|
| 6 |
+
- benchmark
|
| 7 |
+
- negative-result
|
| 8 |
+
- calabi-yau
|
| 9 |
+
- number-theory
|
| 10 |
+
pretty_name: CY-Sieve Attention — GPU Quality/Perf Benchmark (NVIDIA L4)
|
| 11 |
+
configs:
|
| 12 |
+
- config_name: quality_perplexity
|
| 13 |
+
data_files: quality_perplexity.csv
|
| 14 |
+
- config_name: perf_hbm
|
| 15 |
+
data_files: perf_hbm.csv
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# CY-Sieve Attention — GPU benchmark results (NVIDIA L4, 2026-06-22)
|
| 19 |
+
|
| 20 |
+
Benchmark artifacts for the **CY-Sieve positional-attention kernel**, a falsifiable
|
| 21 |
+
engineering experiment from the [Mirror-Map-Sieve](https://github.com/xaviercallens/Mirror-Map-Sieve)
|
| 22 |
+
project. The bias derives from the weight-5 Apéry-like sequence
|
| 23 |
+
$S_{20}(n)=\sum_k \binom{n}{k}^4\binom{n+k}{k}$ (a Calabi–Yau **3-fold** period;
|
| 24 |
+
the geometry fixes the long-range decay slope $\log\lambda=3.762$ and curvature
|
| 25 |
+
$\beta=2$).
|
| 26 |
+
|
| 27 |
+
## ⚠️ Headline: this is a documented NEGATIVE result
|
| 28 |
+
|
| 29 |
+
On real WikiText-2, trained from scratch, the positional scheme **failed its
|
| 30 |
+
quality gate (KILL, +10.15%)** — a plain sliding window beat every CY-Sieve
|
| 31 |
+
variant. The kernel is numerically correct and has a real memory advantage, but a
|
| 32 |
+
fast kernel that hurts model quality is a failed kernel. We publish the negative
|
| 33 |
+
result deliberately; it is the science working as intended.
|
| 34 |
+
|
| 35 |
+
## Files
|
| 36 |
+
|
| 37 |
+
| file | contents |
|
| 38 |
+
|---|---|
|
| 39 |
+
| `quality_perplexity.csv` | §5 quality gate — val perplexity per positional scheme × context (the decisive result) |
|
| 40 |
+
| `perf_hbm.csv` | §6 — kernel latency + bias-path HBM bytes per sequence length |
|
| 41 |
+
| `run3_20260622_l4_quality.json` | raw §5 output (corpus, config, verdict) |
|
| 42 |
+
| `run3_20260622_l4_perf.json` | raw §6 output |
|
| 43 |
+
| `run3_20260622_l4_gpu_phase.json` | orchestrator summary (§4/§5/§6 headline) |
|
| 44 |
+
| `run3_20260622_l4.log` | full run log |
|
| 45 |
+
| `PHASE3_CYSIEVE_GPU_FINDINGS.md` | the complete findings writeup + redesign directions |
|
| 46 |
+
|
| 47 |
+
## §5 — Quality gate (the decisive result)
|
| 48 |
+
|
| 49 |
+
Methodology: train small GPTs **from scratch**, identical arch/data/compute, one
|
| 50 |
+
per positional scheme, on real WikiText-2 (`Salesforce/wikitext`), byte-level.
|
| 51 |
+
(Zero-shot-swapping the scheme on a *frozen* model was tried and rejected as
|
| 52 |
+
invalid — it collapses every scheme equally.) Validation perplexity:
|
| 53 |
+
|
| 54 |
+
| scheme | @512 (train) | @1024 (2×) | @2048 (4×) |
|
| 55 |
+
|---|---|---|---|
|
| 56 |
+
| **learned-absolute** | **4.22** | 12.10 | 20.82 |
|
| 57 |
+
| ALiBi | 10.74 | 11.73 | 11.35 |
|
| 58 |
+
| **sliding-window** | **4.99** | **5.07** | **5.03** |
|
| 59 |
+
| CY-Sieve τ-ladder | 11.33 | 12.31 | 12.05 |
|
| 60 |
+
| CY-Sieve τ=20 | 16.02 | 16.81 | 16.49 |
|
| 61 |
+
| CY-Sieve τ=128 | 6.80 | 7.12 | 7.00 |
|
| 62 |
+
| CY-Sieve τ=512 | 4.65 | 6.08 | 10.62 |
|
| 63 |
+
|
| 64 |
+
**Verdict: KILL.** Best baseline 4.22 (learned-absolute); best CY-Sieve 4.65
|
| 65 |
+
(τ=512) → **+10.15%**, past the >5% kill threshold. The geometry-fixed slope is too
|
| 66 |
+
steep for a drop-in scheme: no single τ balances absolute quality against
|
| 67 |
+
extrapolation, and the τ-ladder lands at ~11–12.
|
| 68 |
+
|
| 69 |
+
## §6 — Performance + memory (NVIDIA L4, D=64, fp16, causal)
|
| 70 |
+
|
| 71 |
+
| L | CY-Sieve (ms) | dense SDPA (ms) | bias-HBM reduction |
|
| 72 |
+
|---|---|---|---|
|
| 73 |
+
| 4096 | 0.26 | 0.06 | 2048× |
|
| 74 |
+
| 8192 | 1.08 | 0.29 | 4096× |
|
| 75 |
+
| 16384 | 4.16 | 1.02 | **8192×** |
|
| 76 |
+
| 32768 | 15.28 | 2.51 | 16384× |
|
| 77 |
+
|
| 78 |
+
The bias-path HBM claim is **confirmed** — O(L) bytes (recurrence-generated) vs
|
| 79 |
+
O(L²) for a materialized table. But the unfused kernel is **~4–6× slower** than
|
| 80 |
+
fused dense SDPA: a memory-traffic win, **not** a latency win. Per the project's
|
| 81 |
+
honesty rule, with §5 failing these numbers are *not* presented as a contribution.
|
| 82 |
+
|
| 83 |
+
## Hardware / reproducibility
|
| 84 |
+
|
| 85 |
+
NVIDIA L4 (24 GB), PyTorch 2.9.1+cu129, Triton 3.5.1. §4 Triton↔reference parity:
|
| 86 |
+
PASS (4/4). Full method: `PHASE3_CYSIEVE_GPU_FINDINGS.md` and
|
| 87 |
+
[the repo](https://github.com/xaviercallens/Mirror-Map-Sieve).
|
| 88 |
+
|
| 89 |
+
## Citation
|
| 90 |
+
|
| 91 |
+
```bibtex
|
| 92 |
+
@misc{callens2026cysieve,
|
| 93 |
+
author = {Callens, Xavier},
|
| 94 |
+
title = {CY-Sieve Attention: a Calabi--Yau positional bias and its negative quality result},
|
| 95 |
+
year = {2026},
|
| 96 |
+
url = {https://github.com/xaviercallens/Mirror-Map-Sieve},
|
| 97 |
+
doi = {10.5281/zenodo.20747943}
|
| 98 |
+
}
|
| 99 |
+
```
|