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

add numerical test on SAM encoder #5

Merged
merged 1 commit into from
Jul 23, 2023
Merged

add numerical test on SAM encoder #5

merged 1 commit into from
Jul 23, 2023

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jul 23, 2023

Summary:

Adds a check that using Float8Linear on a SAM encoder results in reasonable spot check accuracy.

Note that grad accuracy is not tested as it is all over the place, this is probably expected but saving investigation until later. Specifically the layernorm and positional encoding grads have a large error for fp8 version vs reference.

Test Plan:

python float8_playground/test.py
with-proxy python float8_playground/test_sam.py

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:

Adds a check that using `Float8Linear` on a `SAM` encoder
results in reasonable spot check accuracy.

Note that grad accuracy is not tested as it is all over the place,
this is probably expected but saving investigation until later.
Specifically the layernorm and positional encoding grads have
a large error for fp8 version vs reference.

Test Plan:

```
python float8_playground/test.py
with-proxy python float8_playground/test_sam.py
```

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 23, 2023
@vkuzo vkuzo merged commit cbe8d08 into main Jul 23, 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