Repository navigation
fix: correct DeepScaleR-1.5B 16bit mapping to its own repo - #7088
Conversation
The __INT_TO_FLOAT_MAPPER entry keyed by "unsloth/DeepScaleR-1.5B-Preview-unsloth-bnb-4bit" had its first element (the 16bit repo) set to "unsloth/DeepHermes-3-Llama-3-8B-Preview", an unrelated 8B model, while the key and the other two elements are all DeepScaleR-1.5B. That first element is what the mapper build loop uses for INT_TO_FLOAT_MAPPER[key] and, since it starts with "unsloth", for the MAP_TO_UNSLOTH_16bit entries of both "agentica-org/DeepScaleR-1.5B-Preview" and "unsloth/DeepScaleR-1.5B-Preview-bnb-4bit". As a result get_model_name() silently resolved DeepScaleR-1.5B (loaded non-4bit, or via the unsloth 16bit remap) to the DeepHermes 8B model, a different architecture and 5x the size. Point it at "unsloth/DeepScaleR-1.5B-Preview" to match every other entry's convention. Add regression coverage in tests/test_get_model_name.py: end-to-end resolution cases for agentica-org/DeepScaleR-1.5B-Preview (4bit and 16bit) and a direct MAP_TO_UNSLOTH_16bit contract assertion. Signed-off-by: Anas Khan <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request fixes a mapping error in unsloth/models/mapper.py where the 4-bit version of DeepScaleR-1.5B-Preview was incorrectly mapped to DeepHermes-3-Llama-3-8B-Preview instead of its own 16-bit repository. It also adds corresponding unit tests in tests/test_get_model_name.py to verify correct resolution and static mapper contract behavior. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Verified the miswiring first-hand by importing the mapper from main and from your branch. The Hub agrees: the new target is a public repo, the old DeepHermes value isn't publicly resolvable, and DeepHermes appears nowhere else in the mapper, so the copy-paste explanation holds. Your regression tests fail on main's mapper (the 16bit resolution and the static-contract assertion) and the full suite passes on the branch, 2 tests with 40 subtests. Thanks @anxkhn. Merging. |
What
In
unsloth/models/mapper.py, the__INT_TO_FLOAT_MAPPERentry keyed byunsloth/DeepScaleR-1.5B-Preview-unsloth-bnb-4bithas its first tuple element(the 16bit repo) set to an unrelated model:
The key and the other two elements are all DeepScaleR-1.5B, but the first element
is
unsloth/DeepHermes-3-Llama-3-8B-Preview, a different NousResearch reasoningmodel (Llama-3, 8B) that shares nothing with DeepScaleR-1.5B (Qwen2, ~1.8B). It
looks like a copy-paste from a neighboring entry;
DeepHermesappears nowhereelse in the file.
For every other entry, that first element is the
unsloth/<name>16bit repo thatcorresponds to the key. It is what the mapper build loop feeds into
INT_TO_FLOAT_MAPPER[key], and (because it starts withunsloth) into theMAP_TO_UNSLOTH_16bitentries for bothagentica-org/DeepScaleR-1.5B-Previewandunsloth/DeepScaleR-1.5B-Preview-bnb-4bit. Soget_model_name()silently resolvesDeepScaleR-1.5B (loaded non-4bit, or via the unsloth 16bit remap) to the DeepHermes
8B model, a different architecture roughly 5x the size.
Fix
Point that first element at
unsloth/DeepScaleR-1.5B-Preview(which exists on theHub and is the 16bit repo of the key), matching the convention of every other
entry. One-line change; no signatures or control flow touched.
Test
Adds regression coverage to the existing
tests/test_get_model_name.py:get_model_namecases foragentica-org/DeepScaleR-1.5B-Previewin
test_resolution_matrix(the 16bit resolution and the 4bit resolution).MAP_TO_UNSLOTH_16bit["agentica-org/deepscaler-1.5b-preview"]assertionin
test_static_mapper_contract.The 16bit end-to-end case and the static-contract assertion both fail before the
fix (they resolve to DeepHermes) and pass after.
Notes
ruff checkon both files passes.