pub struct TreeNode {
pub token_id: TokenId,
pub parent: Option<usize>,
pub children: Vec<usize>,
pub depth: usize,
pub cumulative_prob: f32,
}Expand description
Node in a speculative candidate tree (used in tree-based speculative decoding like Medusa / Eagle).
Fields§
§token_id: TokenId§parent: Option<usize>§children: Vec<usize>§depth: usize§cumulative_prob: f32Trait Implementations§
impl StructuralPartialEq for TreeNode
Auto Trait Implementations§
impl Forget for TreeNode
impl Freeze for TreeNode
impl Move for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl UnwindSafe for TreeNode
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