Skip to content

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

@kustomzone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions