Transformers
PyTorch
English
language-model
graph-attention
adaptive-depth
temporal-decay
efficient-llm
Eval Results (legacy)
Instructions to use vigneshwar234/TemporalMesh-Transformer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vigneshwar234/TemporalMesh-Transformer with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vigneshwar234/TemporalMesh-Transformer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Changelog
[1.0.0] β 2026-05-19
Added
- Initial public release of TemporalMesh Transformer (TMT)
TMTConfigβ full hyperparameter dataclass with 5 model scale presetsMeshBuilderβ dynamic kNN graph rebuilt every forward pass from cosine similarityMeshAttentionβ multi-head attention over sparse graph edges, O(SΒ·k) costTemporalPositionEncoderβ RoPE + per-token learned decay scalarsExitGateβ per-token confidence scoring with freeze-on-threshold logicDualStreamFFNβ parallel syntax + semantic streams with learned gated fusionMemoryAnchorCrossβ 16 persistent EMA key-value anchor vectorsTMTLayerβ unified layer assembling all five componentsTMTModelβ full autoregressive model with tied output projectionTMTOutputβ structured output dataclass (logits, exit_masks, confidences, graph_edges, memory_state, decay_scalars)TMTTrainerβ training loop with wandb logging, cosine warmup, checkpoint savingCosineWarmupSchedulerβ learning rate scheduleTMTLossβ cross-entropy + 0.1 Γ gate auxiliary loss- Dataset loader for WikiText-2 and TinyStories
- HuggingFace tokenizer wrapper
- Full ablation notebooks (01β04)
- 15-test pytest suite (shapes + forward pass)
- 20-page publication-quality PDF with 7 figures and 18 equations
- 5-subset HuggingFace benchmark dataset
- Zenodo DOI registration
- GitHub Pages documentation site
Architecture Details
- Default: d_model=512, n_heads=8, n_layers=12, graph_k=8, exit_threshold=0.85
- ~120M parameters (TMT-Base)
- WikiText-2 val perplexity: 29.4 (vs 42.1 vanilla baseline)
- Average compute per token: ~48% of full-depth baseline