-
Notifications
You must be signed in to change notification settings - Fork 49
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
What does save/load do? #13
Comments
Good point! At the moment in The point of the Currently saving seems to work, it does make a binary file to disk, but loading seems buggy. I don't really understand what's wrong there at the moment... I'll bump the binary Release to Maybe I should have put the progress into a different branch to avoid confusions... Anyway, use |
Thanks for that response, the Is Another thing that would be useful for |
Got save/load working! I think.
Yeah, should be useful. You'll still have to load the 1+Gb. I'm not sure if there is a way to optimize that.
Yep. For now the program only makes a |
Thanks again for your fast work!
Even if it can't be optimized, surely it is more efficient than reloading the model from startup.
For now the workaround is to move the save file elsewhere after saving and move it back before loading. I'll leave this issue open until naming saves or specifying paths is implemented unless you want to create a new issue specifically for that to keep track of it there. |
Added save naming in
I also kinda wanted to keep all the saves in one folder so its easy to just find and delete them all. Especially when one happens to make a typo in the save names.
Yeah this was tedious. Renaming was a good suggestion!
This is good. Let me know if it works or not. :) I just pushed the update as soon as it seemed to work. |
That is good but there should really be a CLI parameter
Unfortunately it seems to be bugged. Saving seems to work fine but loading seems to have something odd about it.
Then kill it and start it again loading the model and querying it with:
But if I copy the
I have tested it multiple times and it seems to just not have any memory when loading using the named save. This would be easier to debug if we could produce deterministic results (#14). |
Another thing to note is that Line 189 in 7df9232
Line 208 in 7df9232
Therefore calling
Is this the desired behavior? |
It turns out calling Is it possible to combine the loaded state with the internal memory so we don't have increased memory requirements after loading? It's not a big deal either way - I was cutting it real close with the RAM as is. |
Lots of good comments! Thank you! :)
I just have to make sure that it does not cause any security issues first. There needs to be some checks that you can't accidentally overwrite any important binaries...
It was until you pointed it out :) Fixed now so that --state is the default if no NAME is used.
I hope this works now with the name changes and --temp.
Memory speed is really the bottleneck with these models. When it goes to swap, it becomes atrociously slow. On mac (and I assume on linux too) you could perhaps use |
This is a really tough question. I honestly don't know! I only have some thoughts but raw memory management is something I don't know much about.
But I get what you're saying. Ideally you'd want Now, someone smarter than me can say "oh its easy, you just do this (solution)". So if someone figures it out, I'm super happy to add that feature. :) I mean its probably likely that I could just be doing something very inefficient here. |
with v0.2.7: ./chat -m ggml-gpt4all-j-v1.3-groovy.bin --temp 0.001
Now, with loading:
But if you say this instead:
With low temperature you should hopefully get the same results. |
Yes, and no, even using that temperature I am getting slightly different results, for example my first query:
Perhaps Then after saving and loading running your query
Now if I give it the prompt |
Very interesting! I didn't even realize about And yet I still got:
even with I get the same result with all three cases but it does indeed differ from yours. Maybe there's some machine specific things going on as well. (How floating points are calculated on the processor etc.) I'm running this on a mac with AVX1 only. Also got with
vs:
Well... I guess there could be a bug in loading, in the backend, or the models just are inherently little bit unpredictable. But the fact that "Tell me more." is so different from "tell me more" is kinda unsettling.
You're right. Something is off... |
Yeah, it must be slight calculation difference. For reference I have tested on:
And get the |
Great that you tested on multiple computers! Its good that you found this bug! :) I'll look into this more at some point. But at the moment I don't have any ideas on how to make loading more accurate. Meanwhile Added There's now a sanity check that So you can overwrite a previous save or an empty file, but not an existing binary of different size. That should be enough to prevent accidents. |
After I run save and load it back into a new session it seems to have forgotten my previous prompts, what exactly do these commands do and what are they used for?
The text was updated successfully, but these errors were encountered: