Struct llm_base::EvaluateOutputRequest
source · pub struct EvaluateOutputRequest {
pub all_logits: Option<Vec<f32>>,
pub embeddings: Option<Vec<f32>>,
}Expand description
Used in a call to Model::evaluate or InferenceSession::infer to request
information from the model. If a value is set to Some, the Vec will be
cleared, resized, and filled with the related data.
Fields§
§all_logits: Option<Vec<f32>>Returns all the logits for evaluation. A logit represents the likelihood
that a given token will be generated based on the tokens that have been
evaluated or generated so far. Output shape is n_batch * n_vocab.
embeddings: Option<Vec<f32>>Returns all the embeddings for an evaluation. An embedding is a vector
that measures the relatedness of text strings. Output shape is
n_batch * n_embd.
Trait Implementations§
source§impl Clone for EvaluateOutputRequest
impl Clone for EvaluateOutputRequest
source§fn clone(&self) -> EvaluateOutputRequest
fn clone(&self) -> EvaluateOutputRequest
Returns a copy 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 moresource§impl Debug for EvaluateOutputRequest
impl Debug for EvaluateOutputRequest
source§impl Default for EvaluateOutputRequest
impl Default for EvaluateOutputRequest
source§fn default() -> EvaluateOutputRequest
fn default() -> EvaluateOutputRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for EvaluateOutputRequest
impl Send for EvaluateOutputRequest
impl Sync for EvaluateOutputRequest
impl Unpin for EvaluateOutputRequest
impl UnwindSafe for EvaluateOutputRequest
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