pub struct PromptTokenLogprob {
pub token_id: u32,
pub logprob: f32,
pub top: Vec<(u32, f32)>,
}Expand description
One scored prompt position: log P(tokens[i+1] | tokens[..=i]) plus
the top-k alternative tokens under the same distribution.
Fields§
§token_id: u32The actual next prompt token (the one being scored).
logprob: f32Log-probability of token_id under this position’s distribution.
top: Vec<(u32, f32)>Top-k (token_id, logprob) alternatives, sorted descending.
Empty when k=0 (logprob-only mode).
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