Skip to content

Commit

Permalink
chatllm: fix model loading progress showing "Reload" sometimes (#2337)
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
  • Loading branch information
cebtenzzre committed May 15, 2024
1 parent 9f9d8e6 commit 7f1c3d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gpt4all-chat/chatllm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ bool ChatLLM::loadModel(const ModelInfo &modelInfo)
}

m_llModelInfo.model->setProgressCallback([this](float progress) -> bool {
progress = std::max(progress, std::numeric_limits<float>::min()); // keep progress above zero
emit modelLoadingPercentageChanged(progress);
return m_shouldBeLoaded;
});
Expand Down

0 comments on commit 7f1c3d4

Please sign in to comment.