Skip to content

Commit 5ef3abe

Browse files
committed
update maximum loss for amplify recipe
Signed-off-by: Peter St. John <pstjohn@nvidia.com>
1 parent 8f196ef commit 5ef3abe

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

recipes/esm2_accelerate/tests/test_accelerate_amplify.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,37 @@
2626

2727
def test_te_with_default_config(tmp_path):
2828
train_loss = launch_accelerate("default.yaml", tmp_path, 1, "L0_sanity_amplify")
29-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
29+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
3030

3131

3232
def test_te_with_dynamo_config(tmp_path):
3333
train_loss = launch_accelerate("dynamo.yaml", tmp_path, 1, "L0_sanity_amplify")
34-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
34+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
3535

3636

3737
def test_te_with_fp8_config(tmp_path):
3838
train_loss = launch_accelerate("fp8.yaml", tmp_path, 1, "L0_sanity_amplify")
39-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
39+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
4040

4141

4242
def test_te_with_fsdp2_config(tmp_path):
4343
train_loss = launch_accelerate("fsdp2_te.yaml", tmp_path, 1, "L0_sanity_amplify")
44-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
44+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
4545

4646

4747
@requires_multi_gpu
4848
def test_te_with_default_config_two_gpus(tmp_path):
4949
train_loss = launch_accelerate("default.yaml", tmp_path, 2, "L0_sanity_amplify")
50-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
50+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
5151

5252

5353
@requires_multi_gpu
5454
def test_te_with_fp8_config_two_gpus(tmp_path):
5555
train_loss = launch_accelerate("fp8.yaml", tmp_path, 2, "L0_sanity_amplify")
56-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
56+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"
5757

5858

5959
@requires_multi_gpu
6060
def test_te_with_fsdp2_config_two_gpus(tmp_path):
6161
train_loss = launch_accelerate("fsdp2_te.yaml", tmp_path, 2, "L0_sanity_amplify")
62-
assert train_loss < 6.0, f"Final train_loss {train_loss} should be less than 6.0"
62+
assert train_loss < 3.0, f"Final train_loss {train_loss} should be less than 3.0"

recipes/esm2_accelerate/train.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def main(args: DictConfig):
4747

4848
config = AutoConfig.from_pretrained(args.model_tag, trust_remote_code=True)
4949
model = AutoModelForMaskedLM.from_config(config, trust_remote_code=True, dtype=torch.bfloat16)
50-
model.accepts_loss_kwargs = False
5150

5251
train_dataset, eval_dataset, data_collator = create_datasets_and_collator(
5352
tokenizer_name=args.model_tag,

0 commit comments

Comments
 (0)