Skip to content

[Bug] Model reload with 'unsloth run' doesn't unload current model causing memory spike and crash. #5401

Closed

Description

@kustomzone
  1. Did you update? ` --- cloned and reinstalled
  2. Local / cloud --- local
  3. GPUs used? --- 1 gpu
  4. Notebook? --- n/a
  5. Unsloth version? --- fresh install
  6. Trainer? --- n/a

Used very large models in Studio's Tauri app (and also web-ui directly) and changing model settings which causes any and all models to unload correctly before reloading the same or different model.

But when switching to unsloth run to customize llama-server flags then try changing a model's settings, the model gets loaded a second time without unloading the first copy. The memory spike causes system halt and or crash. (smaller model example to demonstrate)

Image

Activity

  1. Datta0 commented on May 13, 2026

    @Datta0
    Contributor

    Hey @kustomzone do you mean you ran unsloth run twice and expect the second instance to unload the first instance?

  2. kustomzone commented on May 13, 2026

    @kustomzone
    Author

    Nope, just the one time and using the web ui. At first i didn't know what happened as my model was close to using all ram so my system locked up, so i tried the smaller model to confirm my suspicion that it had attempted loading the same model again without ejecting it first.

  3. Datta0 commented on May 13, 2026

    @Datta0
    Contributor

    Can you share the logs if you have of the same run?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions