Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wtmlon committed Jun 27, 2024
1 parent 62b74d8 commit 74bc7ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llm/alignment/dpo/run_dpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def main():
)
model.config.use_flash_attention = True

if not any(isinstance(model, cls) for cls in flash_mask_support_list):
if model_args.flash_mask and not any(isinstance(model, cls) for cls in flash_mask_support_list):
raise NotImplementedError(f"{model.__class__} not support flash mask.")

if model_args.tokenizer_name_or_path is not None:
Expand Down
2 changes: 1 addition & 1 deletion llm/run_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def main():
data_args.zero_padding = True
model.config.use_flash_attention = True

if not any(isinstance(model, cls) for cls in flash_mask_support_list):
if model_args.flash_mask and not any(isinstance(model, cls) for cls in flash_mask_support_list):
raise NotImplementedError(f"{model.__class__} not support flash mask.")

if training_args.do_train and model_args.neftune:
Expand Down

0 comments on commit 74bc7ad

Please sign in to comment.