Repository navigation
Description
Bug Description
When using Unsloth Studio with GGUF models, changing the context length and clicking Apply triggers a model reload. After waiting for some time, the reload fails with a “No config file found” error.
However, if I manually select/load the model again afterward, the last context length I selected is actually applied correctly.
So the setting appears to be saved, but the automatic reload path after changing context length fails incorrectly.
This is a small but confusing workflow bug. It does not completely block usage, because I can manually reload the model afterward and get the desired context length, but the error message makes it look like the model path/config is broken when it is not.
Error / Log Output
After changing context length and clicking Apply, Unsloth Studio shows:
Switching models. Reloading with updated chat template. Loading cached model into memory.
Failed to load model: This model is not supported yet. Try a different model. (Original error: Unsloth: No config file found - are you sure the `model_name` is correct? If you're using a model on your local device, confirm if the folder location exists. If you're using a HuggingFace online model, check if it exists.)
Environment
OS:
Lubuntu 24.04
Kernel:
6.17.0-22-generic
GPU:
NVIDIA RTX 5090 Laptop GPU
NVIDIA Driver:
595.58.03
CUDA:
CUDA Toolkit / CUDA Version: 13.1
Unsloth Studio environment:
Python: /home/theswalk/.unsloth/studio/unsloth_studio/bin/python
transformers: 4.57.6
torch: 2.10.0+cu130
unsloth: 2026.4.8
accelerate: 1.13.0
safetensors: 0.7.0
Model Type
This happens while working with GGUF models.
GGUF models otherwise load and run correctly on the same system. The issue appears only when changing the context length and using the automatic Apply / reload flow.
Steps to Reproduce
- Open Unsloth Studio.
- Load a local GGUF model.
- Confirm that the model loads and works normally.
- Change the context length setting.
- Click
Apply. - Wait while Studio attempts to reload the model.
- After some time, the reload fails with:
No config file found - are you sure the `model_name` is correct? - Manually select/load the same model again.
- The model loads successfully.
- The context length selected earlier is now applied correctly.
Expected Behavior
When changing context length and clicking Apply, Unsloth Studio should reload the same model cleanly with the updated context length.
Expected flow:
Change context length
Click Apply
Studio reloads the same model
Model loads successfully
New context length is active
No missing config error should appear if the model path is valid and the model can be loaded manually.
Actual Behavior
Unsloth Studio attempts to reload the model but fails with:
No config file found - are you sure the `model_name` is correct?
The confusing part is that the model itself is not actually missing or invalid.
After manually selecting/loading the same model again, it works, and the context length I selected before is applied.
Why This Seems Like a Bug
The error message suggests the local model folder or config is missing:
No config file found
But that does not match the actual situation because:
- The same GGUF model loads successfully before changing context length.
- The same GGUF model loads successfully again after the failed automatic reload.
- The selected context length is preserved and applied after manual reload.
- GGUF models may not have the same config file structure as safetensors/Hugging Face models, so the reload path may be using the wrong loader or wrong model reference during the automatic apply/reload step.
This suggests that the context-length Apply flow may be losing the correct local GGUF model path, using the wrong model identifier, or incorrectly switching to a Hugging Face / config-based loading path during reload.
Impact
This is not a complete blocker, but it is confusing and interrupts the workflow.
The workaround is:
1. Change context length.
2. Click Apply.
3. Wait for the reload to fail.
4. Manually select/load the same model again.
5. The selected context length is then active.
This works, but it should not be necessary.
Requested Fix
Please check the model reload logic after changing context length in Unsloth Studio, especially for local GGUF models.
Possible areas to inspect:
- Whether the automatic reload path preserves the correct local GGUF model path.
- Whether the reload path accidentally treats the GGUF model as a Hugging Face safetensors model.
- Whether the cached model reference loses the original file path.
- Whether the context-length apply flow updates settings but then calls the wrong loader.
- Whether the error message should be different for GGUF models.
Ideally, changing context length and clicking Apply should reload the same GGUF model directly without requiring the user to manually reselect the model.
Workaround
Manually reload the model after the failed automatic reload.
The selected context length is preserved, so after manually loading the same model again, the desired context length is applied.
Thank you.
Activity
[-][Bug] Changing context length and clicking Apply reloads with a missing config error, but the selected context length is applied after manually reloading the model[Bug] Please fill in your issue title here.[/-][+][Bug] Changing context length and clicking Apply reloads with a missing config error, but the selected context length is applied after manually reloading the model[/+]BlackBox-Labs commentedon May 8, 2026
Confirmed and fixed in PR #5332.
Root cause: The already-loaded check at
routes/inference.py:465only handles GGUF models with agguf_variant(HF repos). Local GGUF files loaded by file path have no variant, so the check was skipped, and the reload fell through to the HuggingFace/transformers path — which fails because GGUF files don't have aconfig.json.Fix: Added a local GGUF already-loaded handler that detects when a llama-server process is already running for the same model path. It kills the existing process before the GGUF reload path runs, ensuring the correct backend is used with the new settings.
Tested on local GGUF (Qwen3.6). Settings change → Apply → model reloads cleanly. No error.
Imagineer99 commentedon May 8, 2026
unsloth: 2026.4.8seems to be an outdated version, unable to repro in2026.5.2, please update and confirm if its still occurring.Imagineer99 commentedon May 8, 2026
which model are you testing with? just for further checks, ty.
BlackBox-Labs commentedon May 8, 2026
Confirmed — we are on
2026.4.8. Testing with Qwen3.6-35B-A3B-UD-Q6_K.gguf loaded as a local GGUF file path (not HF repo). Will update to2026.5.2and retest.BlackBox-Labs commentedon May 8, 2026
Updated to 2026.5.2 and confirmed the bug still occurs with local GGUF files loaded by file path (not HF repo). The already-loaded check at line ~465 only handles GGUF models with a
gguf_variant(HF repos). Local GGUF files have no variant, so they fall through to theelseblock at line ~515, and if the orchestrator'sactive_model_namematches, it returnsalready_loadedwithout ever reaching the GGUF reload path.The workaround is closing Unsloth Studio, restarting, and re-selecting the model. The automatic Apply reload does not work for local GGUFs even in 2026.5.2.
Our PR #5332 has the proposed fix if you'd like to review. Happy to adjust based on team feedback.
Imagineer99 commentedon May 8, 2026
hm @BlackBox-Labs, how exactly are you loading the model, can you guide me through your steps?
rolandtannous commentedon May 14, 2026
@BlackBox-Labs @okaybeydanol
installing from main repo, cannot reproduce your problem. here's a video demo. can you please share which model you have used?
change_context_length_test.mp4
okaybeydanol commentedon May 16, 2026
closes #5427