examples : make n_ctx warning work again (#3066)
This was broken by commit e36ecdcc
("build : on Mac OS enable Metal by
default (#2901)").
This commit is contained in:
parent
94f10b91ed
commit
e64f5b5578
5 changed files with 33 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue