aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorRonsor <ronsor@ronsor.pw>2023-03-18 17:10:47 -0700
committerGitHub <noreply@github.com>2023-03-18 20:10:47 -0400
commitd7def1a7524f712e5ebb7cd02bab0f13aa56a7f9 (patch)
treeda932c4b380d0f1449aea58bdf3cdf57be56f70c /main.cpp
parent6f61c18ec9a30416e21ed5abfb1321bdb14979be (diff)
Warn user if a context size greater than 2048 tokens is specified (#274)
LLaMA doesn't support more than 2048 token context sizes, and going above that produces terrible results.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index c88405b..105dd91 100644
--- a/main.cpp
+++ b/main.cpp
@@ -792,6 +792,11 @@ int main(int argc, char ** argv) {
if (gpt_params_parse(argc, argv, params) == false) {
return 1;
}
+
+ if (params.n_ctx > 2048) {
+ fprintf(stderr, "%s: warning: model does not support context sizes greater than 2048 tokens (%d specified);"
+ "expect poor results\n", __func__, params.n_ctx);
+ }
if (params.seed < 0) {
params.seed = time(NULL);