[WIP] TST Enable int4 torchao tests #2848
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying to train LoRA with int4 torchao used to raise a RuntimeError. Lately, this error no longer being raised, suggesting that int4 training is unblocked.
For this to work, we need:
The latter is not yet implemented, so this PR is WIP for now.
Moreover, on my machine, I still get an error with int4, namely:
This could be something specific to my setup and has to be investigated further.
Moreover, there was a warning that bfloat16 should be used with torchao, so I switched the dtype used in the tests to bfloat16. This required one test to increase the tolerances for comparing outputs.