# Planet Bridging — Live AI Model Ingestion into Loom (v0.5)

> Planet Bridging streams live PyTorch, TensorFlow, JAX, and scikit-learn weights into Loom .entity checkpoints — twelve bedrock layers validated, Welvet Ladder three-way compare, vs ONNX Runtime, LiteRT, ExecuTorch, and Core ML.

Canonical: https://openfluke.com/loom/planetbridging

---

Planet Bridging v0.5.0 · planets → Loom
Universal AI engine bridging
Each major AI runtime is its own planet — PyTorch, TensorFlow, JAX, scikit-learn — with closed formats,
operator dialects, and hardware-specific math. Planet Bridging is the live ingestion layer that streams
in-memory weights from those planets into Loom’s deterministic .entity runtime — no lossy
offline conversion chain, no re-export circus per OS.
github.com/planetbridging
Deep research PDF
Loom research
Loom overview
Architecture
Live stream, not static compile
Traditional edge deployment exports models ahead-of-time (ONNX, FlatBuffer, Core ML packages). Planet Bridging instead
captures active weights inside the native Python process, serializes topology + parameters into a JSON
layer stream, and POSTs to /api/v1/loom/stream/* . Loom’s Go compare host rebuilds the graph via
bridge.BuildNetworkFrom*Stream and compiles a binary .entity checkpoint.
[ PyTorch ] ──┐
[ TensorFlow ] ──┼── (JSON layer stream) ──► Loom compare host ──► .entity
[ JAX ] ──┤ via bridge.BuildNetworkFrom*Stream
[ scikit-learn ] ──┘
Flagship walkthrough: 01_hello_stream.py runs a dense MLP ( mlp_32_64_32_16_8_relu ),
streams live PyTorch weights, saves .entity , and validates Loom vs native on a shared test vector within
fp32 tolerance. Multi-head attention fixtures like mha_8_2_4 use the same pipeline.
Validation
Twelve bedrock layers — stream & compare status
Every standard Loom volumetric layer type has a live-stream bedrock. Empirical compare against native engines (v0.5.0):
Bedrock layer
Source engines
Loom stream
Loom compare
Tolerance
Dense PyTorch, TensorFlow, JAX, scikit-learn PASS 43/48 PASS fp32 < 1e-5
CNN1 / CNN2 / CNN3 PyTorch, TensorFlow, JAX PASS 12/12 each fp32 < 1e-5
Multi-Head Attention PyTorch, TensorFlow, JAX PASS 12/12 fp32 < 1e-5
LSTM PyTorch, TensorFlow, JAX PASS 12/12 fp32 < 1e-5
Simple RNN PyTorch, TensorFlow, JAX PASS 12/12 fp32 < 1e-5
LayerNorm PyTorch, TensorFlow, JAX PASS 24/24 fp32 < 1e-5
Embedding PyTorch, TensorFlow, JAX PASS 24/24 EXACT bit-exact
RMSNorm PyTorch, TensorFlow, JAX PASS 24/24 fp32 < 1e-5
SwiGLU PyTorch, TensorFlow, JAX PASS 24/24 fp32 < 1e-5
Residual PyTorch, TensorFlow, JAX PASS 24/24 fp32 < 1e-5
Mixer v1 PyTorch, TensorFlow, JAX PASS 3/3 fp32 < 1e-5
Mixer v2 PyTorch, TensorFlow, JAX PASS 3/3 POC ~5e-5 (12 types)
Examples
Python examples in planetbridging/examples/
Install pip install planetbridging[pytorch] welvet or clone the repo. Each script streams live weights — no HTTP required for the pip path.
01_hello_stream.py
One bedrock, one engine — the canonical dense MLP stream + .entity save.
02_all_layer_types.py
All 13 Loom layer types exercised on PyTorch fixtures.
03_cross_engine.py
Same bedrocks across PyTorch, TensorFlow, and JAX.
04_multi_layer_models.py
4-layer MLP, 2-layer CNNs, and Mixer v2 stacks.
05_welvet_ladder.py
Welvet Ladder — three-way validation: native → loom-stream → welvet reload from .entity .
06_showcase_everything.py
Full API tour; use --quick for a faster smoke run.
Batch run from git checkout: ./examples/run_all_examples.sh · outputs land in ./.planetbridging/examples/
Edge training
DNVM + M-POLY-VTD after absorption
Bit-exact determinism
Loom’s pure-Go DNVM keeps cross-platform parity tight enough for on-device training — same graph, same math on WASM, mobile, and desktop.
21 dtypes per layer
M-POLY-VTD morphs precision per spatial cell — FP32 down to 1-bit binary — without rebuilding the whole network.
Dual optimization paths
Standard backprop in pure Go, plus Neural Target Propagation (Tween) for localized Hebbian updates with lower peak memory.
Comparison
Planet Bridging vs other edge runtimes
Dimension
Loom + Planet Bridging
ONNX Runtime
LiteRT (TFLite)
ExecuTorch
Core ML
Ingestion
Dynamic stream from live Python memory → .entity
Static ONNX graph compile
TF → FlatBuffer convert
PyTorch → compiled .pte
coremltools convert
Multi-engine in
PyTorch, TF, JAX, sklearn unified
ONNX exports from many libs
TF-centric; others via tools
PyTorch export path
Apple toolchain only
In-memory absorption
Yes — JSON stream → binary entity
Offline export only
Pre-built flat files
Static compiled graphs
Compiled bundles
Edge training
Native backprop + Target Prop in-engine
Split-phase ORT training artifacts
Signature-based trainable weights
Federated / orchestrated paths
Pre-flagged updatable layers
Cross-platform parity
Bit-exact DNVM target
Varies by EP / vendor libs
Platform float drift
Delegate-dependent
Apple Silicon optimized
Vendor lock-in
Pure Go · zero CGO core
Multi-platform but heavy
Google mobile stack
Meta / PyTorch ecosystem
Apple hardware
Full analysis:
AI Model Bridging and Runtime Comparison
(PDF) · also on the Loom research page.
Roadmap
Version halves — into Loom, then out of Loom
v0.5.0 · now
Planets → Loom (complete)
Thirteen compare tabs, twelve layer bedrocks, Mixer v2 — live stream ingestion validated.
v1.0.0
Loom → other engines (Phase B)
Native exporters to ONNX, Safetensors, GGUF — models flow back to llama.cpp, ORT, Core ML, and friends.
v1.x
Offline file ingest (Phase C)
Load Safetensors, GGUF, ONNX directly into the compare host without a live Python planet.
v1.x → 2.0
Depth + polish (Phase D)
More layer types, expanded training surfaces, edge execution optimizations.
