Skip to content
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

Question about multi-gate refer to multi-task learning #70

Open
Tokkiu opened this issue Dec 26, 2021 · 5 comments
Open

Question about multi-gate refer to multi-task learning #70

Tokkiu opened this issue Dec 26, 2021 · 5 comments
Labels
question Further information is requested

Comments

@Tokkiu
Copy link

Tokkiu commented Dec 26, 2021

Thanks for your contribution and excellent work of tutel!
I am wondering can I use tutel to implement the multi-gate above experts like the picture as follows?
Screenshot 2021-12-26 at 10 52 16 PM

Currently, I can't see any similar solution in example files.

@ghostplant
Copy link
Contributor

Do you mean something like this?

self._layer = tutel.moe.moe_layer(gate1_type={..}, gate2_type={..}, ..)

output1 = self._layer(data, use_gate1)
output2 = self._layer(data, use_gate2)

@Tokkiu
Copy link
Author

Tokkiu commented Dec 27, 2021

@ghostplant Yes! And how to specify 'use_gate1' and 'use_gate2'?

@ghostplant
Copy link
Contributor

We are going to merge this: https://github.com/microsoft/tutel/pull/71/files
You can create new moe layers by specifying a list of original gating types.
And when forwarding the moe layer, you can use self._moe_layer(data, gate_index=) to choose which gate to use.

@Tokkiu
Copy link
Author

Tokkiu commented Dec 27, 2021

We are going to merge this: https://github.com/microsoft/tutel/pull/71/files You can create new moe layers by specifying a list of original gating types. And when forwarding the moe layer, you can use self._moe_layer(data, gate_index=) to choose which gate to use.

@ghostplant Nice work! Looking forward to your new feature.

@ghostplant
Copy link
Contributor

It's done. Feel free to share any feedbacks. Thanks!

@ghostplant ghostplant added the question Further information is requested label Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants