Skip to content

[Bug] Unable to load 2 models of the same parent name (concurrently) #19072

In review

Description

@Shooter3k

Unsloth desktop won't let me load 2 of the same model names

image

When I click on the "UD-Q5_K_S" it unloads the "UD-Q4_K_XL" model. So basically whatever is loaded, it just switches to the other one instead of loading both

image

Maybe unsloth needs some sort of 'switch to model' vs. 'load additional model' option?

.....and since I know everyone is going to ask; yes I have them set to different GPU's

image image

Activity

  1. added
    feature request
    on Nov 23, 2026
  2. self-assigned this
    on Nov 23, 2026
  3. indrajeetapache commented on Nov 23, 2026

    @indrajeetapache
    Contributor

    @danielhanchen @NilayYadav Validated against current Studio code — the report matches a deliberate residency policy, not a GPU-pin / VRAM-fit glitch. Asking you both to review whether we should keep that policy or change it.

    What the user sees

    Loading a second GGUF quant of the same HF parent (e.g. …-UD-Q4_K_XL already up, click …-UD-Q5_K_S) unloads/replaces the first even when the two quants are pinned to different GPUs. A “switch model” vs “load additional” control would match that mental model.

    Root cause (not the GPU picker)

    Multi-model (Keep multiple models loaded / fit / always) does allow two different repos side by side. Same-parent quants are collapsed on purpose in _select_load_slot (studio/backend/routes/inference.py):

    requested = _model_key(request)          # repo:QUANT
    route exact key → miss
    if gguf_variant:
      # comment in tree: "Another quant replaces its repo in place:
      # requests name the repo, so a copy beside it is unreachable."
      route bare repo → hit primary/slot that already serves that repo
      → reuse that slot → in-place replace (GPU pins never consulted)
    

    Supporting pieces:

    • _loaded_satisfies: a bare org/name matches any loaded quant of that repo; only an explicit :QUANT must match.
    • public_model_id / HF-cache identity folds paths to the repo id (quant is a separate field).
    • Exact load key is model_path:gguf_variant, but the alongside branch never opens a second slot once the bare repo is already resident.
    • Fit/Always eviction in gpu_residency is for other models’ VRAM — this path fires even with alongside=True and multi-model on.

    So different GPUs don’t help: slot selection ignores gpu_ids for this decision and replaces before placement.

    Classification

    Matches report? Yes
    Accidental bug? No — coded + commented as policy
    Why policy exists Chat/API often name the repo, so a second quant “beside” the first would be hard to address for routing
    User expectation Treat repo + quant as distinct residents (switch vs load-additional)

    Labeled both bug and feature request — accurate: feels broken when comparing quants on two GPUs, but current behavior is intentional.

  4. NexGen-3D-Printing commented on Nov 24, 2026

    @NexGen-3D-Printing

    I hit this issue now too, trying to load multiple models on to one GPU or different GPU's just ejects the other, my case they are both from the same provider (Liquid-AI) but are completely different models and it wont have it, will need to spin up multiple instances of Unsloth use them as backends and pipe them back to my orchestration controller, seems like a complicated way to do it, will need to share the model cache across each instance to reduce drive space.

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

Metadata

Metadata

Labels

bugfeature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions