Skip to content

Add verbose flag for model loading #2008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

grahameth
Copy link
Contributor

Right now, the console is spammed with a lot of information about the model when llama_load_model_from_file is called. This PR adds a verbose flag so that you can optionally disable this.

@ggerganov
Copy link
Member

Isn't redirecting stderr to /dev/null good enough?

@grahameth
Copy link
Contributor Author

Well, if you just use the provided examples, sure. But in my usecase, I use llama.cpp in a bigger application, and I don't want to disable the whole error stream just for this function call.
But I understand if you don't want this added complexity if you have no use for it, then I'll just change it in my fork.

@bullno1
Copy link
Contributor

bullno1 commented Jun 28, 2023

I think a better solution would be to be able to specify a log handler with a similar signature: (void* ctx, const char* fmt, ...)

@grahameth
Copy link
Contributor Author

I can implement it in such a way. Should I do it? I don't wanna do it though if it won't get merged anyway

@ggerganov
Copy link
Member

@grahameth I can't promise you that it will be merged, but it is more likely to get merged than the verbose flag

@grahameth
Copy link
Contributor Author

Alright, I made a new PR for it: #2234

@grahameth grahameth closed this Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants