This package is a small executable model of the Tapestry consortium-training vision. It is not a generic FedAvg demo: the PoC keeps the N+1 model outcome front and center.
- 1 shared base model is governed by the consortium coordinator.
- N sovereign model artifacts are produced and owned by participant nodes.
- Nodes train locally on sovereign corpora and share only weight deltas.
- A governed contribution policy applies a quality floor and anti-capture cap before integrating accepted deltas into the shared base.
| Module | Purpose |
|---|---|
model.py |
TinyCausalModel, a small next-token model for fast tests and demos. |
node.py |
SovereignTrainingNode, which runs local continued pretraining and keeps a sovereign model artifact. |
coordinator.py |
ConsortiumCoordinator, which evolves the shared base from governed contributions. |
policy.py |
ContributionPolicy, a minimal quality-floor and anti-capture weighting policy. |
messages.py |
Data classes for sovereign artifacts, contributions, and round results. |
The PoC demonstrates the architecture-level invariants from the ADRs:
- Raw sovereign data stays local.
- Each participant gets a persistent sovereign model artifact.
- The coordinator integrates only governed weight deltas.
- Low-quality contributions can be rejected.
- A single participant's influence can be capped.
It intentionally does not claim frontier-scale training, formal privacy, production governance, or a complete post-training alignment pipeline.