convert: fix Nemotron-H LoRA GGUF conversion - #27356
Merged
CISC merged 3 commits intoAug 27, 2026
Merged
Conversation
Member
|
Point 1 should be fixed by #27101, point 2 is a bit mysterious, why do the naming differ? |
Contributor
Author
|
Indeed, #27101 settles point 1. As for point 2, the The found name disagrees with the |
Contributor
Author
|
@CISC I have removed the changes I made for Defect 1. The push now solely handles Defect 2. |
danbev
approved these changes
Aug 27, 2026
CISC
approved these changes
Aug 27, 2026
ppenatra
pushed a commit
to ppenatra/llama.cpp
that referenced
this pull request
Aug 27, 2026
* convert: fix Nemotron-H LoRA GGUF conversion * Removed redundant JSON import.
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.
Overview
LoRA adapters cannot be converted to GGUF for Nemotron-H models. convert_lora_to_gguf.py fails with
twoone independent, sequential defects.Defect 1 - hparams resolution(Resolved in #27101 )Defect 2 - After working around Defect 1, the first adapter tensor is rejected. PEFT names adapter tensors from the runtime module tree (model.layers.*), while gguf-py/gguf/tensor_mapping.py registers only the on-disk checkpoint form (backbone.layers.*) for Nemotron-H. The two naming domains never meet.
Fix 2 - We rename model.layers.* to backbone.layers.* for tensors containing .mixer. before delegating to the parent filter.
Additional information
Defect 2 cannot be reached without Defect 1's resolution.
The test command used for all cases is -
The used LORA adaptor is available here. After applying the 2 fixes identified above, we can get the following successful result -
Requirements