You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have a suggestion regarding the time limits for prompt processing and model response generation – is it possible to make them configurable?
On my configuration with the LLM models I need, there's partial loading between the GPU and CPU, resulting in significantly lower performance (up to 20 tokens per generation). With large prompts, the model disconnects (after a few minutes with a timeout error), even though the models definitely work in other programs.
The same applies to large contexts – generation simply stops after 10 minutes and that's it (as in the screenshot).
I'm very happy with Unsloth Studio's generation time and memory usage. But because of these limitations, I have to use other programs.
hey, i have a similar type of issue where a large model takes significant amount of time (5 or 10 mins) before outputting its first token so the studio directly outputs what is shown in image, but i can definitely see my gpu and cpu peaking out there and i can confirm it is still processing, can you add a timeout configuration for model responses in settings
I faced with same issue and here is a workaround/hack that helped me.
Go to the Unsloth Studio installed directory (in my Windows it is C:\Users<username>.unsloth)
Find the next python file .unsloth\studio\unsloth_studio\Lib\site-packages\studio\backend\routes\inference.py
in that file replace all timeout = 600 with longer timeout.
restart the Unsloth Studio.
If want, to ensure the new code in script is actually work, you can add some log: after logger = get_logger(__name__) line add something like logger.error('hacked version used'). You will see that message on studio startup.
I faced with same issue and here is a workaround/hack that helped me.
Go to the Unsloth Studio installed directory (in my Windows it is C:\Users.unsloth)
Find the next python file .unsloth\studio\unsloth_studio\Lib\site-packages\studio\backend\routes\inference.py
in that file replace all timeout = 600 with longer timeout.
restart the Unsloth Studio.
If want, to ensure the new code in script is actually work, you can add some log: after logger = get_logger(__name__) line add something like logger.error('hacked version used'). You will see that message on studio startup.
thanks for it, i tried, i see the hacked string on unsloth start, but still stops after 600s... dont you change same values somewhere in llama.cpp config too?
thanks for it, i tried, i see the hacked string on unsloth start, but still stops after 600s... dont you change same values somewhere in llama.cpp config too?
I've just found in the studio/backend/core/inference/llama+cpp.py there is also _DEFAULT_T_MAX_PREDICT_MS constant that is 600_000 ms. Try to up that too.
I faced with same issue and here is a workaround/hack that helped me.
Go to the Unsloth Studio installed directory (in my Windows it is C:\Users.unsloth)
Find the next python file .unsloth\studio\unsloth_studio\Lib\site-packages\studio\backend\routes\inference.py
in that file replace all timeout = 600 with longer timeout.
restart the Unsloth Studio.
If want, to ensure the new code in script is actually work, you can add some log: after logger = get_logger(__name__) line add something like logger.error('hacked version used'). You will see that message on studio startup.
This method helped me. How can I increase the prompt time from 120 seconds?
thanks for it, i tried, i see the hacked string on unsloth start, but still stops after 600s... dont you change same values somewhere in llama.cpp config too?
I've just found in the studio/backend/core/inference/llama+cpp.py there is also _DEFAULT_T_MAX_PREDICT_MS constant that is 600_000 ms. Try to up that too.
If possible can you test #5841 and verify it fixes for you?
Well, I inserted/replaced the specified files from the PR and now any request immediately stops in 2 seconds without a single error.
Thanks for testing. Since #5841 currently has conflicts with main, manually replacing individual files can create a mixed Studio install where the changed files no longer match the surrounding code.
I've done all this. The models are behaving strangely. They might answer any question on the first try, or they might answer on the second or even third try. That is, the connection is being dropped without errors.
If I make a huge request for tens of thousands of tokens, the prompt is always dropped. The maximum interruption time fluctuates between 0 and 12 seconds.
It's also noticeable that the MoE models aren't fully loaded into memory. They might then load again the next time I try to send a question to the model.
I've done all this. The models are behaving strangely. They might answer any question on the first try, or they might answer on the second or even third try. That is, the connection is being dropped without errors. If I make a huge request for tens of thousands of tokens, the prompt is always dropped. The maximum interruption time fluctuates between 0 and 12 seconds. It's also noticeable that the MoE models aren't fully loaded into memory. They might then load again the next time I try to send a question to the model.
Thanks for testing. Sounds like it may be a separate issue rather than the timeout logic in #5841.
Please share the terminal output around the failed request, plus the exact model/GGUF, context length set in run settings, and git rev-parse --short HEAD from the PR branch you tested.
Thanks for testing. Sounds like it may be a separate issue rather than the timeout logic in #5841.
Please share the terminal output around the failed request, plus the exact model/GGUF, context length set in run settings, and git rev-parse --short HEAD from the PR branch you tested.
I pulled down the latest repository again and applied the changes from PR 5841 to the pr-5841-timeouts branch.
I believe the generation interruption has already been fixed. All models work.
When testing with 100,000 input tokens, the prompt is processed without limitation, but generation still stops at 600 seconds.
These results are consistent across all models.
The git rev-parse --short HEAD command returned the string a131802
Thanks for testing. Sounds like it may be a separate issue rather than the timeout logic in #5841.
Please share the terminal output around the failed request, plus the exact model/GGUF, context length set in run settings, and git rev-parse --short HEAD from the PR branch you tested.
I pulled down the latest repository again and applied the changes from PR 5841 to the pr-5841-timeouts branch. I believe the generation interruption has already been fixed. All models work. When testing with 100,000 input tokens, the prompt is processed without limitation, but generation still stops at 600 seconds. These results are consistent across all models. The git rev-parse --short HEAD command returned the string a131802
Hey thanks again for testing, the PR branch extends the timeout from 120s to 600s so this is expected, I will update the PR to extend it further.
Still hardcoded in current Studio builds. Measured 2026-10-09 on v0.1.905-beta (package 2026.10.3): a llama.cpp-served GGUF behind Studio :8888 gets a single generation cut off at exactly 300s, and Studio returns HTTP 200 with a ~150-byte error body instead of a timeout status.
Strict JSON clients (OpenAI SDK) fail to parse that body and crash with a parse error, not a timeout — so callers can't distinguish "server timed out" from "server returned garbage", and client-side timeouts (we use 600s) never apply.
#5841 (merged 2026-06-12) changed the constants; it did not make them configurable. The wall is still there in 10/2026 builds, just at a different number. The community workaround remains editing site-packages (studio/backend/routes/inference.py, core/inference/llama_cpp.py), which is wiped by every Studio update.
Please add a setting — UI toggle and/or env var — to configure or disable the upstream request timeout. Until then, every downstream client has to engineer each call to finish under an undocumented wall.
Activity
Imagineer99 commentedon May 25, 2026
seems valid, we should likely extend timeout on long generations, will investigate
Mr-Havoc999 commentedon May 28, 2026
hey, i have a similar type of issue where a large model takes significant amount of time (5 or 10 mins) before outputting its first token so the studio directly outputs what is shown in image, but i can definitely see my gpu and cpu peaking out there and i can confirm it is still processing, can you add a timeout configuration for model responses in settings
ughoo commentedon Jun 6, 2026
I have this issue with multiple windows pc's running Unsloth Studio. All request that is longer than 600s, 99% stops in the middle of the response.
Is there any option, to let it work for longer time?
I already tried LLAMA_ARG_TIMEOUT with powershell enviroment setup, and custom batch file too. IT's crucial for me.
anthrwpos1 commentedon Jun 9, 2026
I faced with same issue and here is a workaround/hack that helped me.
logger = get_logger(__name__)line add something likelogger.error('hacked version used'). You will see that message on studio startup.ughoo commentedon Jun 9, 2026
thanks for it, i tried, i see the hacked string on unsloth start, but still stops after 600s... dont you change same values somewhere in llama.cpp config too?
anthrwpos1 commentedon Jun 10, 2026
I've just found in the studio/backend/core/inference/llama+cpp.py there is also
_DEFAULT_T_MAX_PREDICT_MSconstant that is 600_000 ms. Try to up that too.tehtelev commentedon Jun 10, 2026
This method helped me. How can I increase the prompt time from 120 seconds?
ughoo commentedon Jun 10, 2026
that worked! Thank you!!!!
anthrwpos1 commentedon Jun 10, 2026
There is a suspecious 120s timeout here:
Imagineer99 commentedon Jun 10, 2026
If possible can you test #5841 and verify it fixes for you?
tehtelev commentedon Jun 10, 2026
Well, I inserted/replaced the specified files from the PR and now any request immediately stops in 2 seconds without a single error.

Imagineer99 commentedon Jun 10, 2026
Thanks for testing. Since #5841 currently has conflicts with main, manually replacing individual files can create a mixed Studio install where the changed files no longer match the surrounding code.
Could you test the PR branch instead?
tehtelev commentedon Jun 10, 2026
I've done all this. The models are behaving strangely. They might answer any question on the first try, or they might answer on the second or even third try. That is, the connection is being dropped without errors.
If I make a huge request for tens of thousands of tokens, the prompt is always dropped. The maximum interruption time fluctuates between 0 and 12 seconds.
It's also noticeable that the MoE models aren't fully loaded into memory. They might then load again the next time I try to send a question to the model.
Imagineer99 commentedon Jun 10, 2026
Thanks for testing. Sounds like it may be a separate issue rather than the timeout logic in #5841.
Please share the terminal output around the failed request, plus the exact model/GGUF, context length set in run settings, and
git rev-parse --short HEADfrom the PR branch you tested.tehtelev commentedon Jun 11, 2026
I pulled down the latest repository again and applied the changes from PR 5841 to the pr-5841-timeouts branch.
I believe the generation interruption has already been fixed. All models work.
When testing with 100,000 input tokens, the prompt is processed without limitation, but generation still stops at 600 seconds.
These results are consistent across all models.
The
git rev-parse --short HEADcommand returned the string a131802Imagineer99 commentedon Jun 12, 2026
Hey thanks again for testing, the PR branch extends the timeout from 120s to 600s so this is expected, I will update the PR to extend it further.
TomerGamerTV commentedon Aug 28, 2026
Was this implemented? I would be nice to have a setting to configure or disable the timeout
Mr-Havoc999 commentedon Aug 30, 2026
Can you please see if that can be added to be configurable manually in settings rather than letting it be hardcoded in settings..?
T-Poko commentedon Oct 9, 2026
Still hardcoded in current Studio builds. Measured 2026-10-09 on v0.1.905-beta (package 2026.10.3): a llama.cpp-served GGUF behind Studio
:8888gets a single generation cut off at exactly 300s, and Studio returns HTTP 200 with a ~150-byte error body instead of a timeout status.Strict JSON clients (OpenAI SDK) fail to parse that body and crash with a parse error, not a timeout — so callers can't distinguish "server timed out" from "server returned garbage", and client-side timeouts (we use 600s) never apply.
#5841 (merged 2026-06-12) changed the constants; it did not make them configurable. The wall is still there in 10/2026 builds, just at a different number. The community workaround remains editing site-packages (
studio/backend/routes/inference.py,core/inference/llama_cpp.py), which is wiped by every Studio update.Please add a setting — UI toggle and/or env var — to configure or disable the upstream request timeout. Until then, every downstream client has to engineer each call to finish under an undocumented wall.