Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for megatron_amp_O2 + MegatronGPTSFTModel #7910

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ def __init__(self, cfg: DictConfig, trainer: Trainer):
self._reset_sequence_parallelism_args()
self.virtual_tokens = 0

def sharded_state_dict(self, prefix: str = ''):
use_mcore_gpt = hasattr(self, 'mcore_gpt') and self.mcore_gpt
if not use_mcore_gpt or (self.use_peft and self.setup_complete):
return None
else:
return MegatronGPTModel.sharded_state_dict(self, prefix)

def setup_metric(self, data_cfg):
metric_name = "exact_string_match"
if not hasattr(data_cfg, "metric"):
Expand Down