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

Commit 44bf179

Browse files
committed
Remove --increased-determinism CLI option but leave library change.
1 parent 9366c27 commit 44bf179

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

llama-cli/src/cli_args.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::{Parser, ValueEnum};
1+
use clap::Parser;
22
use llama_rs::TokenBias;
33
use once_cell::sync::Lazy;
44

@@ -103,26 +103,6 @@ pub struct Args {
103103
/// and then as a list of comma seperated string keys and token ID values.
104104
#[arg(long, default_value_t = false)]
105105
pub dump_prompt_tokens: bool,
106-
107-
/// Increase determinism at the possible cost of speed/memory. If set to auto, it
108-
/// will be enabled if the --seed option is specified for more deterministic
109-
/// results (otherwise changing the thread count or batch size can produce
110-
/// different output).
111-
#[arg(long, default_value_t = IncreasedDeterminismSetting::Auto, value_enum)]
112-
pub increased_determinism: IncreasedDeterminismSetting,
113-
}
114-
115-
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
116-
pub enum IncreasedDeterminismSetting {
117-
Auto,
118-
On,
119-
Off,
120-
}
121-
122-
impl IncreasedDeterminismSetting {
123-
pub fn is_enabled(&self, have_seed: bool) -> bool {
124-
(have_seed && self != &Self::Off) || self == &Self::On
125-
}
126106
}
127107

128108
fn parse_bias(s: &str) -> Result<TokenBias, String> {

llama-cli/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ fn main() {
112112
TokenBias::default()
113113
}
114114
}),
115-
116-
increased_determinism: args.increased_determinism.is_enabled(args.seed.is_some()),
115+
..Default::default()
117116
};
118117
let inference_session_params = {
119118
let mem_typ = if args.float16 {

llama-rs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Default for InferenceParameters {
149149
repeat_penalty: 1.30,
150150
temp: 0.80,
151151
bias_tokens: TokenBias::default(),
152-
increased_determinism: false,
152+
increased_determinism: true,
153153
}
154154
}
155155
}

0 commit comments

Comments
 (0)