]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama-run : fix context size (#11094)
authorEric Curtin <redacted>
Mon, 6 Jan 2025 22:45:28 +0000 (22:45 +0000)
committerGitHub <redacted>
Mon, 6 Jan 2025 22:45:28 +0000 (23:45 +0100)
Set `n_ctx` equal to `n_batch` in `Opt` class. Now context size is
a more reasonable 2048.

Signed-off-by: Eric Curtin <redacted>
examples/run/run.cpp

index c52a7961fb3580eb39788ebde01078396e275a7a..2888fcfed1e15576d2f9f0557900a6e82e819884 100644 (file)
@@ -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;