From f32b35b90b8385b45b8dc7cee01c2f6325ef67ae Mon Sep 17 00:00:00 2001 From: epwalsh Date: Fri, 22 Nov 2024 11:36:13 -0800 Subject: [PATCH] fix --- src/test/nn/transformer/model_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/nn/transformer/model_test.py b/src/test/nn/transformer/model_test.py index 85709f72..75cc2635 100644 --- a/src/test/nn/transformer/model_test.py +++ b/src/test/nn/transformer/model_test.py @@ -101,7 +101,7 @@ def run_ngpt_with_fsdp2(): dp_config=TransformerDataParallelConfig(name=DataParallelType.fsdp), ) model = config.build(init_device="meta", max_seq_len=1024) - optim = torch.optim.Adam(model.params()) + optim = torch.optim.Adam(model.parameters()) # Take an optimizer step. model(input_ids=torch.randint(0, 50257, (2, 128))).sum().backward()