From 62fe73d4b510caa70742c56fe4c8293eaa7d1d29 Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Sun, 5 Jan 2025 23:03:06 +0000 Subject: [PATCH] Context size by default should be 2048, not 512 Set `n_ctx` equal to `n_batch` in `Opt` class. Now context size is a more reasonable 2048. Signed-off-by: Eric Curtin --- examples/run/run.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/run/run.cpp b/examples/run/run.cpp index 75b817272..c142319a3 100644 --- a/examples/run/run.cpp +++ b/examples/run/run.cpp @@ -83,6 +83,7 @@ class Opt { } ctx_params.n_batch = context_size >= 0 ? context_size : context_size_default; + ctx_params.n_ctx = ctx_params.n_batch; model_params.n_gpu_layers = ngl >= 0 ? ngl : ngl_default; temperature = temperature >= 0 ? temperature : temperature_default;