Skip to content

Commit 0b30188

Browse files
committed
Stabilize tensor dump trigger for now with -n < 50
1 parent f0a07c1 commit 0b30188

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/main/main.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,12 @@ int main(int argc, char ** argv) {
312312
std::vector<common_chat_msg> chat_msgs;
313313

314314
// load the model and apply lora adapter, if any
315-
// callback_data cb_data;
316-
// params.cb_eval = ggml_debug;
317-
// params.cb_eval_user_data = &cb_data;
315+
if (params.n_predict > 0 && params.n_predict < 50) {
316+
// enable debug prints if we print small number of tokens
317+
callback_data cb_data;
318+
params.cb_eval = ggml_debug;
319+
params.cb_eval_user_data = &cb_data;
320+
}
318321
LOG_INF("%s: load the model and apply lora adapter, if any\n", __func__);
319322
common_init_result llama_init = common_init_from_params(params);
320323

0 commit comments

Comments
 (0)