TemporalMesh Transformer: 29.4 PPL at 48% compute — dynamic graph attention + adaptive exit gates (open-source)
#14
by vigneshwar234 - opened
New efficient transformer: TemporalMesh Transformer (TMT)
TMT achieves 29.4 PPL on WikiText-2 (−30.2% vs vanilla) at 48% compute with 5 innovations in one differentiable forward pass:
- Mesh Attention — dynamic kNN graph per layer, O(S·k) vs O(S²), 128× fewer ops at S=1024
- Temporal Decay — learned multiplicative attenuation of distant tokens post-softmax
- Adaptive Exit — per-token gate, avg 5.76/12 layers, 52% compute saved
- Dual-Stream FFN — syntax + semantic parallel streams
- EMA Memory Anchors — 16 persistent fast-weight vectors
Outperforms Mamba (31.8 PPL), RWKV (33.1), Longformer (39.6) at same 120M params.
LongBench: 53.4 vs 51.3 Mamba. C4: 27.4 PPL.
📄 https://zenodo.org/records/20287390
💻 https://github.com/vignesh2027/TemporalMesh-Transformer
🎮 https://huggingface.co/spaces/vigneshwar234/TemporalMesh-Transformer-Demo