Skip to content

Commit

Permalink
Make some types Debug/Clone/Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
iacore committed Apr 6, 2023
1 parent eea9fc7 commit 8591089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llama-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ impl Default for InferenceParameters {
}

/// Statistics about the inference process.
#[derive(Debug, Clone, Copy)]
pub struct InferenceStats {
/// How long it took to feed the prompt.
pub feed_prompt_duration: std::time::Duration,
Expand Down Expand Up @@ -291,6 +292,7 @@ type Token = String;
type TokenScore = f32;

/// The vocabulary used by a model.
#[derive(Debug, Clone)]
pub struct Vocabulary {
/// Maps every integer (index) token id to its corresponding token
id_to_token: Vec<Token>,
Expand Down Expand Up @@ -545,7 +547,7 @@ pub enum InferenceError {
}

/// Used in a call to `evaluate` to request information from the transformer.
#[derive(Default)]
#[derive(Default, Debug, Clone)]
pub struct EvaluateOutputRequest {
/// Returns all the logits for the provided batch of tokens.
/// Output shape is n_batch * n_vocab
Expand Down

0 comments on commit 8591089

Please sign in to comment.