{{ message }}
Make the models a defaults file claims actually load it - #8726
Merged
oobabooga merged 3 commits intoAug 17, 2026
Conversation
A model id reaches its model_defaults YAML either through MODEL_NAME_MAPPING
or through the org/model -> org_model.yaml filename convention. The primary
name is always covered by the convention, so only the aliases named in the
header comment can drift, and nine of them had:
unsloth_gemma-4-31B-it.yaml unsloth/gemma-4-31B-it-GGUF
unsloth_gemma-4-26B-A4B-it.yaml unsloth/gemma-4-26B-A4B-it-GGUF
unsloth_gemma-4-E2B-it.yaml unsloth/gemma-4-E2B-it-GGUF
unsloth_gemma-4-E4B-it.yaml unsloth/gemma-4-E4B-it-GGUF
unsloth_GLM-4.7-Flash.yaml THUDM/GLM-4.7-Flash
unsloth/GLM-4.7-Flash-bnb-4bit
unsloth/GLM-4.7-Flash-unsloth-bnb-4bit
unsloth_Qwen3-30B-A3B-Instruct-2507.yaml
Qwen/Qwen3-30B-A3B-Instruct-2507
unsloth/Qwen3-30B-A3B-Instruct-2507-bnb-4bit
Each of those fell back to default.yaml, so the tuned hyperparameters were
replaced by generic ones without any sign to the user. The MoE config is the
clearest: unsloth/Qwen3-30B-A3B-Instruct-2507 loads lora_r 32 and batch_size 1,
while Qwen/Qwen3-30B-A3B-Instruct-2507, the upstream id for the same weights,
loaded lora_r 16 and batch_size 2.
GLM-4.7-Flash and Qwen3-30B-A3B-Instruct-2507 had no MODEL_NAME_MAPPING entry
at all and worked only through the filename convention, which is why their
aliases had nowhere to resolve from.
for more information, see https://pre-commit.ci
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
A model id reaches its
model_defaultsYAML by one of two routes inload_model_defaults: an entry inMODEL_NAME_MAPPING, or theorg/modeltoorg_model.yamlfilename convention. The primary name is always covered by the convention, so it cannot break. The aliases named in each file's# Also applies to:header can, and nine of them had.Cross-checking every claimed alias against what
load_model_defaultsactually returns:gemma/unsloth_gemma-4-31B-it.yamlunsloth/gemma-4-31B-it-GGUFgemma/unsloth_gemma-4-26B-A4B-it.yamlunsloth/gemma-4-26B-A4B-it-GGUFgemma/unsloth_gemma-4-E2B-it.yamlunsloth/gemma-4-E2B-it-GGUFgemma/unsloth_gemma-4-E4B-it.yamlunsloth/gemma-4-E4B-it-GGUFother/unsloth_GLM-4.7-Flash.yamlTHUDM/GLM-4.7-Flash,unsloth/GLM-4.7-Flash-bnb-4bit,unsloth/GLM-4.7-Flash-unsloth-bnb-4bitqwen/unsloth_Qwen3-30B-A3B-Instruct-2507.yamlQwen/Qwen3-30B-A3B-Instruct-2507,unsloth/Qwen3-30B-A3B-Instruct-2507-bnb-4bitEach one fell through to
default.yaml, so the tuned hyperparameters were quietly replaced by generic ones. The backend log says so plainly,Loaded default model defaults from .../default.yamlrather thanLoaded model defaults from .../<model>.yaml, but nothing surfaces that to the user; the training form just fills in with different numbers.The MoE config shows the size of it best, since a 30B MoE is not something you want to train on generic defaults:
Qwen/Qwen3-30B-A3B-Instruct-2507is the upstream id for the same weights, andTHUDM/GLM-4.7-Flashlikewise, so this is not an obscure spelling: it is what someone gets by pasting the model id from the Hub page rather than picking the Unsloth mirror.Why the two of them broke
unsloth_GLM-4.7-Flash.yamlandunsloth_Qwen3-30B-A3B-Instruct-2507.yamlhad noMODEL_NAME_MAPPINGentry at all. They worked through the filename convention alone, which covers the primary name and nothing else, so their aliases had nowhere to resolve from. The four gemma-4 files had entries that listed thegoogle/alias but not the-GGUFone.Fix
Add the nine claimed aliases, which is data only and purely additive. No behaviour outside these six configs changes.
Test
tests/test_model_defaults_aliases_resolve.pyderives its cases from the YAML headers rather than hardcoding a list, so a future file that claims an alias it cannot resolve fails without anyone remembering to update the test. It parametrises over every# Also applies to:name (186 cases today) and asserts the alias loads the same dict as the config's own name.It also asserts the fixture found more than 20 aliases, so a header reformat or a directory move fails loudly instead of leaving the test silently checking nothing.
The 9 failures name the exact alias, for example:
Selecting the neighbouring suites with
-k "model_config or model_defaults or mapping or yaml"gives 101 passed / 11 skipped both with this change and on a clean tree, so nothing else moved.test_audio_type_inconclusive.pyandtest_mcp_server.pyare excluded from that run: they fail to import here for a missingunsloth_zooandfastmcp, on a clean tree as well.