diff --git a/gpt4all-backend/gptj.cpp b/gpt4all-backend/gptj.cpp index 6cb81161..0aacd854 100644 --- a/gpt4all-backend/gptj.cpp +++ b/gpt4all-backend/gptj.cpp @@ -833,6 +833,7 @@ struct GPTJPrivate { GPTJ::GPTJ() : d_ptr(new GPTJPrivate) { d_ptr->model = new gptj_model; + d_ptr->model->ctx = nullptr; d_ptr->modelLoaded = false; } diff --git a/gpt4all-backend/mpt.cpp b/gpt4all-backend/mpt.cpp index dea12965..8c3cebf1 100644 --- a/gpt4all-backend/mpt.cpp +++ b/gpt4all-backend/mpt.cpp @@ -757,6 +757,7 @@ struct MPTPrivate { MPT::MPT() : d_ptr(new MPTPrivate) { d_ptr->model = new mpt_model; + d_ptr->model->ctx = nullptr; d_ptr->modelLoaded = false; } diff --git a/gpt4all-backend/replit.cpp b/gpt4all-backend/replit.cpp index 568b6441..d4425ff0 100644 --- a/gpt4all-backend/replit.cpp +++ b/gpt4all-backend/replit.cpp @@ -884,6 +884,7 @@ Replit::Replit() : d_ptr(new ReplitPrivate) { d_ptr->model = new replit_model; + d_ptr->model->ctx = nullptr; d_ptr->modelLoaded = false; }