mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-11-07 08:34:37 +01:00
examples : fix n_gpu_layers usage in talk-llama (#1441)
This commit is contained in:
parent
0463028bc2
commit
3989b29a9b
@ -266,6 +266,9 @@ int main(int argc, char ** argv) {
|
||||
llama_backend_init(true);
|
||||
|
||||
auto lmparams = llama_model_default_params();
|
||||
if (!params.use_gpu) {
|
||||
lcparams.lmparams = 0;
|
||||
}
|
||||
|
||||
struct llama_model * model_llama = llama_load_model_from_file(params.model_llama.c_str(), lmparams);
|
||||
|
||||
@ -276,9 +279,6 @@ int main(int argc, char ** argv) {
|
||||
lcparams.seed = 1;
|
||||
lcparams.f16_kv = true;
|
||||
lcparams.n_threads = params.n_threads;
|
||||
if (!params.use_gpu) {
|
||||
lcparams.n_gpu_layers = 0;
|
||||
}
|
||||
|
||||
struct llama_context * ctx_llama = llama_new_context_with_model(model_llama, lcparams);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user