pub struct PromptTokenLogprob {
pub token_id: u32,
pub logprob: f32,
pub top: Vec<(u32, f32)>,
}Expand description
2026-09-25: One scored prompt position: log P(tokens[i+1] | tokens[..=i]) plus the top-k
alternatives under the same distribution.
Fields§
§token_id: u322026-09-25: The next prompt token, the one scored.
logprob: f32§top: Vec<(u32, f32)>2026-09-25: Top-k (token_id, logprob) alternatives, highest first; empty when k == 0.
Trait Implementations§
Source§impl Clone for PromptTokenLogprob
impl Clone for PromptTokenLogprob
Source§fn clone(&self) -> PromptTokenLogprob
fn clone(&self) -> PromptTokenLogprob
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PromptTokenLogprob
impl RefUnwindSafe for PromptTokenLogprob
impl Send for PromptTokenLogprob
impl Sync for PromptTokenLogprob
impl Unpin for PromptTokenLogprob
impl UnwindSafe for PromptTokenLogprob
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