We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7e6145 commit bda42f8Copy full SHA for bda42f8
tensorrt_llm/_torch/models/modeling_nemotron_h.py
@@ -63,8 +63,16 @@ def __init__(
63
layer_idx: int,
64
):
65
config = model_config.pretrained_config
66
+ if isinstance(config.intermediate_size, list):
67
+ if len(config.intermediate_size) == 1:
68
+ intermediate_size = config.intermediate_size[0]
69
+ else:
70
+ intermediate_size = config.intermediate_size[layer_idx]
71
72
+ intermediate_size = config.intermediate_size
73
+
74
super().__init__(hidden_size=config.hidden_size,
- intermediate_size=config.intermediate_size,
75
+ intermediate_size=intermediate_size,
76
bias=False,
77
activation=relu2,
78
dtype=config.torch_dtype,
0 commit comments