From: Georgi Gerganov Date: Fri, 17 Mar 2023 19:46:46 +0000 (+0200) Subject: Default to 4 threads (#243) X-Git-Tag: gguf-v0.4.0~1225 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4f546091102a418ffdc6230f872ac56e5cedb835;p=pkg%2Fggml%2Fsources%2Fllama.cpp Default to 4 threads (#243) --- diff --git a/utils.h b/utils.h index 5e5b40ff..c1a8498a 100644 --- a/utils.h +++ b/utils.h @@ -14,11 +14,11 @@ struct gpt_params { int32_t seed = -1; // RNG seed - int32_t n_threads; + int32_t n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency()); int32_t n_predict = 128; // new tokens to predict int32_t repeat_last_n = 64; // last n tokens to penalize int32_t n_ctx = 512; //context size - + // sampling parameters int32_t top_k = 40; float top_p = 0.95f;