-
Notifications
You must be signed in to change notification settings - Fork 9
Add Mixture-of-Experts implementation #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a Mixture-of-Experts (MoE) implementation for actor networks in reinforcement learning. The implementation provides both standalone actor MoE and actor-critic MoE classes that combine outputs from multiple expert networks using a gating mechanism.
- Adds
ActorMoE
class implementing mixture-of-experts actor model with gating network - Adds
ActorCriticMoE
class extending ActorMoE with critic network for actor-critic RL - Updates module exports and ONNX exporter to support the new MoE architecture
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
amp_rsl_rl/networks/ac_moe.py |
New file containing MoE implementation with ActorMoE and ActorCriticMoE classes |
amp_rsl_rl/networks/__init__.py |
Updates module exports to include new MoE classes |
amp_rsl_rl/utils/exporter.py |
Adds ONNX export support for ActorMoE architecture |
Comments suppressed due to low confidence (2)
amp_rsl_rl/networks/ac_moe.py:9
- Class name 'MLP_net' violates Python naming conventions. It should be 'MLPNet' or 'MLP' following PascalCase convention for class names.
class MLP_net(nn.Sequential):
amp_rsl_rl/networks/ac_moe.py:108
- Using the incorrectly named 'MLP_net' class. This should be updated once the class name is fixed to follow proper naming conventions.
self.critic = MLP_net(num_critic_obs, critic_hidden_dims, 1, act)
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Tested and working. Merging! |
This pull request introduces the implementation of Mixture of Experts (MoE) as actor.
New Features:
ActorMoE
class, which implements a Mixture-of-Experts actor model. This model combines outputs from multiple expert networks using a gating network and softmax weights. (amp_rsl_rl/networks/ac_moe.py
, amp_rsl_rl/networks/ac_moe.pyR1-R170)ActorCriticMoE
class, which extends theActorMoE
with a critic network for actor-critic reinforcement learning. It includes support for noise modeling and action distribution. (amp_rsl_rl/networks/ac_moe.py
, amp_rsl_rl/networks/ac_moe.pyR1-R170)Codebase Updates:
__init__.py
to includeActorMoE
andActorCriticMoE
in the module's exports, ensuring they are accessible when importing theamp_rsl_rl/networks
package. (amp_rsl_rl/networks/__init__.py
, amp_rsl_rl/networks/init.pyR10-R13)