Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #113 from iacore/feat-debug
Browse files Browse the repository at this point in the history
Make some types Debug/Clone/Copy
  • Loading branch information
philpax authored Apr 6, 2023
2 parents eea9fc7 + 8591089 commit 4b21d42
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 4b21d42

Please sign in to comment.