Skip to content

Commit f537813

Browse files
committed
fix compatibility with tinyllama and minitron 4b
Signed-off-by: zhehuaichen <[email protected]>
1 parent 6330a30 commit f537813

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nemo/collections/multimodal/speech_llm/models/modular_s2s_models.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ def forward(
229229
all_logits.append(self.output_layers[i](hidden_states, weight=cur_output_weight)[0])
230230
cur_dims += self.proj_head_dims[i]
231231
assert self.vocab_size == self.proj_head_dims[0]
232-
all_logits[0], _ = self.output_layer(hidden_states, weight=output_weight[: self.vocab_size])
232+
all_logits[0], _ = self.output_layer(
233+
hidden_states, weight=output_weight[: self.vocab_size] if output_weight is not None else None
234+
)
233235

234236
if labels is None:
235237
# [s b h] => [b s h]

0 commit comments

Comments
 (0)