Downloads · 30 days
0
thefinalboss/kuramoto-siren
kuramoto-siren is a machine learning model from thefinalboss. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Beyond Transformers: A Synchronization-Based Substrate for AGI
Downloads · 30 days
0
Access
Public
Updated Aug 23, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py176 KB · 78%
From the Hugging Face model README
Beyond Transformers: A Synchronization-Based Substrate for AGI
Paradigm Shift: From probability distributions (Transformers) to energy landscapes (Synchronization). No softmax. No vocabulary embedding. No next-token prediction.
Kuramoto-SIREN is a novel neural substrate that replaces the Transformer architecture with:
This paradigm enables:
Input Tokens (indices)
│
▼
┌─────────────────┐
│ HTP Tokenizer │ Hash → 64D unit vector (no vocab table)
└─────────────────┘
│
▼
┌─────────────────┐
│ Positional Enc. │ Multi-frequency sin/cos encoding
└─────────────────┘
│
▼
┌─────────────────┐
│ SIREN Layer 1 │ sin(30·(W₁x + b₁) + φ₁)
└─────────────────┘
│
▼
┌─────────────────┐
│ SIREN Layer 2 │ sin(30·(W₂h + b₂) + φ₂)
└─────────────────┘
│
▼
┌─────────────────┐
│ Coupler (J) │ J(N,K,d,d) — higher-order coupling
│ (Kuramoto) │ Ring connectivity, K=4 neighbors
└─────────────────┘
│
▼
┌─────────────────┐
│ Readout MLP │ 256 → 256 → 128 (ReLU)
└─────────────────┘
│
▼
Alignment Projection (128D)
│
▼
┌─────────────────┐
│ Contrastive Loss │ L = max(0, m-align_pos) + max(0, align_neg-m)
└─────────────────┘
# sin(ω₀(Wx + b) + φ) — learnable frequency and phase
class SIRENLayer:
def forward(self, x):
z = ω₀ * (W @ x + b) + φ
return sin(z)
# J[i, ki, :, :] couples neighbor ki to oscillator i
class SparseKuramotoCoupler:
J = Random(N, K, d, d) # Higher-order coupling tensor
# No vocabulary — hash tokens to fixed-dim vectors
class HTPTokenizer:
hash_vectors = Random(vocab_size, dim) # Unit sphere
def encode(token_idx):
return hash_vectors[token_idx % vocab_size]
# Energy landscape: align_pos high, align_neg low
align_pos = dot(proj(ctx), proj(cand))
align_neg = dot(proj(ctx), proj(wrong))
loss = max(0, m - align_pos) + max(0, align_neg - m)
N_optimal = 18 × P (vs classic: N = 20 × P)
| Component | Value |
|---|---|
| Parameters | 1.15B |
| Training tokens | 18.4B |
| Hardware | 8× A100-80GB |
| Training time | ~48 hours |
| Memory/GPU | ~3.9 GB (well under 80GB) |
| Component | Value |
|---|---|
| Parameters | 1.8B (+56% vs 1B) |
| Training tokens | 32.4B (18×P Chinchilla) |
| Hardware | 6× RTX 4090 24GB |
| Training time | ~40 hours |
| Memory/GPU | 17.0 GB (7.0 GB margin) |
| Optimizer | AdamW-8bit + FP16 + gradient checkpointing |
| Expected grammar | 40-60% |
Key optimizations for RTX 4090:
# Install dependencies
pip install numpy scipy torch bitsandbytes huggingface_hub datasets
# Analyze real data sources
python data_pipeline.py --analyze
# Test with small real data (no synthetic)
python train_real.py --test
# Full training on 6× RTX 4090 with REAL data
torchrun --nproc_per_node=6 train_real.py
| Version | Data | Grammar | Training Time |
|---|---|---|---|
| v4 | Synthetic | 6.4% | 2765s |
| v7 | Synthetic | 12.0% | 238s (11x faster) |
| Real-data 1.8B | Wikipedia + arXiv + GitHub + C4 | 35-50% | ~40h (6× RTX 4090) |
kuramoto_siren_repo/
├── kuramoto_siren/
│ ├── __init__.py
│ └── substrate.py # Core AR model (SIREN, Kuramoto, HTP, PE)
├── train_alignment.py # v8 contrastive alignment training
├── train_1b_alignment.py # 1B model training (CPU demo)
├── train_1b_gpu.py # 1B model training (GPU/CuPy)
├── train_rtx6.py # 1.8B distributed training (6× RTX 4090)
├── scale_calculator.py # Scaling calculator
├── rtx6_analysis.py # RTX 4090 memory & throughput analysis
├── memory_calculator.py # General memory calculator
├── config_gen_rtx6.py # Config generator for 1.8B model
├── tests/ # Unit tests
├── examples/ # Usage examples
├── PARADIGM_SHIFT_v7.md # Paradigm shift documentation
├── RESEARCH_REPORT_v7.md # Research report (v7 results)
├── RESEARCH_REPORT_1B.md # Research report (1B scaling)
└── SCALING_REPORT_1B.md # Detailed scaling analysis
MIT License — see LICENSE for details.
@misc{kuramoto_siren_2026,
title={Kuramoto-SIREN: A Synchronization-Based Substrate for AGI},
author={AgnesCode Research},
year={2026},
url={https://github.com/AFKmoney/kuramoto-siren}
}
Manage training on a remote GPU machine via SSH. Hourly HuggingFace sync included.
# Prerequisites: SSH access to machine with 6× RTX 4090
# HF_TOKEN must be set on remote: export HF_TOKEN=hf_...
# One-liner: launch training
python remote_controller.py [email protected] start 1.8 32.4 8000
# Monitor
python remote_controller.py [email protected] watch # live tail
python remote_controller.py [email protected] grammar # grammar progress
python remote_controller.py [email protected] logs # full logs
python remote_controller.py [email protected] checkpoint # checkpoint list
python remote_controller.py [email protected] push # manual HF upload
python remote_controller.py [email protected] resume # restart from checkpoint
# Or use bash scripts
./remote_train.sh [email protected] 1.8 32.4 8000 3600
./remote_monitor.sh [email protected] status
What happens on remote:
/mnt/training/kuramoto-siren/repotorch, bitsandbytes, huggingface_hubtorchrun --nproc_per_node=6 train_rtx6.py in nohupupload_hf.py cron job (pushes checkpoints + README to HF)train.logHF sync: Every 60 minutes, pushes latest checkpoint and updated README to HuggingFace.