pub struct MtpProposerState {
pub block_table: Vec<u32>,
pub seq_len: usize,
pub last_num_drafted: usize,
pub last_pair_key: Option<usize>,
}Expand description
Per-sequence MTP proposer state.
Fields§
§block_table: Vec<u32>Block table for MTP’s own KV cache.
seq_len: usizeCurrent sequence length in MTP’s KV cache.
last_num_drafted: usizeNumber of drafts produced in the last propose() call. Used by after_verify to know how many entries to trim.
last_pair_key: Option<usize>Sequence-space pair key of the newest drafter row (a forward_one
call with RoPE position p writes pair key p - 1). seq_len alone
cannot locate the drafter in the sequence — without drafter prefill
the row space is compacted (accepted pairs only) and drifts from the
sequence position. None until the first row is written.
Trait Implementations§
Source§impl ProposerState for MtpProposerState
impl ProposerState for MtpProposerState
Auto Trait Implementations§
impl Freeze for MtpProposerState
impl RefUnwindSafe for MtpProposerState
impl Send for MtpProposerState
impl Sync for MtpProposerState
impl Unpin for MtpProposerState
impl UnwindSafe for MtpProposerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more