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

Commit 4b21d42

Browse files
authored
Merge pull request #113 from iacore/feat-debug
Make some types Debug/Clone/Copy
2 parents eea9fc7 + 8591089 commit 4b21d42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llama-rs/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ impl Default for InferenceParameters {
250250
}
251251

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

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

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

0 commit comments

Comments
 (0)