EvSpark: ~3× lossless speculative decoding for Evo2 7B with hybrid-state rollback #232
dhnihaoya
started this conversation in
Show and tell
Replies: 1 comment 2 replies
|
FYI we recently added sequence packing/batched generation to decode in bionemo's implementation. Might be interesting to see how this would work with that as well. https://github.com/NVIDIA-BioNeMo/bionemo-recipes/tree/main/recipes/evo2_megatron |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi Evo2 team and community — we recently released EvSpark, a lossless speculative decoding implementation for Evo2 7B / StripedHyena2.
TL;DR: EvSpark speeds up single-stream Evo2 7B generation by 3.16× end-to-end in our preprint benchmark, while preserving the target model exactly: greedy decoding is token-for-token identical to native Evo2, and sampling preserves the target distribution through rejection-sampling verification.
The part that turned out to be most interesting was not the drafter itself, but making speculative decoding work correctly and efficiently with Evo2's hybrid inference state.
The systems problem
For a standard Transformer, after verifying a speculative block, rejected tokens can essentially be rolled back by truncating the KV cache.
For StripedHyena2, the inference state is heterogeneous:
A naive snapshot-and-replay implementation works, but requires another target-model forward pass after every partially accepted draft, which removes much of the benefit of speculation.
What we implemented
EvSpark adds a block-verification forward pass + per-position state-slicing protocol.
During verification, we retain the intermediate inference state corresponding to each position in the speculative block. Once the verifier decides how many tokens to accept, the target state is sliced directly to the accepted boundary across the Hyena FIR/IIR and attention KV components.
This avoids replaying the accepted prefix entirely.
With an identity drafter, the speculative infrastructure adds only 1.05–1.16× overhead relative to native decoding in our measurements, including verification and rollback.
On top of that, we trained a small γ-parallel distilled drafter using frozen Evo2 hidden states. At γ=12, the configuration reported in the preprint reaches 3.16× end-to-end speedup on Evo2 7B.
A few other observations:
Links
Code + checkpoints + reproduction:
https://github.com/dhnihaoya/EvSpark
Preprint:
https://www.biorxiv.org/content/10.64898/2026.09.02.749017v1
The repository includes a runnable demo, pretrained drafters, the speculative decoding implementation, and the evaluation/reproduction pipeline.
We'd be very interested in feedback from the Evo2 / Vortex team, particularly on the state-slicing approach. We currently implement this on top of the existing Evo2/Vortex inference stack, but it seems like the underlying mechanism could potentially be useful more generally for block decoding or other inference-time methods on StripedHyena models.
Happy to discuss implementation details or share any additional profiling / ablations that would be useful.
All reactions