Skip to content

Mixture of Experts - #2

Open
dan-smith-tech wants to merge 9 commits into
EveNet-HEP:mainfrom
dan-smith-tech:main
Open

Mixture of Experts#2
dan-smith-tech wants to merge 9 commits into
EveNet-HEP:mainfrom
dan-smith-tech:main

Conversation

@dan-smith-tech

@dan-smith-tech dan-smith-tech commented Mar 31, 2026

Copy link
Copy Markdown

Add MoE parameters.

@dan-smith-tech
dan-smith-tech marked this pull request as draft March 31, 2026 17:00
dan-smith-tech and others added 3 commits March 31, 2026 18:02
This reverts commit a3b4c3d.
- Add Gate, Expert, MoE classes to network/layers/transformer.py
- Update TransformerBlockModule with optional MoE FFN (use_moe param),
  storing per-block moe_l_aux and moe_cz_lz after each forward pass
- Update PETBody in network/body/embedding.py to accept all MoE
  hyperparameters alongside existing use_adapter, pass them to each
  TransformerBlockModule, and accumulate moe_l_aux/moe_cz_lz across
  transformer blocks in forward
- Update EveNetModel in network/evenet_model.py to pass MoE params to
  PETBody, track moe_l_aux_total/moe_cz_lz_total in forward, and return
  them as 'L_aux'/'cz_Lz' in the output dict
- Add network/loss/moe.py with a loss() helper that extracts L_aux and
  cz_Lz from the model output dict for integration into training loops

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dan-smith-tech
dan-smith-tech marked this pull request as ready for review March 31, 2026 17:21
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.

1 participant