From 085d2ed7d8c519993dfe60d13d45d0ddc517676b Mon Sep 17 00:00:00 2001 From: Virginia Adams Date: Thu, 17 Feb 2022 11:34:57 +0000 Subject: [PATCH] Parallel with single GPU is working! Signed-off-by: Virginia Adams --- .../nlp/models/language_modeling/megatron_gpt_model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nemo/collections/nlp/models/language_modeling/megatron_gpt_model.py b/nemo/collections/nlp/models/language_modeling/megatron_gpt_model.py index 2d74d5856b5a..e5c2f81102b1 100755 --- a/nemo/collections/nlp/models/language_modeling/megatron_gpt_model.py +++ b/nemo/collections/nlp/models/language_modeling/megatron_gpt_model.py @@ -787,9 +787,8 @@ def prompt_tuning_param_optimizer_setup_and_freeze(self): for prompt_tag in self.model.language_model.prompt_table.prompt_table.keys(): if prompt_tag in self.prompts_to_tune: for params in self.model.language_model.prompt_table.prompt_table[prompt_tag].parameters(): - param.requires_grad = True + params.requires_grad = True weight_decay_params['params'].append(params) - self.prompt_tuning_params.append(params) else: for param in self.model.language_model.prompt_table.prompt_table[prompt_tag].parameters(): param.requires_grad = False