Skip to content

convert : expand Nemotron H conversion fix - #28689

Merged
ggerganov merged 4 commits into
ggml-org:masterfrom
frozenblade1224:kgulia/fix-nemotron-mm-conversion
Sep 10, 2026
Merged

ggerganov merged 4 commits into
ggml-org:masterfrom
frozenblade1224:kgulia/fix-nemotron-mm-conversion

Conversation

@frozenblade1224

Copy link
Copy Markdown
Contributor

Overview

The fix for the num_hidden_layers attribute outlined in #27101 will not work in the case where the usual attributes are nested under llm_config. This PR fixes that by checking for the presence of a llm_config dict in case layers_block_type is not found straightaway. If found, num_hidden_layers is calculated as len(llm_config["layers_block_type"]) instead.

Additional Information

The existing boolean has_moe_params does the same thing already, i.e. checks for num_experts_per_tok in both hparams and hparams["llm_config"]. To make the change a little neater, I have combined both checks with the same llm_config object. Happy to incorporate any suggestions about my code~

Requirements

Comment thread conversion/nemotron.py Outdated
Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
@CISC CISC added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Sep 10, 2026
@ggerganov
ggerganov merged commit 8c322d5 into ggml-org:master Sep 10, 2026
6 checks passed
@frozenblade1224
frozenblade1224 deleted the kgulia/fix-nemotron-mm-conversion branch September 10, 2026 12:04
pl752 pushed a commit to pl752/llama.cpp that referenced this pull request Sep 15, 2026
* override function for n_h_l

* narrow change for extracting nested attribute

* simpler change; combines has_moe_params

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
zsogitbe pushed a commit to zsogitbe/llama.cpp that referenced this pull request Sep 17, 2026
* override function for n_h_l

* narrow change for extracting nested attribute

* simpler change; combines has_moe_params

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
* override function for n_h_l

* narrow change for extracting nested attribute

* simpler change; combines has_moe_params

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants