Skip to content

Commit

Permalink
updated wandb config
Browse files Browse the repository at this point in the history
  • Loading branch information
ali77sina committed Aug 1, 2024
1 parent 430fd59 commit adc4526
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simplifine_alpha/train_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ def formatting_prompts_func(example):
)

# initialize the model
device, device_name = init_device()
if device_name == 'cuda':
model = AutoModelForCausalLM.from_pretrained(model_name,
token = hf_token,
Expand All @@ -875,7 +876,7 @@ def formatting_prompts_func(example):
if use_peft:
model = get_peft_model(model, peft_config=peft_config)

device, device_name = init_device()

if torch.cuda.device_count() > 1:
if ddp and zero:
raise ValueError('Zero optimization and DDP cannot be used together')
Expand Down

0 comments on commit adc4526

Please sign in to comment.