Skip to content

Repository files navigation

Epochless

Correctness-oriented lifecycle infrastructure for continuously updated online-RL serving.

Epochless studies how a behavior-policy revision can be published, recovered, used, and retired without losing the exact identity of the bytes or the causal history behind emitted tokens. The narrow target is a composition of failure-atomic content-addressed publication, independently checkable execution attestation, and a compact proof that losslessly binds the expanded receipt. Adapter serving, mixed-version execution, and cache management themselves are treated as prior art.

Implemented scope

  • An in-process lifecycle engine with immutable table generations, admission leases, revision-aware KV metadata, trusted completion fences, and equality-validated batch decisions.
  • Separate CPU references for synchronous Gloo publication, crash-recoverable POSIX-filesystem decisions, canonical tensor-rank artifacts, and composed publication recovery.
  • A tiny multi-layer Transformer causal runtime, exact counter sampler, speculative receipt oracle, and tagged/paged-KV state model.
  • Strict verbose, compact-DAG, and streaming causal-proof formats with independent checkers and mutation campaigns.
  • Seven finite-state TLA+ models covering lifecycle, rank publication, crash recovery, paged/causal KV, cache identity, and the certified composition.
tensor revision -> durable rank decision -> admission-bound identity
       -> revision-tagged execution/KV -> causal token receipt -> compact proof

Evidence boundary

The strongest composed evidence in this repository runs on CPU processes, Gloo, and a POSIX filesystem. It does not install tensor-parallel GPU weights, exercise CUDA/NCCL failure cuts, integrate a production model/sampler/KV path, or establish serving performance or model quality. The checked-in accelerator preflight is deliberately non-authorizing: the current lossless revision representation failed its frozen compactness gate. See the claim-to-evidence ledger for permitted wording and the exact remaining gates.

Quick start

Python 3.10+ and PyTorch 2.2+ are required. The complete check also needs a JDK for the pinned TLA+ tools:

uv sync --frozen --all-extras
uv run epochless demo
uv run make check

The full run guide separates unit, research, formal, distribution, and artifact-reproduction checks.

Exact novelty boundary

The data-plane ingredients are prior art:

  • Punica and S-LoRA already establish shared-base, heterogeneous LoRA batching and optimized kernels.
  • DeltaZip (EuroSys 2025) already compresses full-model fine-tuning deltas and continuously batches requests from multiple delta-backed models.
  • dLoRA (OSDI 2024), Toppings (USENIX ATC 2025), LoRAServe, and InfiniLoRA cover adapter merge/migration, loading, rank-aware placement, remote access, disaggregation, and specialized execution.
  • DORA already establishes multi-version, behavior-policy-consistent rollout, bounded staleness, dynamic repartitioning, and same-version KV migration.
  • PipelineRL already retains in-flight sequences across updates and permits mixed-policy generation with stale-KV continuation; its source evidence is pinned in the numerical-rollout audit.
  • Aurora already continuously adapts and hot-swaps a speculative drafter, while AsyncOPD preserves and rebuilds an in-flight prefix under new weights and records the active-version transition token. Those are baselines, not Epochless contributions.
  • Laminar, AReaL, and AsyncFlow already establish major forms of trajectory-level asynchrony, fine-grained update distribution, repacking, delayed updates, and stale-sample handling.
  • vLLM’s LoRA interface already provides per-request adapter selection, runtime load/unload, and in-place adapter replacement intended for asynchronous RL without interrupting inference. The completed source-pinned audit additionally finds fail-free all-rank add completion before API exposure and logical request descriptor persistence across preemption.
  • MinT already manages exported LoRA policy revisions across rollout, update, evaluation, serving, and rollback over shared bases, and explicitly describes register/prewarm/ready before user admission. Revision catalogs, fixed revision selection, adapter-only trainer-to-serving handoff, and prewarm-before-exposure are therefore prior art.
  • SGLang establishes RadixAttention and a production cache-reuse substrate. The later ResidentClaim lowering work shows that public SGLang/HiCache, TensorRT-LLM, and Dynamo expose strong resident-KV substrates even though they do not natively implement that paper's complete claim contract.
  • The completed adjacent semantic-cache audit credits AgentKV, Activated LoRA, cross-model activated-LoRA KV reuse, ResidentClaim, ASymPO, and Attesting LLM Pipelines for proof-gated reuse, position-dependent activation, cross-model cache reuse, accepted-claim identity and fail-closed lifecycle lowering, behavior-probability alignment pressure, and digest-bound promotion provenance, respectively.
  • The completed fault-tolerant serving audit byte-pins DéjàVu, FailSafe, RobustRL, GhostServe, LUMEN, and Concordia. Generic fault-tolerant LLM serving, KV replication/checkpoint/reconstruction, recovery after tensor-parallel GPU loss, device-native checkpoint handlers, and role-isolated RL recovery are therefore baselines rather than Epochless contributions.

The broad novelty hypothesis has therefore been killed: per-request revision selection, fixed revision naming, fail-free all-rank load completion, and prewarm-before-user-exposure cannot be Epochless contributions. Nor can generic content identity, semantic-cache validity, revision-aware KV transitions, or event-ordered reclamation be standalone contributions. Nor can generic fault-tolerant serving or checkpoint/recovery be a contribution. Relative to the bounded audited population—not as an affirmative novelty or priority finding—the only remaining paper-grade target is the composition of:

  1. content-addressed, failure-atomic live-revision publication across ranks, with durable recovery and reconciliation after partial or crash-ambiguous outcomes;
  2. independently checkable mixed-live-revision per-position causal materialization history, plus per-token behavior probability, sampling identity, and draw attestation; and
  3. a lossless compact content-addressed proof binding the exact expanded execution attestation.

This is a target, not an achieved claim. It is only publishable if a real multi-rank engine implementation demonstrates new semantics or measurable benefit beyond the systems above. See the detailed novelty matrix, pinned audit evidence, and claim-to-evidence ledger.

Per-request model/adapter selection, successful collective loading, readiness gating, fixed revision naming, rank coordination, reference counting, revision-aware cache identity, and event-ordered lifetime are not individually claimed as new. They remain correctness prerequisites. The three-part composition above remains only a falsifiable target until a broader review and production evidence establish otherwise.

Target protocol

trainer emits content-verified (base, revision, digest)
                    │
                    ▼
stage + validate on every required execution rank  [successful path is prior art]
                    │
                    ▼
durable decision + reconcile partial effects/rank loss
                    │ all exact rank receipts agree
                    ▼
commit visible revision  ◄── admission pinning itself is prior art
          │                                  │
existing rollout remains pinned v     later rollout pins v+1
          │                                  │
          └── established heterogeneous-delta execution ──┘
                              │
             prefix/paged KV validates exact identity
                              │
           each causal position and emitted token records
        materialization, behavior probability, sampler, and draw
                              │
                 logical completion / cancellation
                              │
             all relevant device-stream events complete
                              │
          descriptors/buffers may be physically reclaimed
                              │
       compact proof losslessly re-expands to exact attestation

A production implementation must define recovery from partial stage/commit, thread the immutable binding through every model and sampling path, associate real paged-KV allocations with the behavior revision, and record/query actual device events. The references below exercise narrower pieces independently; they do not provide that end-to-end integration.

Detailed artifact inventory

  • EpochlessEngine: an in-process authority for local publication, admissions, immutable version leases, scheduler state, KV tags, engine-owned equality-validated batch decisions, logical completion/abort, trusted fences, and registry removal. Publication builds and synchronizes a complete immutable CompiledDeltaTable generation before visibility. Each selected batch pins one generation; inference executes outside the control-plane lock, and the generation remains engine-owned until completion or abort. Known non-CPU work additionally remains quiescing until its trusted fence fires. Assuming constructor-owned copies were formed from source-readable tensors, publication and compaction use conservative device-wide readiness waits and are deliberately blocking.
  • PublicationCatalog: a content-addressed transaction over simulated shard records with deterministic failure injection. It is not an all-rank collective, distributed consensus protocol, or real device transfer.
  • SynchronousGlooPublisher: a separate real-OS-process reference using torch.distributed Gloo envelope exchange and two unanimous votes after every rank digest-validates its immutable local CPU shard bytes. Calls are serialized, synchronous, and fail-stop-free. It does not install tensor-parallel GPU weights, integrate with engine admission, survive process loss, recover ambiguous commits, provide consensus, or make concurrent local visibility globally atomic.
  • The Gloo recovery composition: three spawned ranks exchange strict framed envelopes and canonical CPU tensor artifacts through real Gloo, then hand a validated certificate to the durable coordinator and certified runtime. Its positive handoff, six Gloo cases, four crash cuts, and retirement replay cover missing/crashed ranks, corrupted or misrouted tensor bytes, fencing, lost effects/replies, and natural bounded child exits without parent termination. It is not NCCL, elastic membership, device installation, or a production network failure model.
  • DurableCoordinator: a separate crash-recoverable CPU reference over a shared POSIX filesystem. Content-addressed transactions, durable decisions, monotonic coordinator fencing, idempotent rank replay, and all-rank removal acknowledgements model reconciliation after lost effects or replies. It is not consensus, a network-partition availability protocol, an executor integration, or evidence about device installation and reclamation.
  • Canonical tensor-rank artifacts bind explicit schemas, deterministic tensor-parallel shard ranges, raw little-endian LoRA factor bytes, per-shard/full-tensor/payload digests, and exact rank coverage. The certified authority reassembles a fresh BehaviorRevision from those bytes before admission. This is bounded CPU tensor transport and identity evidence, not device materialization, DMA completion, placement, or kernel visibility.
  • CertifiedRuntime: composes the real POSIX DurableCoordinator with the CPU causal behavior-policy runtime. It rereads and reassembles retained canonical rank tensor artifacts, then verifies publication identity, certificates, rank acknowledgements, token/draw ranges, context, causal evidence, and publication bindings across spawned recovery. It is not a network transport, model-arithmetic proof, consensus, authentication, or GPU execution.
  • GroupedDeltaLinear: one frozen base linear projection plus heterogeneous-rank low-rank updates, with provenance checks. The reference backend applies updates row by row; the default grouped backend performs one pair of eager PyTorch projections per represented version after Python routing. Neither is a fused kernel or a full-transformer implementation. Custom backends are trusted in-process code, not sandboxed tensor consumers.
  • CausalBehaviorPolicyRuntime: a complete tiny multi-layer CPU Transformer oracle with embeddings, normalization, causal attention and per-layer KV, MLPs, a final normalization/output head, revision-specific deltas, and an exact counter sampler. It executes retain/recompute/reject transitions and content-addresses every materialized position and emitted token. This removes any claim that complete Transformer execution is absent from the CPU artifact; it remains a tiny synchronous oracle, not a production full-model engine path, fused backend, or performance result.
  • CounterCategoricalSampler: a standalone request/version/seed/namespace/ configuration-bound CPU reference. Float64 temperature/exponentiation and top-k processing produce binary64 weights, and every positive weight is exactly integerized. Top-p selects the minimal prefix by exact integer/rational comparison. Keyed BLAKE2b block expansion and rejection then select a uniform arbitrary-width integer below the filtered total, with no fixed random grid. Results include the token, exact rational behavior probability, floating-point log-probability, and draw index. A process-local batch plans every row before committing counters, so ordinary planning failures leave them unchanged; caller conversion side effects, process death, and asynchronous exceptions during the small commit loop are outside that guarantee. Snapshot tags detect mutation only from a party that does not know the caller-managed seed: the identity exposes that seed, imposes no entropy policy, and permits replay or forking of valid old snapshots. Snapshots are not authenticated to a build. This is not wired to EpochlessEngine, vLLM, or a GPU sampler; it is not a cryptographic RNG or security boundary, freshness/anti-rollback mechanism, cross-platform bitwise guarantee, exact-real-arithmetic softmax, or proof that every full-LLM source of randomness is isolated.
  • The exact speculative causal artifact executes three real tiny multi-layer CPU Transformer branches: first-proposal rejection/correction, accepted-prefix rejection/correction, and all-accepted plus bonus. It checks all 1,600 ordered three-token exact rational-simplex pairs, rejects 63 ordered independent-checker mutations, and makes preemption plus failures before planning, after planning, and after KV staging retry-atomic. The speculative algorithm is prior art; this is a bounded S2 receipt oracle, not a production speculative decoder.
  • The certified speculative composition joins exact three-rank retained tensor bindings, the speculative receipt, and a directly built schema-v2 target trace in one canonical write-ahead record. Six spawned owners exit at the frozen session/plan/KV/record/memory/finish cuts with code 91; restart reassembles both revisions and replays the durable chain byte for byte. Five lower-level atomic-replace cuts additionally classify admission, record, finish, and retirement writes without guessing their commit point. The campaign rejects 52 composition mutants, all 63 standalone receipt mutants, four retained-tensor authority faults, 504 one-bit minimal-ledger mutants, and 63 truncations. This establishes only the bounded trusted-local CPU conjunction: it is neither a novelty result, authentication of an untrusted producer, a production serving integration, nor accelerator evidence.
  • A tagged-KV ledger plus a separate CPU paged-KV ownership/lifetime model. They exercise revision checks, copy-on-write prefix forks, preemption, migration/recompute choices, page-generation reuse, and a tiny attention oracle. They do not patch a serving engine’s prefix key, allocate production paged KV, execute GPU attention, or demonstrate physical cache reclamation.
  • A completion-fence boundary. An unset trusted fence leaves modeled work quiescing and prevents logical version and batch-generation removal. Logical generation accounting sums table-owned factor numel * element_size; it excludes registry tensors, base weights, external aliases, allocator rounding/caching, and physical reclamation. No CUDA event is recorded or queried, and allocator-visible device reclamation is not demonstrated.
  • EpochlessVLLMAdapter remains a local fail-closed capability contract. Separately, the vLLM v0.25.1 live-revision artifact supplies a Git-format patch applicable to exactly 752a3a504485790a2e8491cacbb35c137339ad34. A standard-library verifier checks the clean base/preimages, nine-path allowlist, apply/index/postimages, syntax, and tamper controls; 32 isolated mocked upstream tests exercise the control-plane protocol. It does not load model weights or establish a working vLLM runtime, CUDA/NCCL behavior, production cache execution, or performance.
  • A deterministic structural simulator and paired multi-seed evaluator. Their outputs are model quantities, not GPU measurements or a DORA reproduction.
  • Verbose and lossless compact causal-execution attestations, strict independent checkers, and a mutation campaign in which nine valid-shaped relational mutants pass the frozen legacy checker but fail every strict verbose, compact, and certified path. The streaming schema-v2 proof builds and verifies over unique content-addressed nodes and constant-size transition references without expanding repeated history on either hot path. Its largest deterministic cell represents 1,052,672 verbose entry occurrences with 4,096 unique nodes, 128 transitions, and 16 tokens. Exact expansion remains an explicit offline operation. These formats are not producer authentication or model-arithmetic verification.
  • A five-dimensional cache-identity product algebra with 1,024 projected keys, 15,872 pair checks, and a negative whole-extra-tuple construction that produces 224 false aliases. This is a bounded semantics check, not a production cache implementation.
  • Seven finite-state TLA+ safety models: local lifecycle, exact-rank publication, crash recovery, paged-KV lifetime, causal KV history, cache identity, and CertifiedCausal at the composed publication-to-causal-serving boundary. The same seven models include two positive CertifiedCausal configurations and two required semantic counterexamples—manifest-only admission and incomplete-rank certification. The frozen one-token run generates 10,302 states, finds 4,046 distinct states, and reaches depth 30. A two-token run generates 33,347 states, finds 12,761 distinct states, and reaches depth 34. Both retain the same bounded two-rank/two-revision/one-request scope. These are finite safety abstractions, not implementation refinement, recurring-crash liveness, hash-collision, tensor, quality, GPU, stream, or Byzantine proofs.
  • A deterministic accelerator preflight contract that validates manifests, stage dependencies, paired-run records, exclusions, bootstrap analysis, and fault-cut reachability. Its committed records are synthetic and cannot authorize or evidence a hardware run.

None of these reference mechanisms changes the novelty boundary above. The CPU/Gloo ballot and recovery composition, durable-filesystem protocol, tensor-byte artifacts, generation bookkeeping, tiny Transformer and speculative oracles, their durable publication-to-proof composition, counter sampling, attestation formats, cache algebra, mutation campaign, source patch, and formal models are evidence-building artifacts for the three-part target, not claimed production systems contributions.

Passing the Python and TLA+ checks establishes properties of these abstractions under their assumptions. It does not establish full-LLM behavior-policy isolation, networked or device-publication atomicity, uninterrupted serving during updates, hardware performance, or physical device-memory reclamation.

Run it

Python 3.10+ and PyTorch 2.2+ are required. The complete make check also requires a JDK, curl, and either sha256sum or shasum; the formal scripts download and verify the pinned official TLA+ tools release. CI uses Java 21.

The committed lock is generated with uv 0.10.2 and is exercised in CI on Linux x86-64. Its frozen dry-run matrix covers manylinux 2.28-compatible x86-64 and AArch64, macOS 14+ on Apple silicon, and Windows x86-64. Intel macOS and older macOS deployment targets are outside the locked artifact because the selected PyTorch release has no compatible wheels:

uv sync --frozen --all-extras
uv run epochless demo
uv run make check

An editable python -m pip install -e ".[dev]" remains supported for development, but it does not consume the locked environment. The lock selects PyTorch's CPU index on Linux because every required CI mechanism is a CPU correctness reference; Linux GPU experiments should select an appropriate accelerator build separately.

Regenerate the paired structural-simulator artifact:

PYTHONPATH=src python experiments/multiseed.py

Exercise the single-projection implementation on the current machine:

PYTHONPATH=src python benchmarks/mixed_version_linear.py \
  --device auto --ranks 4,8,16,32

That command is an operator microbenchmark, not a full-model serving benchmark. No measured performance result from it is asserted in this README.

Run all seven finite-state models with the pinned official TLA+ tool:

./spec/check.sh
./spec/check_rank.sh
./spec/check_crash.sh
./spec/check_paged_kv.sh
./spec/check_causal_kv.sh
./spec/check_cache_identity.sh
./spec/check_certified_causal.sh

See the formal-model notes, the rank-publication model, and the crash-recovery notes for checked invariants, finite configurations, and nonclaims.

Structural simulator output

The checked-in multi-seed report contains five paired Pareto workload traces at a mean modeled offered load of 73.3%. The following are arithmetic means with exact descriptive 95% percentile-bootstrap intervals from all 3,125 ordered resamples of the five workload seeds; no hypothesis test is performed. Units are simulator-native: completed tokens per modeled time unit, modeled time ticks, and base-model-equivalent weight units.

Policy model Modeled completed-token rate Modeled p95 completion time Modeled peak weight units
Barrier drain 4.853 [4.736, 4.965] 2465.9 [2102.9, 2988.7] 1.00×
Two-version double buffer 9.479 [8.726, 10.395] 100.2 [88.9, 109.2] 2.00×
Static full-model version partitions (capacity-fixed baseline; not DORA) 7.846 [7.482, 8.257] 838.4 [598.0, 1127.8] 4.00×
Instantaneous-repacking full-model partitions (zero-cost mechanism model; not DORA/Laminar) 8.504 [8.128, 8.859] 609.7 [323.2, 931.0] 4.00×
Unpartitioned zero-cost full-version upper-bound model 9.479 [8.726, 10.395] 100.2 [88.9, 109.2] 7.00×
Epochless MVCC (shared base + version deltas) 9.479 [8.726, 10.395] 100.2 [88.9, 109.2] 1.13×

The instantaneous-repacking policy assumes free compaction, KV migration, and full-model revision changes. It is neither DORA nor Laminar. The simulator also omits kernels, batching efficiency, communication, transfer bandwidth, contention, and model quality. The table is useful for checking structural consequences of the model; it is not evidence of throughput, latency, utilization, HBM use, or speedup on any hardware.

CPU spend gates already resolved

Five CPU-only results constrain any accelerator campaign:

  • The preregistered structural revision corpus covers seven repositories, 28 checkpoints, 21 adjacent pairs, and 19 exact-schema-compatible pairs. On configuration-continuous pairs, the equal-repository-weight median changed-element fraction is 0.999987; lossless XOR+zlib and modular-delta+zlib retain 0.822492 and 0.82012 of dense bytes. This fixed public LoRA population therefore does not support a sparse elementwise-adjacent-update premise. The smaller 8-bit and 4-bit payloads are lossy and have no task-quality evidence.
  • The preregistered public online-RL trace then measures five real Qwen3.5-4B QLoRA checkpoints from two pinned online-RL subruns (1.70 GB of content-addressed inputs). All three adjacent pairs retain the same base/configuration and exact tensor schema, but 0.9999960.999998 of BF16 elements change. The best exact delta is 0.8344490.840035 of the full adapter file and only improves on zlib-compressing the current payload by 8.5%–9.5%. It therefore fails the frozen 50% compact threshold. Only one final evaluation is archived, so per-checkpoint quality preservation remains unresolved. For the current ordinary lossless-delta encoding, this is a zero-GPU stop result—not a reason to buy a pilot GPU run.
  • The preregistered H8 scheduler screen kills H8 for its declared structural model. The frozen policy has median p99 occupied-retirement lifetime reduction -0.00438468554503 and median modeled throughput loss 0.00250340029769; zero of ten held-out seeds meets the joint 25%/5% threshold, and every secondary regime misses the lifetime threshold. This is a CPU-model falsification, not a hardware result. H8 may not be revived by descriptive hardware lifetime measurements without a new mechanism and preregistration.
  • The causal-attestation benchmark shows that at N=8192,K=16,T=1 retain, the compact DAG uses 0.336x the verbose JSON and 0.628x its verification time, but its checked public constructor costs 31.382x the verbose build. At T=0 it is 95 bytes larger and 1.327x slower to verify. Compact construction never wins build time in the tested cells. This single-host CPU microbenchmark is a design gate: checked compaction must be incremental or off the synchronous serving path; it is not serving or accelerator evidence.
  • The streaming causal proof supplies a bounded schema-v2 CPU construction and checker whose hot paths use unique nodes, edges, and token records; the largest deterministic cell has 12,577 build and 24,864 verify operations instead of the frozen schema-v1 repeated-history work count of 2,109,584. This closes the reference-algorithm question. Mapping capture onto real device-backed engine paths remains a runtime-integration question; it cannot repair the failed revision-size premise.

Exact paper-grade research target

A credible paper must implement and test the exact three-part conjunction: failure-atomic content-addressed all-rank publication with durable recovery; independently checkable mixed-revision per-position and per-token causal, probability, sampler, and draw attestation; and lossless compact proof binding to the exact expanded attestation. Canonical identity, prefix/paged-KV validation, and stream-safe reclamation are mandatory correctness substrate, but the adjacent audit no longer permits them as standalone novelty claims.

The minimum residue is ordered by information per accelerator dollar:

  1. No accelerator—completed, negative: the pinned real online-RL trace has stable schema but fails the compactness threshold, and its archive cannot establish checkpoint-aligned quality. No accelerator stage is authorized for the current ordinary lossless-delta hypothesis. Reopening requires a new compact representation or a different trace under a new frozen protocol.
  2. One cheapest supported CUDA GPU, correctness only—conditional: only after that new representation/quality premise passes, exercise the applied patch through actual production prefix/paged-KV and attention, complete model paths, sampler/speculative decode, graph replay, allocator events, and retirement. Stop on the first mismatch; do not launch 30/50-repetition performance campaigns.
  3. Minimum two-GPU same-node TP/NCCL: test real tensor installation, partial-rank/process loss, ambiguous replies, fencing/reconciliation, device events, physical reclamation, and use-after-free. Stop on any safety violation.
  4. Fused H100-class performance and energy: only after correctness and a replacement representation premise survive, run the frozen H5/H6 performance plan and strongest matched baselines.
  5. Target-scale online-RL quality last: only then test H7, convergence, and learner-consumable throughput.

The exact stop rules and minimum topologies are in the accelerator residue. The committed synthetic preflight is non-authorizing and cannot skip any stage. “CPU closure” means completion of the declared high-value bounded pre-accelerator obligations, not every conceivable CPU experiment.

The broad adapter-lifecycle novelty criterion has already fired. The remaining thesis should be rejected or reduced to an engineering note if stock vLLM with fresh immutable IDs and no physical removal plus existing claim/cache systems supplies equivalent semantics with negligible changes, real online revisions do not remain compact over a stable base at preserved quality, compact proof construction cannot leave the hot path, or tuned version-dedicated orchestration matches the complete design.

See the design, research plan, and paper outline.

License

Apache-2.0.

About

Correctness-oriented lifecycle infrastructure for online-RL serving with failure-atomic publication, causal attestation, compact proofs, and crash recovery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages