Text Generation
PyTorch
Transformers
English
language-model
graph-neural-network
sparse-attention
adaptive-depth
temporal-decay
mesh-attention
efficient-transformer
novel-architecture
causal-lm
research
preprint
mesh-transformer
dynamic-graph
early-exit
per-token-routing
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:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vigneshwar234/TemporalMesh-Transformer")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vigneshwar234/TemporalMesh-Transformer", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vigneshwar234/TemporalMesh-Transformer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vigneshwar234/TemporalMesh-Transformer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vigneshwar234/TemporalMesh-Transformer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vigneshwar234/TemporalMesh-Transformer
- SGLang
How to use vigneshwar234/TemporalMesh-Transformer with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "vigneshwar234/TemporalMesh-Transformer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vigneshwar234/TemporalMesh-Transformer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "vigneshwar234/TemporalMesh-Transformer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vigneshwar234/TemporalMesh-Transformer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vigneshwar234/TemporalMesh-Transformer with Docker Model Runner:
docker model run hf.co/vigneshwar234/TemporalMesh-Transformer
Add CHANGELOG.md
Browse files- CHANGELOG.md +33 -0
CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changelog
|
| 2 |
+
|
| 3 |
+
## [1.0.0] β 2026-05-19
|
| 4 |
+
|
| 5 |
+
### Added
|
| 6 |
+
- Initial public release of TemporalMesh Transformer (TMT)
|
| 7 |
+
- `TMTConfig` β full hyperparameter dataclass with 5 model scale presets
|
| 8 |
+
- `MeshBuilder` β dynamic kNN graph rebuilt every forward pass from cosine similarity
|
| 9 |
+
- `MeshAttention` β multi-head attention over sparse graph edges, O(SΒ·k) cost
|
| 10 |
+
- `TemporalPositionEncoder` β RoPE + per-token learned decay scalars
|
| 11 |
+
- `ExitGate` β per-token confidence scoring with freeze-on-threshold logic
|
| 12 |
+
- `DualStreamFFN` β parallel syntax + semantic streams with learned gated fusion
|
| 13 |
+
- `MemoryAnchorCross` β 16 persistent EMA key-value anchor vectors
|
| 14 |
+
- `TMTLayer` β unified layer assembling all five components
|
| 15 |
+
- `TMTModel` β full autoregressive model with tied output projection
|
| 16 |
+
- `TMTOutput` β structured output dataclass (logits, exit_masks, confidences, graph_edges, memory_state, decay_scalars)
|
| 17 |
+
- `TMTTrainer` β training loop with wandb logging, cosine warmup, checkpoint saving
|
| 18 |
+
- `CosineWarmupScheduler` β learning rate schedule
|
| 19 |
+
- `TMTLoss` β cross-entropy + 0.1 Γ gate auxiliary loss
|
| 20 |
+
- Dataset loader for WikiText-2 and TinyStories
|
| 21 |
+
- HuggingFace tokenizer wrapper
|
| 22 |
+
- Full ablation notebooks (01β04)
|
| 23 |
+
- 15-test pytest suite (shapes + forward pass)
|
| 24 |
+
- 20-page publication-quality PDF with 7 figures and 18 equations
|
| 25 |
+
- 5-subset HuggingFace benchmark dataset
|
| 26 |
+
- Zenodo DOI registration
|
| 27 |
+
- GitHub Pages documentation site
|
| 28 |
+
|
| 29 |
+
### Architecture Details
|
| 30 |
+
- Default: d_model=512, n_heads=8, n_layers=12, graph_k=8, exit_threshold=0.85
|
| 31 |
+
- ~120M parameters (TMT-Base)
|
| 32 |
+
- WikiText-2 val perplexity: 29.4 (vs 42.1 vanilla baseline)
|
| 33 |
+
- Average compute per token: ~48% of full-depth baseline
|