summaryrefslogtreecommitdiff
path: root/examples/perplexity
diff options
context:
space:
mode:
Diffstat (limited to 'examples/perplexity')
-rw-r--r--examples/perplexity/perplexity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp
index 1b760683..3a1c8c28 100644
--- a/examples/perplexity/perplexity.cpp
+++ b/examples/perplexity/perplexity.cpp
@@ -693,9 +693,10 @@ int main(int argc, char ** argv) {
return 1;
}
- if (params.n_ctx > llama_n_ctx(ctx)) {
- fprintf(stderr, "%s: warning: model might not support context sizes greater than %d tokens (%d specified);"
- "expect poor results\n", __func__, llama_n_ctx(ctx), params.n_ctx);
+ const int n_ctx_train = llama_n_ctx_train(ctx);
+ if (params.n_ctx > n_ctx_train) {
+ fprintf(stderr, "%s: warning: model was trained on only %d context tokens (%d specified)\n",
+ __func__, n_ctx_train, params.n_ctx);
}
// print system information