Skip to content

Conversation

@ailuntz
Copy link

@ailuntz ailuntz commented Dec 5, 2025

ColumnParallelLinear is optional and set to None when Megatron-Core is not installed.
GPT LM head calls isinstance(self.lm_head, ColumnParallelLinear) without guarding None, causing TypeError: isinstance() arg 2 must be a type.
This adds a None guard before the checks so it runs without Megatron-Core.
Fixes #2049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError when Megatron/Core is missing: ColumnParallelLinear is None in GPT LM head checks

1 participant