Reuse Skippy decode wire messages (2/3)#799
Merged
Merged
Conversation
cd1a007 to
aeae536
Compare
dafa489 to
0bbf257
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Skippy split decode now reuses the per-token decode wire-message envelope in the frontend hot path instead of rebuilding the same
StageWireMessageshape every token.This is stacked on #798 and is intentionally scoped to allocation churn around decode message construction. It does not change topology, protocol, sampling, activation dtype, or native stage execution.
What changed
ReusableDecodeMessage, a small frontend wire-message helper that owns the stable decode envelope once.decode_step,pos_start,current_token, and the one-token sideband each iteration.embedded_decode_messagehelper for prefix-cache and repair paths.Before
flowchart LR A["Each decode token"] --> B["Allocate StageStateHeader"] B --> C["Clone sampling config"] C --> D["Allocate tokens Vec"] D --> E["Allocate empty positions/activation/raw Vecs"] E --> F["Run stage + forward activation"]After
flowchart LR A["Before decode loop"] --> B["Create reusable DecodeEmbd message"] B --> C["Each decode token"] C --> D["Mutate step/position/current token"] D --> E["Refill existing token sideband buffer"] E --> F["Run stage + forward activation"]Performance Impact
This targets small but repeated CPU-side work in TPOT:
Vecevery eligible token.This should be a modest fixed-overhead improvement rather than a model-compute improvement. It is designed to compose with #798 and remain easy to benchmark independently once lab capacity is available.
Compatibility
No protocol or ABI changes. The emitted decode wire messages keep the same fields and token sideband semantics.
Validation
cargo fmt -p skippy-server -- --checkcargo check -p skippy-servercargo test -p skippy-server --lib— 116 passedcargo clippy -p skippy-server --all-targets -- -D warningscargo check -p mesh-llmcargo clippy -p mesh-llm --all-targets -- -D warnings