Skip to content

[Feature Request] Support for mixtral moe #128

Closed

Description

@souvik3333

Any plan to support mixtral moe?

Activity

  1. danielhanchen commented on Jan 25, 2024

    @danielhanchen
    Member

    Yep - on our roadmap - but to be honest, our bandwidth as a 2 person startup is extremely limited - we thought about waiting to see what arch Llama 3 is, then seeing if we should support MoE type models.

    New research from Llama-Pro and other depth extension papers and sparsity papers show the reason why MoEs work is due to the sparse nature of computation. However, the theory is if one trains the models for longer, the sparsity nature slowly diminishes, and the weights become dense. However this is speculation.

    So in the best interest of things, I wanted to wait and see what Llama 3 will be - will it be more tokens, smaller models, or will Llama 3 also have a MoE? And if MoE - what arch?

  2. souvik3333 commented on Jan 25, 2024

    @souvik3333
    Author

    However, the theory is if one trains the models for longer, the sparsity nature slowly diminishes, and the weights become dense. However this is speculation.

    Is this based on some experiments? Do you think very large (>50b params) ones will also be dense? For small models it makes sense.

    I wanted to wait and see what Llama 3 will be - will it be more tokens, smaller models, or will Llama 3 also have a MoE? And if MoE - what arch?

    Yeah makes sense. I just tried mistral 7b and the speed up and memory optimization was really nice. Really interested to try out on large models.

  3. tohrnii commented on Jan 25, 2024

    @tohrnii
    Contributor

    @danielhanchen I'd like to take a stab at it if that's ok. But I'm coming at it completely cold so it might take a while.

  4. danielhanchen commented on Jan 25, 2024

    @danielhanchen
    Member

    @souvik3333 Not sure where I read it from sadly.
    @tohrnii Oh cool - more than happy for more help! I think technically a sub-optimized Mixtral is in fact doable (if one copies and pastes HF's code, and replaces it with Unsloth) - I just have to add a faster kernel for the MLP layer.

  5. trenkert commented on Jan 25, 2024

    @trenkert

    I'd be interested in mixtral-instruct as well.

  6. danielhanchen commented on Jan 27, 2024

    @danielhanchen
    Member

    Ohh noo @souvik3333 no need to close the issue!! Its good to keep this as a tracker for me internally :)

  7. added
    on roadmap
    help wanted
    on Jan 27, 2024
  8. findalexli commented on Feb 9, 2024

    @findalexli

    what would it take for the community to help?

  9. danielhanchen commented on Feb 9, 2024

    @danielhanchen
    Member

    @findalexli Oh so @tohrnii has been working on Mixtral :)) Maybe if you can clone the branch and try it out / or help them maybe, that'll be much appreciated :)

  10. RonanKMcGovern commented on Mar 4, 2024

    @RonanKMcGovern

    Hmm, I would have thought it's not too bad to convert Mixtral to unsloth. Basically, the only modules that should be set to trainable are the attention ones, and those are set up just like mistral (every expert uses the same attention matrixes). This means there's no need to do any back-prop updates for the feedforward layers (which are the experts).

  11. danielhanchen commented on Mar 4, 2024

    @danielhanchen
    Member

    @RonanKMcGovern Ye it can be ported over - in fact everything can be left, except for the optimization of the MoE part for the MLP layer - ther definitely is a speed up, albeit less

  12. changed the title [-]Support for mixtral moe[/-] [+][Feature Request] Support for mixtral moe[/+] on Oct 9, 2024
  13. chintan-ushur commented on Jan 16, 2025

    @chintan-ushur

    Revisiting in 2025, please help us know if this is still a plan, eagerly waiting for MoE tuning lib after huge success of DeepSeek-v3.

  14. shimmyshimmer commented on Mar 15, 2025

    @shimmyshimmer
    Member

    Hi everyone, apologies for the delays - Mixtral and MOE models and nearly every model in existence (transformer style) are now supported! :)

    Read our blogpost about it: https://unsloth.ai/blog/gemma3#everything

    Also FFT + all training methods is now supported

    Also multiGPU is coming real soon so be on the lookout!!

    We also uploaded the 4bit models to our hugging face

    CC: @trenkert @findalexli @RonanKMcGovern @chintan-ushur

  15. added a commit that references this issue on Jun 8, 2025
  16. added a commit that references this issue on Jun 25, 2025
  17. added a commit that references this issue on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedon roadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions