mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-30 01:08:47 +00:00
Add thread count setting
This commit is contained in:
8
gptj.cpp
8
gptj.cpp
@@ -659,6 +659,14 @@ bool GPTJ::loadModel(const std::string &modelPath, std::istream &fin) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void GPTJ::setThreadCount(int32_t n_threads) {
|
||||
d_ptr->n_threads = n_threads;
|
||||
}
|
||||
|
||||
int32_t GPTJ::threadCount() {
|
||||
return d_ptr->n_threads;
|
||||
}
|
||||
|
||||
GPTJ::~GPTJ()
|
||||
{
|
||||
ggml_free(d_ptr->model.ctx);
|
||||
|
Reference in New Issue
Block a user