-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete revamp of model loading to allow for more discrete control #1969
Conversation
the user of the models loading behavior. Signed-off-by: Adam Treat <treat.adam@gmail.com>
gpt4all-chat/chatllm.cpp
Outdated
@@ -170,7 +222,7 @@ bool ChatLLM::loadModel(const ModelInfo &modelInfo) | |||
#endif | |||
delete m_llModelInfo.model; | |||
m_llModelInfo.model = nullptr; | |||
emit isModelLoadedChanged(false); | |||
emit modelLoadingPercentageChanged(std::numeric_limits<float>::min()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a comment explaining the significance of negative infinity here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not negative infinite. It is the smallest possible positive floating point value closest to zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sometimes I forget that FLT_MIN has nothing to do with INT_MIN. I'm thinking there should be a brief comment like // small nonzero value
to make it clear that it is arbitrary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Also, attempting to switch models while a model is loading is allowed - it changes the model name but not the progress value, and it ends up queueing a series of model loads. We should either abort the model load via the progress callback, or prevent the user from doing this. |
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
All of the above should be fixed with this newest version. Thanks for the quality review. |
Fixed. |
This has to do with the save/restore of context that can be slow under vulkan. We're looking at ways to speed it up. |
Signed-off-by: Adam Treat <treat.adam@gmail.com>
Thank you. Can confirm it is much better now. To be honest though, adding slightly to the width wouldn't hurt, because most models on huggingface do have long model names, especially the mergers. Also, if users have multiple model cards for them (e.g. various system prompts in different languages) then those model names might become even longer to avoid confusion. |
Signed-off-by: Adam Treat <treat.adam@gmail.com>
I don't know what you mean by "This is still the case, the combo box goes off the edge of the dialog." as I don't see that. The sizing issues with min width and so on are not germane to this PR. I'd like to address them in another PR. Moreover, they are going to go away when the new UI revamp comes so I don't want to spend much time on them. |
I've fixed D. I'm not sure about E and what we want to do. It should probably be addressed in a new PR. |
Ok. But the clear chat button didn't overlap before because the model selection box was smaller, so this is a regression, even if you think it's not important.
Notice how:
|
Got it, thanks.
Yeah, I don't see anything like this. I'll check on my mac. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I cannot reproduce what you see on the mac with the model settings. Further, this change does not seem to have any impact on the model settings or that combo box. I'm not sure why you see what you see @cebtenzzre |
Signed-off-by: Adam Treat <treat.adam@gmail.com>
Signed-off-by: Adam Treat <treat.adam@gmail.com>
Signed-off-by: Adam Treat <treat.adam@gmail.com>
The model loading error you get when app crashes and we display on reload is now gone. |
fixed #1660 |
Large revamp of model loading.