From 44dc1ade62c4d4c287906739107cb5826c3889dd Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 5 Jun 2023 21:35:40 +0200 Subject: [PATCH] Set thread counts after loading model (#836) --- gpt4all-bindings/golang/binding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-bindings/golang/binding.cpp b/gpt4all-bindings/golang/binding.cpp index 84084f11..a0bc4feb 100644 --- a/gpt4all-bindings/golang/binding.cpp +++ b/gpt4all-bindings/golang/binding.cpp @@ -24,11 +24,11 @@ void* load_model(const char *fname, int n_threads) { __func__, new_error.message); return nullptr; } - llmodel_setThreadCount(model, n_threads); if (!llmodel_loadModel(model, fname)) { return nullptr; } + llmodel_setThreadCount(model, n_threads); return model; }