Vertical Model Cascade & Composable Multi-LoRA Swarm Flywheel Architecture
Separating horizontal shard concurrency (4 workerd cells, q01..q16) from vertical model routing and specialist LoRA adaptation
4-Tier Vertical Compute & Model Cascade
Tier 0: 0-Call Reflex Lookup & In-Process Context Shim (< 1 ms, $0)
BM25 lexical index + structural tag affinity + RRF(k=60) + 0/1 DP token-budget
knapsack; injects mandatory negative tombstones before Attempt-2 repairs
Tier 1: Calibrated Compact Router & Deterministic Checks (1B Gate)
Temperature-scaled skill logits + normalized Shannon entropy abstention gate;
executes schema, SHA-256 CAS, coverage, and embargo unit checks at zero model cost
Tier 2: Shared Base Backbone (Llama-3.2-3B) + 4 Hot-Swapped LoRA Modules
DecomposerSFT LoRA
Retriever ShimSFT LoRA
Builder MCPSFT LoRA
Verifier AlignDPO LoRA
Tier 3: Frontier Synthesis Escalation (10 Real OpenCode v2.1.2 Runs)
kimi-k2.7-code & muse-spark-1.3-contributor behind hard $0.40 spend gate
Observed total spend = $0.0007 USD; solutions distill downward into Tier 2 LoRAs
5 Modular Worker Roles (256 Scoped Principals) -> 4 Cells
Requesters48 keys
Decomposers32 keys
Retrievers32 keys
Builders88 keys
Verifiers56 keys
cell-01q01 .. q04SQLite DO + D1
cell-02q05 .. q08SQLite DO + D1
cell-03q09 .. q12SQLite DO + D1
cell-04q13 .. q16SQLite DO + D1
DAG Split & Negative-Tombstone Self-Correction Loop
request -> split(search -> build -> verify -> independent_review)
15% Attempt-1 flaws -> verifier writes swarm.tombstones -> Attempt-2 repair -> DPO pair
Verified Trace Flywheel Output (2700 SHA-256-Pinned Rows)
swarm_sft_decomposer | swarm_sft_retriever_shim | swarm_sft_builder_toolcalls
swarm_dpo_verifier_pairs (Att2 chosen vs Att1 rejected) + 200 unseen holdout
Closed-Loop Data Starvation Solution: Modularity + Horizontal Sharding + Vertical Distillation
1. Horizontal scalability shards stateful leases across independent SQLite Durable Object cells (cell-01..04, q01..q16) with zero lock contention.
2. Every verified receipt and Attempt-1 -> Attempt-2 tombstone repair compiles directly into SFT + DPO adapters (`verifier_key != builder_key`).