Skip to content

Lumina block swap#19

Merged
sdbds merged 49 commits intosdbds:luminafrom
rockerBOO:lumina-block-swap
Mar 2, 2025
Merged

Lumina block swap#19
sdbds merged 49 commits intosdbds:luminafrom
rockerBOO:lumina-block-swap

Conversation

@rockerBOO
Copy link

Based on #16

Enables block swap for Lumina

kohya-ss and others added 30 commits January 27, 2025 20:50
(おそらく kohya-ss@be14c06 の修正漏れ )
…-recorder

Fix validation epoch loss to check epoch average
The postions_ids cause errors for the newer version of transformer.
This has already been fixed in convert_ldm_clip_checkpoint_v1() but
not in v2.
The new code applies the same fix to convert_ldm_clip_checkpoint_v2().
@rockerBOO rockerBOO marked this pull request as draft February 27, 2025 19:48
@rockerBOO
Copy link
Author

rockerBOO commented Feb 27, 2025

This was working fine but when it swaps to validation it is having device mismatches. Working through the code to try and figure that out. Might be because it's a sequential module which would need to be fixed to work.

The goal with this is to make block swapping work so running and training Gemma 2 LoRA would be more available. Also might be possible to engage with block swapping for Gemma 2 to make it a little more compatible.

@rockerBOO rockerBOO marked this pull request as ready for review February 28, 2025 01:36
@rockerBOO
Copy link
Author

Needed on_validation_step_end but I had a full custom offloading test pass to figure out it was working as expected.

@rockerBOO
Copy link
Author

Sample images had similar issues and now is working.

@sdbds sdbds merged commit b5d1f1c into sdbds:lumina Mar 2, 2025
1 check passed
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.

6 participants