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

added the utility function to print model flops #47

Open
wants to merge 3 commits into
base: llama2-google-next-training
Choose a base branch
from

Conversation

ultrons
Copy link

@ultrons ultrons commented Nov 7, 2023

Added steptime and model flop estimation calc.

data, fsdp, mdl = self.args.spmd_mesh.ici_mesh_shape
num_devices = data * fsdp * mdl
num_tokens = inputs["input_ids"].numel() / num_devices
xm.master_print(f"Step time: {step_time}: Model TFLOPS: {self.model_flops(step_time, num_tokens)}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @yeounoh, we can emit this to Tensorboard for perf tests (in addition to the convergence metrics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants