Skip to content

feat: lora for accelerated moe#138

Closed
willmj wants to merge 14 commits into
foundation-model-stack:mainfrom
willmj:peft-config-augmentation-fast-moe
Closed

feat: lora for accelerated moe#138
willmj wants to merge 14 commits into
foundation-model-stack:mainfrom
willmj:peft-config-augmentation-fast-moe

Conversation

@willmj

@willmj willmj commented Mar 25, 2025

Copy link
Copy Markdown
Collaborator

Add peft configs to fast moe augmentation so lora config is passed into prepare_scattermoe.
Restrictions:

  • lora_config.r must be >= 16
  • Must be using FSDP, since the scatteredExperts weights are not supported by peft's LoRA tuning, the overwritten FSDP save and load functions must be utilized here.
  • Loading from a default lora adapter config may not work here, intended use-case is to run tuning from base model.

willmj added 5 commits March 24, 2025 14:57
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
@willmj willmj changed the title feat: add peft configs to fast moe augmentation feat: lora for accelerated moe Mar 28, 2025
Comment thread plugins/accelerated-moe/src/fms_acceleration_moe/utils/checkpoint_utils.py Outdated
willmj added 3 commits April 2, 2025 14:32
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
@willmj
willmj force-pushed the peft-config-augmentation-fast-moe branch from 910153b to da4ccf7 Compare April 2, 2025 19:38
willmj added 5 commits April 2, 2025 16:25
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
@willmj

willmj commented Apr 8, 2025

Copy link
Copy Markdown
Collaborator Author

LoRA SD splits input and output linear layers into LoRA A and LoRA B layers as shown below in the logs:

scattermoe-lora.log

Compared to FT logs:

scattermoe-ft.log

The state dicts at the bottom are the ones right before they are saved to the converted checkpoint file after being run through the recover_original_state_dict_from_checkpoint function

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.

2 participants