Skip to content

Commit

Permalink
llama-run : fix context size (ggerganov#11094)
Browse files Browse the repository at this point in the history
Set `n_ctx` equal to `n_batch` in `Opt` class. Now context size is
a more reasonable 2048.

Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin authored Jan 6, 2025
1 parent ecebbd2 commit dc7cef9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/run/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit dc7cef9

Please sign in to comment.