Skip to content

[Bug] NemotronH config export fails: num_hidden_layers not found #56

@jump-drive

Description

@jump-drive

Bug

NemotronH config export crashes before ONNX generation. NemotronHConfig uses layers_block_type (list of layer type strings) instead of num_hidden_layers. _export_hybrid_mamba_config treats num_hidden_layers as required.

KeyError: "Required field 'num_hidden_layers' not found in config"

Fix: derive from layers_block_type when absent.

tensorrt_edgellm/onnx_export/config_export.py, in _export_hybrid_mamba_config:

if "num_hidden_layers" not in config_dict and "layers_block_type" in config_dict:
    config_dict = dict(config_dict)
    config_dict["num_hidden_layers"] = len(config_dict["layers_block_type"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions