Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fuse_ln args #216

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions paddlemix/examples/evaclip/run_pretrain_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class PreTrainingArguments(TrainingArguments):
default=False,
metadata={"help": "Whether to use tensorboard to record loss."},
)
fuse_ln: bool = field(
default=True,
metadata={"help": "Whether to use fused layer norm."},
)
pretrained_text_model: str = field(default="openclip", metadata={"help": "the model to pre-extract text feats"})


Expand Down Expand Up @@ -189,6 +193,8 @@ def main_worker(training_args, model_args, data_args):
paddle.set_default_dtype("bfloat16")

config = EVACLIPConfig.from_pretrained(model_args.model)
config["text_config"]["fusedLN"] = training_args.fuse_ln
config["vision_config"]["fusedLN"] = training_args.fuse_ln
model = EVACLIP(
config,
disable_text=False,
Expand Down