Skip to content

[Bug] Very slow - after today's unsloth studio update - while Loading cached model into memory #6619

Closed

Description

@ShenLishuang

unsloth runs well for weeks on Ubuntu 24.04 LTS
Today web front prompted update to 6.9.
updated wtih cURL
It took much longer to complete.

Then after restarting unsloth studio, the web front shows version "dev"
It hangs when loading even the 0.6B small LLM model.
The web message:
"unsloth Starting model… Loading cached model into memory"

But the backend status is good with status_code 200 :

{"timestamp": "2026-06-23T18:23:10.557155Z", "level": "info", "event": "request_completed", "method": "GET", "path": "/api/export/status", "status_code": 200, "process_time_ms": 1.03}
{"timestamp": "2026-06-23T18:24:10.569321Z", "level": "info", "event": "request_completed", "method": "GET", "path": "/api/export/status", "status_code": 200, "process_time_ms": 1.01}

Activity

  1. oobabooga commented on Jun 23, 2026

    @oobabooga
    Member

    When you load the 0.6B model and leave it completely untouched, does it ever finish? And if you then unload it and load it a second time, is that second load fast or still slow?

    Also, can you paste the output of this:

    ls -t ~/.unsloth/studio/logs/llama-server/llama-*.log | head -1 | xargs grep -iE "offload|cuda|rocm|metal|gpu|device|error"
    
  2. self-assigned this
    on Jun 23, 2026
  3. ShenLishuang commented on Jun 23, 2026

    @ShenLishuang
    Author

    Hi:
    It worked, only after run from the web-front after seeing the message below:

    "New llama.cpp update
    b9739 → b9767-mix-1f1aaa4
    210 MB download · No restart needed after update"

    Nothing below could help before the above llama.cpp update.

    When you load the 0.6B model and leave it completely untouched, does it ever finish? And if you then unload it and load it a second time, is that second load fast or still slow?

    Also, can you paste the output of this:

    ls -t ~/.unsloth/studio/logs/llama-server/llama-*.log | head -1 | xargs grep -iE "offload|cuda|rocm|metal|gpu|device|error"
    

    It never completed the model loading.
    Restarted the unsloth studio, it did not help.
    Re-run the installation, still unable to load a 0.6B model.

    The log:
    ls -t ~/.unsloth/studio/logs/llama-server/llama-*.log | head -1 | xargs grep -iE "offload|cuda|rocm|metal|gpu|device|error"
    0.00.061.367 I device_info:
    0.00.170.126 I - CUDA0 : NVIDIA GeForce RTX 5090 Laptop GPU (23984 MiB, 23302 MiB free)
    0.00.178.445 I system_info: n_threads = 4 (n_threads_batch = 4) / 24 | CUDA : ARCHS = 860,890,900,1000,1200 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | BLACKWELL_NATIVE_FP4 = 1 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX_VNNI = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 |
    0.01.112.058 I common_init_result: fitting params to device memory ...
    0.03.276.644 I common_speculative_impl_draft_mtp: - gpu_layers=-1, cache_k=f16, cache_v=f16, ctx_tgt=yes, ctx_dft=yes, devices=[default]

  4. ShenLishuang commented on Jun 23, 2026

    @ShenLishuang
    Author

    Now, version info is updated, no longer "dev" seen before the llama.cpp update:

    web -> About
    Docs, release notes, feedback, and build info.
    Unsloth
    Unsloth Version
    v0.1.471-beta
    Package Version
    2026.6.9
    llama.cpp Version
    b9767-mix-1f1aaa4

  5. oobabooga commented on Jun 23, 2026

    @oobabooga
    Member

    I'm glad updating the bundled llama.cpp (b9739 → b9767-mix) fixed it, so it was an issue with that llama.cpp version after all. Just to confirm, the 0.6B model now loads successfully and stays loaded?

  6. ShenLishuang commented on Jun 23, 2026

    @ShenLishuang
    Author

    Now with the llama.cpp update, it can load any model already on my drive. Thank you very much.

    Unsloth team have done an excellent job getting local LLM run faster and allows larger context size.

    For example, my mobile RTX5090 GPU with 24G VRAM can run this Qwen3.6-35B-A3B-Opus-Reasoning-i1-GGUF-Q4_K_M,
    Context Length 109312 , kvcache f16, speed 120-150 tokens/second

    /home/my/.unsloth/llama.cpp/llama-server -m /home/my/.unsloth/studio/cache/ollama_links/f68f35195f31/b49d4f7c78/hf.co-mradermacher-Qwen3.6-35B-A3B-Opus-Reasoning-i1-GGUF-Q4_K_M-unknown.gguf --port 47493 -c 109312 --parallel 1 --flash-attn on --no-context-shift -ngl -1 --metrics --jinja --spec-default --chat-template-kwargs {"enable_thinking": false, "preserve_thinking": false}

    I get 30 ~35 tokens/second with unsloth-Qwen3.6-27B-MTP.

  7. ShenLishuang commented on Jun 23, 2026

    @ShenLishuang
    Author

    By the way, recent updates of unsloth studio can squeeze a larger context setting automatically. But it seems that, some times it splits job out to CPU/ RAM, which leaves the GPU utility rate < 20%, and the speed is greatly reduced.
    The settings should allow strictly fitting within VRAM for speed consideration.

  8. oobabooga commented on Jun 23, 2026

    @oobabooga
    Member

    Great, thanks for confirming, and for the detailed reports. Closing this since the b9739 prebuilt was the problem and the b9767-mix update fixed it.

    The VRAM spill is a separate thing. Studio already tries to fit the auto context within VRAM, so this looks like the estimate overshooting on some models (the MTP model is a likely culprit) and llama.cpp then offloading to CPU. Could you create a new issue for it so it gets properly tracked? If you can include:

    • The model,
    • The auto-selected context length,
    • The offloaded N/M layers to GPU line from a slow run,

    (or any additional details) we can dig into it.

  9. ShenLishuang commented on Jun 23, 2026

    @ShenLishuang
    Author

    When I experience it again, I will copy the model info and log, then open a new issue report. I frequently switch between models and variants, not sure about the exact model variant name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions