Skip to content

Validate an explicit GGUF variant before unloading the resident model - #7862

Merged
oobabooga merged 5 commits into
unslothai:mainfrom
NilayYadav:fix-gguf-variant-validate-before-unload
Aug 7, 2026
Merged

oobabooga merged 5 commits into
unslothai:mainfrom
NilayYadav:fix-gguf-variant-validate-before-unload

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Loading with a mistyped --gguf-variant (e.g. NOPE_Q9) evicted the resident model first and only then hit the 404 for the nonexistent quant, leaving the server with no model loaded for every attached session.

Two changes:

  1. ModelConfig.from_identifier already fetches the repo's variant list, so reject an explicit variant there before any teardown when it matches no repo file and no cached copy; matching reuses _gguf_files_for_variant, so anything the download path could resolve (case-insensitive labels, cache-only variants, offline loads) still loads unchanged.
  2. After a failed switch, the CLI verifies whether the resident model survived and prints "Nothing was unloaded; is still serving." so the earlier unload warning can't mislead.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59879be975

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8da3d4efe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread unsloth_cli/commands/start.py Resolved
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ae06c4c6e9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga
oobabooga merged commit e5c55e3 into unslothai:main Aug 7, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants