Repository navigation
Conversation
|
Thank you, @otarkhan. Keeping a checkpoint just before the latest user message, so that a rewind or an edited last turn doesn't prefill the shared history again, is exactly the right idea, and stopping the prefill at that boundary to capture the recurrent, convolution and ring state is the hard part done carefully. This changes the Python GLM engine, which main no longer carries: the Python engine is frozen at 0.6.6 and we're retiring it rather than adding to it, so we're closing this instead of merging it. The idea carries straight over to the native engine's shared prompt cache ( |
|
Sorry, my bad. Lemme re-open it on the latest TensorFold |
Deleting or replacing the latest user exchange made GLM discard a reusable prompt prefix and prefill the shared history again. This change retains a checkpoint immediately before the latest user message alongside the existing prompt-end checkpoint, so replacements can resume from the shared history while ordinary continuations still use the later checkpoint.
Prefill stops at the rewind boundary to capture recurrent, convolution, pending MTP, and DFlash ring state before later rows overwrite it. Rank 0 sends the boundary to its peer, and cache eviction preserves the newest checkpoint while favoring rewind history within the existing entry and byte limits.
Validation: 28 targeted CPU tests passed, 1 skipped. The new request-flow test runs the real GLM engine and prefill cache path with GPU arithmetic stubbed. A CUDA state-parity test was added but could not run on this Mac. Live CUDA tensor-parallel and client behavior have not been tested or deployed.