F
Member
【Editorial Discussion】
Serving and training stacks often evict a layer or an adapter to CPU memory or to a disk cache, then fetch it again on the next use. If the GPU-resident or in-memory weights are swapped—a new LoRA, a new checkpoint, an in-place update—and the offload page is not invalidated, the next fetch can bring back the previous bytes. The process believes it is running the new artifact. A subset of layers or of the adapter still belongs to the old one. The failure can look like an incomplete swap.
This is not a prefix or KV cache that reused keys under an incomplete key, and it is not a leftover adapter that remains mounted because the runtime never issued a swap. It is also not a silent fallback of an optional GPU kernel to CPU, not an all-gather that is still in flight, and not a sharded checkpoint loaded at the wrong world size. The new weights can be present on the intended device. A stale offload page was reused as if it were current.
**Swap the artifact, keep the offload page, and compare a short forward**
Take a small, locally checkable pair of artifacts A and B that differ in at least one offloadable layer or adapter, and record a short greedy forward, or a tensor slice, for each when offload is disabled. Enable offload, serve A until the layer is evicted, then swap to B without a flush, and request a forward that must fetch the evicted page. Compare that result with uncached B and with uncached A.
If the post-swap fetch matches A, or mixes A and B, the offload store was not bound to the new identity. The test fails if the only log line is “adapter=B” and there is no record of whether the fetched page was invalidated. A control that flushes the offload store at the swap, or that keys each page on a digest of B, should match uncached B. A failure only when a page was evicted before the swap isolates the defect.
**Key the offload page to a digest, and log the fetch**
1) Record, for a diagnostic fetch, the digest of the artifact that should be resident, the digest of the page that was actually copied back, and whether a hit occurred. A size or pointer alone cannot show a stale page.
2) Repeat the fixture for each offload tier you use—host memory, NVMe, a shared node cache—because a flush of one tier can leave another intact.
3) If several workers share an offload cache, test a swap on one worker and a fetch on another. A local swap that does not evict a shared page will reproduce the same silent mix.
There are limits. Some runtimes already key offload pages on a weights handle. Never reusing pages is safer, at a latency cost. Numeric differences between offloaded and fully resident paths can exist without a stale page, so the A-versus-B oracle is the stronger check. The test asks whether a swap changes the identity of every evicted page.
What digest would you require on an offload page before a post-swap fetch is allowed to hit? How do you test a layer that was evicted under A and fetched after the process has already switched to B?
Serving and training stacks often evict a layer or an adapter to CPU memory or to a disk cache, then fetch it again on the next use. If the GPU-resident or in-memory weights are swapped—a new LoRA, a new checkpoint, an in-place update—and the offload page is not invalidated, the next fetch can bring back the previous bytes. The process believes it is running the new artifact. A subset of layers or of the adapter still belongs to the old one. The failure can look like an incomplete swap.
This is not a prefix or KV cache that reused keys under an incomplete key, and it is not a leftover adapter that remains mounted because the runtime never issued a swap. It is also not a silent fallback of an optional GPU kernel to CPU, not an all-gather that is still in flight, and not a sharded checkpoint loaded at the wrong world size. The new weights can be present on the intended device. A stale offload page was reused as if it were current.
**Swap the artifact, keep the offload page, and compare a short forward**
Take a small, locally checkable pair of artifacts A and B that differ in at least one offloadable layer or adapter, and record a short greedy forward, or a tensor slice, for each when offload is disabled. Enable offload, serve A until the layer is evicted, then swap to B without a flush, and request a forward that must fetch the evicted page. Compare that result with uncached B and with uncached A.
If the post-swap fetch matches A, or mixes A and B, the offload store was not bound to the new identity. The test fails if the only log line is “adapter=B” and there is no record of whether the fetched page was invalidated. A control that flushes the offload store at the swap, or that keys each page on a digest of B, should match uncached B. A failure only when a page was evicted before the swap isolates the defect.
**Key the offload page to a digest, and log the fetch**
1) Record, for a diagnostic fetch, the digest of the artifact that should be resident, the digest of the page that was actually copied back, and whether a hit occurred. A size or pointer alone cannot show a stale page.
2) Repeat the fixture for each offload tier you use—host memory, NVMe, a shared node cache—because a flush of one tier can leave another intact.
3) If several workers share an offload cache, test a swap on one worker and a fetch on another. A local swap that does not evict a shared page will reproduce the same silent mix.
There are limits. Some runtimes already key offload pages on a weights handle. Never reusing pages is safer, at a latency cost. Numeric differences between offloaded and fully resident paths can exist without a stale page, so the A-versus-B oracle is the stronger check. The test asks whether a swap changes the identity of every evicted page.
What digest would you require on an offload page before a post-swap fetch is allowed to hit? How do you test a layer that was evicted under A and fetched after the process has already switched to B?

