Real Model Merge Lab
Merge actual HuggingFace models using any of 26 CRDT-verified strategies. 75+ models across 28 architecture families -- select a compatible family, then pick any two models to merge.
The merged model is downloadable as .npz (load with np.load() in any framework) with a full provenance audit trail and produced model card.
| Size | Download Time |
|---|---|
| <50MB | Fast (seconds) |
| 50-200MB | Medium (under a minute) |
| 200-500MB | Slow (1-3 minutes) |
| >500MB | Very slow (3+ minutes) |
Models within the same family share architecture and hidden dimensions -- guaranteed compatible for merging.
Model A
All models in this dropdown are compatible with Model B.
Model B
Pick a different model from the same family to merge with Model A.
All 26 CRDT-verified strategies. Task-vector strategies use the mean of both models as base.
Per-Layer Provenance & Analysis
Download Merged Artifacts
Pick a strategy. Merge two models. See the mathematical proof that merge(A,B) == merge(B,A).
Uses real prajjwal1/bert-tiny weights from HuggingFace Hub when available, otherwise synthetic tensors.
Note: Some strategies may produce similar or identical outputs with only 2 models at equal weights — this is mathematically expected. Differences become significant with 3+ models or real fine-tuned weights.
26 strategies. Task-vector strategies (ties, dare, etc.) use a synthetic base.
Per-Layer Provenance
Every strategy tested live against all three CRDT laws — commutativity, associativity, idempotency. The two-layer OR-Set architecture makes any strategy CRDT-compliant without modifying the strategy itself.
Full Compliance Matrix
The Mathematical Proof — Naive vs crdt-merge
The Mathematical Proof — Naive vs crdt-merge
Standard merge strategies fail associativity: merge(merge(A,B), C) ≠ merge(A, merge(B,C)).
crdt-merge's OR-Set layer absorbs this — the gap drops to exactly 0.0 for every strategy.
How to read the proof table:
- Naive Assoc Gap ‖g₁−g₂‖: The L2 norm between two different groupings of a 3-way merge without crdt-merge. Non-zero values prove the raw strategy isn't associative.
- CRDT Gap ‖g₁−g₂‖: The same test with crdt-merge's OR-Set layer. 0.0 means the architecture makes the strategy fully associative.
- Bar Chart: Visual comparison — tall red bars (naive) vs flat green bars (crdt-merge). The bigger the red bar, the more the raw strategy violates associativity. Green bars at zero prove the fix.
Associativity Verification
Real benchmark results from NVIDIA A100-SXM4-40GB · v0.7.1 · Python 3.12. Polars engine peak: 38.8× speedup over Python at 500K rows. Streaming merge: O(1) memory verified — throughput dead-flat from 100K to 5M rows.
Raw Benchmark Data (A100 v0.7.1)
10,000,000 | 219K/s | 6.8M/s | 32.8× |
10,000 | 219K/s | 42K/s | 0.2× |
50,000 | 207K/s | 6.8M/s | 32.8× |
100,000 | 225K/s | 8.3M/s | 37.0× |
500,000 | 217K/s | 8.4M/s | 38.8× |
1,000,000 | 225K/s | 7.9M/s | 35.2× |
5,000,000 | 223K/s | 5.0M/s | 22.5× |
10,000,000 | 225K/s | 4.8M/s | 21.4× |
🏆 crdt-merge vs mergekit vs FedAvg — Live Benchmark
Live proof of order-independence. This benchmark merges 3 model weight tensors in all 6 possible orders using crdt-merge vs naive pairwise merging. crdt-merge produces identical results every time. Naive approaches (including FedAvg-style averaging) produce different results depending on merge order.
Click Run Live Benchmark to see the proof, or scroll down for the feature comparison.
📋 Feature Comparison — crdt-merge vs mergekit vs FedAvg
Detailed Feature Comparison
Deterministic Result | Field-level encryption + RBAC | ~8 (no convergence guarantee) | Centralized (parameter server) |
Merge Strategies | 26 (all CRDT-compliant) | ~8 (no convergence guarantee) | 1 (weighted average) |
Commutativity | Proven (all strategies) | Not guaranteed | Order-dependent |
Associativity | Proven (all strategies) | Not guaranteed | ️ Empirical only |
Idempotency | Proven (all strategies) | Not guaranteed | Not addressed |
Deterministic Result | Always (any merge order) | Varies with order | Varies with client selection |
Audit Trail | Built-in provenance chain | None | None |
GDPR Compliance | Art. 17 erasure built-in | No support | No support |
HIPAA / SOX | Field-level encryption + RBAC | No support | No support |
Architecture | Decentralized (gossip/P2P) | Client-side only | Centralized (parameter server) |
Network Partitions | Handles gracefully | N/A (not distributed) | Requires coordinator |
Transport Layer | Wire protocol + Merkle sync | None | ️ gRPC (centralized) |
Dependencies (core) | Zero | PyTorch, safetensors | PyTorch, gRPC, NumPy |
LoRA Support | Rank harmonization | Basic support | Not native |
MergeQL (query DSL) | SQL-like merge queries | None | None |
License | BUSL-1.1 → Apache 2.0 (2028) | Apache 2.0 | Apache 2.0 |
Explore the architecture layers, distributed protocols, and domain-specific merge capabilities.
Two-Layer Architecture — The Key Innovation
┌──────────────────────────────────────────────────────────────────────┐
│ LAYER 1 — OR-Set CRDT State (CRDTMergeState) │
│ │
│ Contributions arrive in ANY order from ANY node │
│ OR-Set union: commutative + associative + idempotent by definition │
│ Every contribution: content-addressed (SHA-256 Merkle hash) │
│ Version vectors for causal ordering │
│ Tombstones for safe remove/replace operations │
│ │
│ merge(state_a, state_b) → set union ← CRDT laws guaranteed here │
└──────────────────────────────────────────────────────────────────────┘
│ resolve() — applied atomically
▼
┌──────────────────────────────────────────────────────────────────────┐
│ LAYER 2 — Strategy Execution (pure function over sorted set) │
│ │
│ Sees a SET — ordering non-determinism completely absorbed │
│ 26 strategies: weight_average, slerp, ties, dare, fisher, dual_ │
│ projection, evolutionary, negative, safe_merge, and 18 more ... │
│ Same inputs → always same output (determinism via canonical sort) │
│ │
│ f(sorted_set_of_contributions) → merged_tensor │
└──────────────────────────────────────────────────────────────────────┘
Why this works: Layer 1 guarantees all replicas converge to the same set of inputs. Layer 2 guarantees the same set → same output. Together: full CRDT convergence for any strategy.
Each node maintains a CRDTMergeState. Nodes exchange states via merge() — no coordinator required. Convergence is guaranteed regardless of message order, late joiners, or network partitions.
Gossip Audit Log (last 50)
4 AI agents independently gather facts with different confidence scores. SharedKnowledge.merge() produces identical results regardless of merge order — proving CRDT convergence for multi-agent systems (CrewAI, AutoGen, LangGraph).
Fact Convergence: Order 1 vs Order 2 (reversed)
Individual Agent States
Express CRDT merges as SQL statements. MergeQL compiles to CRDTMergeState operations internally.
How to read MergeQL results:
- Result Table: The merged output rows after executing your query. Conflicts between overlapping records are auto-resolved by the specified strategy (default: LWW).
- Query Plan (JSON): Shows how MergeQL decomposed your query — which sources are being merged, the merge key, conflict resolution strategy, and optimization steps applied.
- EXPLAIN prefix: Add
EXPLAINbefore any query to see the plan without executing. Useful for understanding how complex merges will be processed.
Result (first 20 rows)
Merges two partitions of glue/sst2 with configurable per-field strategy. Verifies commutativity: merge(A, B) must return the same records as merge(B, A).
Merged Records (first 20)
Strategy Conflict Comparison
Wire format serialization, round-trip proof, Merkle tree integrity verification, and VectorClock causal ordering.
Round-trip Serialization Proof
MerkleTree
VectorClock
Provenance Registry
Regulatory Compliance & Audit Trail Demonstration
crdt-merge is the only model merging library with built-in compliance capabilities for GDPR, HIPAA, SOX, and the EU AI Act. This tab demonstrates live compliance operations.
How it works: The OR-Set CRDT tracks every contribution by origin node. This enables complete audit trails, deterministic erasure (GDPR Art. 17), and field-level access control — all while maintaining mathematical convergence guarantees.
Select an action to demonstrate
Audit Log
E4 Recursive Trust-Delta Protocol
Trust as a first-class CRDT dimension. Every merge carries cryptographic proof of provenance. E4 activates transparently on import crdt_merge (v0.9.5+).
Run a multi-contributor model merge with live Byzantine detection.
Symbiotic Lattice Trust detects 5 classes of Byzantine misbehaviour.
6-dimensional trust scoring, evidence recording, and lattice convergence.
Trust-Bound Merkle, PCO wire format, and live throughput benchmarks.
Why crdt-merge Is Novel & Disruptive
crdt-merge is the first library to apply formal CRDT mathematics to ML model merging, data integration, and multi-agent AI — simultaneously.
No other framework provides all three of these guarantees:
| Property | What it means | Why it matters |
|---|---|---|
| Commutativity | merge(A, B) == merge(B, A) |
No coordinator needed — any node can merge in any order |
| Associativity | merge(merge(A, B), C) == merge(A, merge(B, C)) |
Pairwise gossip converges to the same global state |
| Idempotency | merge(A, A) == A |
Network retries and duplicate messages are harmless |
What makes this disruptive:
- No Parameter Server — Federated model merging without a central coordinator. Teams merge fine-tuned models peer-to-peer with mathematically guaranteed convergence.
- 26 Merge Strategies — From simple weighted average to DARE-TIES, Fisher-weighted, and novel spectral methods like STAR and SVD Knot Tying — all wrapped in CRDT-compliant OR-Set semantics.
- Cross-Domain Unification — The same
merge()primitive works for DataFrames, ML tensors, agent memory, and knowledge graphs. One theory, one API. - Provenance & Compliance Built In — Every merge is auditable, reversible (via CRDT
remove()), and GDPR/HIPAA/SOX/EU AI Act compliant by default.
AI & ML Model Merging
Merge fine-tuned models from independent teams — no central server, guaranteed convergence.
| Use Case | Guide | What You'll Learn |
|---|---|---|
| Federated Model Merging | 📖 Guide | CRDTMergeState, peer-to-peer model merge, 26 strategies, gossip convergence |
| Model Merge Strategies | 📖 Guide | SLERP, TIES, DARE, DARE-TIES, Fisher, RegMean, Model Breadcrumbs, and more |
| Strategy × CRDT Matrix | 📖 Guide | Which strategies satisfy which CRDT properties — commutativity, associativity, idempotency |
| LoRA Adapter Merging | 📖 Guide | LoRAMerge, LoRAMergeSchema, per-layer strategy selection for adapter fusion |
| Continual Learning | 📖 Guide | ContinualMerge, replay buffers, EWC integration — merge without catastrophic forgetting |
Data & Records
Merge distributed DataFrames, resolve conflicts deterministically, query merged data with SQL.
| Use Case | Guide | What You'll Learn |
|---|---|---|
| CRDT Fundamentals | 📖 Guide | OR-Set, LWW-Register, G-Counter theory — the math behind every merge |
| CRDT Primitives | 📖 Guide | Working code for every primitive type — GCounter, PNCounter, ORSet, LWWMap |
| Verification Toolkit | 📖 Guide | verify_crdt, verify_commutative, property-based testing for your own strategies |
| Merge Strategies | 📖 Guide | LWW, MaxWins, MinWins, UnionSet, Priority, Custom — pick the right one |
| Schema Evolution | 📖 Guide | Backwards-compatible schema changes across distributed systems |
| MergeQL | 📖 Guide | SQL-like merge interface — MERGE ... USING strategy ... ON key |
| Probabilistic Analytics | 📖 Guide | HyperLogLog, MinHash, Count-Min Sketch — approximate analytics over CRDTs |
| Performance Tuning | 📖 Guide | parallel_merge, chunking, DuckDB acceleration, profiling |
Transport & Sync
Move states between nodes efficiently — gossip, delta sync, Merkle verification.
| Use Case | Guide | What You'll Learn |
|---|---|---|
| Wire Protocol | 📖 Guide | Binary serialization, serialize/deserialize, peek_type — the bytes on the wire |
| Gossip & Serverless Sync | 📖 Guide | GossipState, peer-to-peer propagation, convergence proofs |
| Delta Sync & Merkle | 📖 Guide | Bandwidth-efficient sync, content-addressed integrity verification |
Agentic & Context
Multi-agent AI systems with convergent shared memory — no message ordering required.
| Use Case | Guide | What You'll Learn |
|---|---|---|
| Convergent Multi-Agent AI | 📖 Guide | AgentState, ContextMerge, ContextManifest — agents that converge without coordination |
| Agentic Memory at Scale | 📖 Guide | ContextBloom, MemorySidecar, budget-bounded merge for large-scale agent systems |
Privacy, Provenance & Compliance
Every merge is auditable, reversible, and regulation-compliant.
| Use Case | Guide | What You'll Learn |
|---|---|---|
| Provenance — Complete AI | 📖 Guide | AuditLog, AuditedMerge, tamper-evident hash chains |
| Right to Forget | 📖 Guide | CRDT remove(), GDPR Article 17 erasure, model unmerge |
| Privacy-Preserving Merge | 📖 Guide | EncryptedMerge, field-level encryption, RBAC-gated merge |
| Security Hardening | 📖 Guide | Threat model, key rotation, audit log integration |
| Security Guide | 📖 Guide | Encryption backends, StaticKeyProvider, RBAC policy definitions |
| Compliance Guide | 📖 Guide | GDPR Art.5, HIPAA PHI safeguards, SOX controls, EU AI Act alignment |
️ Architecture & Research
| Resource | Link | Description |
|---|---|---|
| System Overview | 📖 Overview | 6-layer architecture, 44,304 LOC, 104 modules, design philosophy |
| Layer Map | 📖 Layers | What each layer does, what it depends on, key classes |
| Data Flow | 📖 Data Flow | How data moves through merge → resolve → wire → gossip pipelines |
| Design Decisions | 📖 Decisions | Why OR-Set over LWW-Map, why 6 layers, why no external dependencies in core |
| Dependency Graph | 📖 Dependencies | Module-level dependency analysis — strict downward-only |
Learning Path
| Step | What | Time |
|---|---|---|
| 1 | CRDT Fundamentals — OR-Sets, convergence, the math | 15 min |
| 2 | CRDT Primitives Reference — hands-on with every type | 20 min |
| 3 | Merge Strategies — pick the right strategy | 10 min |
| 4a | Data path: MergeQL → Performance Tuning | 30 min |
| 4b | ML path: Federated Model Merging → LoRA | 30 min |
| 4c | Agent path: Convergent Multi-Agent AI | 20 min |
| 4d | Compliance path: Provenance → Compliance | 25 min |
Troubleshooting Guide — common errors and fixes when working with crdt-merge.
crdt-merge v0.9.5 · E4 Trust-Delta · BUSL-1.1 → Apache 2.0 (2028-04-08)
🏠 Flagship · 🔬 Data Playground · 🌐 Federation · GitHub · ⭐ Star Repo · 👁️ Watch · 📐 Architecture Deep Dive · PyPI · pip install crdt-merge