Skip to content

Conversation

@gante
Copy link
Collaborator

@gante gante commented Jun 27, 2023

@fxmarty this PR adds tools to quickly run and plot sweeps, so we can make deeper comparisons between commits in an automated way.

In particular, we can now trigger a sweep with --sweep batch or --sweep length, to which triggers a sweep over batch size or prompt length, respectively, storing the result in a dataframe. The results can quickly be plotted with e.g. python scripts/plot_results.py --sweep length, which stores a plot to ./results/

NOTE: I've triggered max-autotune during a sweep, so we can see how fast it can go in its compiled form 🚤

Results

Here are the plots for the current main, on a RTX 3090

Batch size sweep

llama_sweep_9b80a35_batch

Prompt length sweep

llama_sweep_9b80a35_length

@gante gante merged commit 1a43bb7 into main Jun 27, 2023
@gante gante deleted the plot_sweep branch June 27, 2023 20:26
Copy link
Owner

@fxmarty fxmarty left a comment

Choose a reason for hiding this comment

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

awesome

dynamic = args.compile == "dynamic"
fullgraph = args.compile == "fullgraph"
model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=fullgraph, dynamic=dynamic)
mode = "reduce-overhead" if not args.sweep else "max-autotune"
Copy link
Owner

Choose a reason for hiding this comment

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

why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To see how fast we can get with compile :) Happy to revert if you feel like it won't be the planned use case!

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.

3 participants