pub struct Logprob {
pub logprob: f64,
pub rank: Option<u32>,
pub decoded_token: Option<String>,
}Expand description
vLLM’s log probability of one token at one position, as reported in the
prompt_logprobs response field.
OpenAI’s logprob objects carry token / logprob / bytes /
top_logprobs; vLLM’s prompt logprobs instead key each position’s map by
token ID and report the vocabulary rank plus the decoded text.
Fields§
§logprob: f64The log probability of this token.
rank: Option<u32>This token’s rank in the vocabulary at this position, starting at 1. Omitted when the server did not compute it.
decoded_token: Option<String>The decoded text of this token.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Logprob
impl<'de> Deserialize<'de> for Logprob
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Logprob
Auto Trait Implementations§
impl Freeze for Logprob
impl RefUnwindSafe for Logprob
impl Send for Logprob
impl Sync for Logprob
impl Unpin for Logprob
impl UnsafeUnpin for Logprob
impl UnwindSafe for Logprob
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