From dc7cef9f373f2a24b851f0df7a618c5209e593fa Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Mon, 6 Jan 2025 22:45:28 +0000 Subject: [PATCH] llama-run : fix context size (#11094) 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 c52a7961fb358..2888fcfed1e15 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;