Add support for 24GB VRAM fine tuning via 8bit optimizers #162
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.
Caveats: Open to feedback on configuration - wasn't entirely clear how to separate it, but made it generic enough to pull in any optimizer from bnb.
Summary of changes
Tests done
5k test wav dataset, stock model config, and stock pretrained model:
| Name | Type | Params
0 | diffusion | ConditionedDiffusionModelWrapper | 1.2 B
1 | diffusion_ema | EMA | 1.1 B
2 | losses | MultiLoss | 0
1.1 B Trainable params
1.2 B Non-trainable params
2.3 B Total params
9,080.665 Total estimated model params size (MB)
With VRAM usage observed:
Device 0 [NVIDIA GeForce RTX 3090] PCIe GEN 4@16x RX: 47.85 MiB/s TX: 7.812 MiB/s
GPU 1635MHz MEM 9501MHz TEMP 77°C FAN 97% POW 315 / 350 W
GPU[|||||||||||||||||||||||||||||||100%] MEM[||||||||||||||||||22.367Gi/24.000Gi]