From 06384305e1d72d07646942165da14cc105c7448f Mon Sep 17 00:00:00 2001 From: AsbjornOlling Date: Tue, 26 Nov 2024 11:13:53 +0100 Subject: [PATCH] always set n_ctx to n_ctx_train --- nobodywho/src/llm.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nobodywho/src/llm.rs b/nobodywho/src/llm.rs index d3d312f..94e0c40 100644 --- a/nobodywho/src/llm.rs +++ b/nobodywho/src/llm.rs @@ -73,6 +73,7 @@ pub fn run_worker( let n_threads = std::thread::available_parallelism().unwrap().get() as i32; let ctx_params = LlamaContextParams::default() .with_seed(seed) + .with_n_ctx(std::num::NonZero::new(model.n_ctx_train())) .with_n_threads(n_threads) .with_n_threads_batch(n_threads);