Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

add simple finetuning check with fp8 emulation #8

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jul 24, 2023

Summary:

Creates a simple image classification network and finetunes it on MNIST. Baseline is fp32, and fp8 training can be enabled with a flag. Verified that fp8 training converges on this simple example. Note that fp8 compute is emulated for now as we don't have a hookup to the real fp8 matmul kernel yet.

Test Plan:

with-proxy python finetune/mnist.py --batch-size 4096
// https://gist.github.com/vkuzo/0e8cbb3df1f0610e528ac3ad15da3ace
with-proxy python finetune/mnist.py --batch-size 4096 --use-pt-fp
// https://gist.github.com/vkuzo/99b0cf2c1492a5f605c9f028f12340c3

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:

Creates a simple image classification network and finetunes it
on MNIST.  Baseline is fp32, and fp8 training can be enabled with
a flag.  Verified that fp8 training converges on this simple example.
Note that fp8 compute is emulated for now as we don't have a hookup
to the real fp8 matmul kernel yet.

Test Plan:

```
with-proxy python finetune/mnist.py --batch-size 4096
// https://gist.github.com/vkuzo/0e8cbb3df1f0610e528ac3ad15da3ace
with-proxy python finetune/mnist.py --batch-size 4096 --use-pt-fp
// https://gist.github.com/vkuzo/99b0cf2c1492a5f605c9f028f12340c3
```

Reviewers:

Subscribers:

Tasks:

Tags:
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 24, 2023
@vkuzo vkuzo merged commit 4695b77 into main Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants