-
Notifications
You must be signed in to change notification settings - Fork 297
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
[BUG]: DefragThreshold default is not matching llama.cpp and probably not intended #716
Comments
Good catch! Would you be itnerested in putting together a PR to fix this? The easiest fix would be to just add a default value of I think a better fix would be to change |
@AsakusaRinne Is this up for grabs? |
Unless @dlyz is already working on it, I think it's open to whoever moves first :) |
Yeah, sorry, couldn't find time for it yet, maybe closer to the end of the week. @Neilblaze if you can do it earlier, you should definitely take it. If we go with nullable |
Cool I'll try my best to raise a PR asap, but meanwhile, I'm waiting for this confirmation ↓
Once @martindevans confirms, I can make the updates. Thanks! |
Making seed nullable for the default is a good idea. Go for it @Neilblaze :) |
Description
DefragThreshold
is 0 by default in LLamaSharp with the intent that it will disable defragmentation on the threshold excess.LLamaSharp/LLama/Abstractions/IContextParams.cs
Line 112 in 6bf010d
LLamaSharp/LLama/Common/ModelParams.cs
Line 103 in 6bf010d
But actually it should be negative to disable this mechanics (-1). 0 means "do defrag when the smallest fragmentation discovered".
This may negatively (maybe sometimes positively) impact performance in some advanced cases, for example with batching.
See llama.cpp default https://github.com/ggerganov/llama.cpp/blob/3ab8b3a92ede46df88bc5a2dfca3777de4a2b2b6/llama.cpp#L11630
Reproduction Steps
-
Environment & Configuration
-
Known Workarounds
No response
The text was updated successfully, but these errors were encountered: