Repository navigation
llama: fix early stop in params_fit if ctx is set - #18070
Conversation
|
Also I don't know if this is relevant, but I've had a bug with the autofit of "barely fitting", i.e. the model did fit upon loading, but would crash with "CUDA out of memory error" upon processing the first or second prompt. |
|
This seems to work for me when I specify the context manually: (would it be too much to ask to include single quotes around the arguments so one can just copy-paste them witohut any need to hunt and insert the quotes manually?) Without -c specified the detected suggested reduced context size still does not avoid the cpu hit seemingly: But it's a massive improvement none-the-less. Thank you. |
|
@pwilkin what could be happening is that the CUDA pool buffers are growing beyond the margin you're setting. |
|
@JohannesGaessler the thing is, I wasn't setting any buffers. I didn't realize the change was already merged, so I just ran the server without any extra params and I got this behavior. So just indicating that the default settings might be a bit too aggressive. |
|
I tried on a Devstral model and ugh, I don't think this output makes sense? if I try to use this command line, it's accepted, but the load fails: |
I also noticed the ability to meet a |
|
@verygreen please open a new issue if you find a new bug. That makes keeping track of them much easier from my end. |
be95a9c to
5362340
Compare
|
Dense models like desvstral suggested weird parameters is not a separate new issue, I don't get it without this PR (that was not yet merged) (without the PR I get same "this model fits, do nothing" messaging like in #18066) |
|
@verygreen your output contains these lines: What is happening here is that due to a bug there is a numerical underflow for the number of layers per GPU, which is why it's trying to assign over 4 billion layers to one of them. This is a bug separate to issues with context size. Please open an issue and post the console output you get, both with and without |
Should at least partially fix #18066 .
The early return on context reduction is done too often, in particular it should never be done if the user is explicitly setting a context size.
For a single GPU we can always safely return if we can fit the model via context reduction. However, for multiple GPUs however this is unsafe so we should always go on to fit.