go-skynet / go-llama.cpp

LLama.cpp golang bindings
MIT License
668 stars 80 forks source link

Stop llama.cpp spamming stderr #236

Open andreib1 opened 1 year ago

andreib1 commented 1 year ago

Is there any way to mute all of the chatter coming from llama.cpp?

amorroxic commented 1 year ago

I do this if that helps, not sure this is the right way. In binding.cpp:

#include "log.h"

and then in void* load_model function adding this (before return load_binding_model):

log_disable();

or from what I read in llama.cpp/common/log.h another avenue would be defining some flags like so (this would prevent creation of .log files for instance, not tested):

#define LOG_TARGET stderr
#include "log.h"