Skip to content

Feature Request: Explain reason for stopping #15553

@jrincayc

Description

@jrincayc

Prerequisites

  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.

Feature Description

It would be useful if main.cpp explained the reason for stopping. Basically, the code right now will stop without explaining why the code has stopped if -v is not used as of 043fb27.

Motivation

It took me far too long to figure out why llama.cli kept ending because it just stops without explanation.

Possible Implementation

I propose changing some debug statements to info statements so this is clearer:

diff --git a/tools/main/main.cpp b/tools/main/main.cpp
index dc776f59..c40265e2 100644
--- a/tools/main/main.cpp
+++ b/tools/main/main.cpp
@@ -587,12 +587,12 @@ int main(int argc, char ** argv) {
 
                 if (n_past + (int) embd.size() >= n_ctx) {
                     if (!params.ctx_shift){
-                        LOG_DBG("\n\n%s: context full and context shift is disabled => stopping\n", __func__);
+                        LOG_INF("\n\n%s: context full and context shift is disabled => stopping\n", __func__);
                         break;
                     }
 
                     if (params.n_predict == -2) {
-                        LOG_DBG("\n\n%s: context full and n_predict == -%d => stopping\n", __func__, params.n_predict);
+                        LOG_INF("\n\n%s: context full and n_predict == -%d => stopping\n", __func__, params.n_predict);
                         break;
                     }
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions