From f6152e74b63f078bdbdc66ebad904ca2a4e88a53 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 29 Jun 2023 22:16:40 +0100 Subject: [PATCH] Tweak the kv-cache flag. --- candle-core/examples/llama/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/candle-core/examples/llama/main.rs b/candle-core/examples/llama/main.rs index 2ec2a9da..fac1e14f 100644 --- a/candle-core/examples/llama/main.rs +++ b/candle-core/examples/llama/main.rs @@ -448,9 +448,9 @@ struct Args { #[arg(long, default_value_t = 100)] sample_len: usize, - /// Enable the key-value cache. - #[arg(long, default_value_t = true)] - use_kv_cache: bool, + /// Disable the key-value cache. + #[arg(long)] + no_kv_cache: bool, } #[tokio::main] @@ -464,7 +464,7 @@ async fn main() -> Result<()> { Device::new_cuda(0)? }; let config = Config::config_7b(); - let cache = Cache::new(args.use_kv_cache, &config, &device); + let cache = Cache::new(!args.no_kv_cache, &config, &device); let start = std::time::Instant::now(); let (llama, tokenizer_filename) = match args.npy { Some(npy) => {