use pre-commit

This commit is contained in:
hiyouga
2024-10-29 09:07:46 +00:00
parent 77666bd227
commit 21db8ed2f4
86 changed files with 1048 additions and 1064 deletions

View File

@@ -65,7 +65,7 @@ def configure_attn_implementation(
requested_attn_implementation = "flash_attention_2"
else:
raise NotImplementedError("Unknown attention type: {}".format(model_args.flash_attn))
raise NotImplementedError(f"Unknown attention type: {model_args.flash_attn}")
if getattr(config, "model_type", None) == "internlm2": # special case for custom models
setattr(config, "attn_implementation", requested_attn_implementation)