Mixture of Experts LLM - MoE explained in simple terms

preview_player
Показать описание
Mixture of Experts - MoE explained in simple terms with three easy examples.
You can test Mixtral 8x7B through this link (sign-in required, beta version only, beware):

GPT-4 generated text:
The video transcript provides a comprehensive overview of the development and optimization of mixture of experts (MoE) systems in the context of Large Language Models (LLMs). The presenter begins by introducing the concept of MoE as a framework for decomposing LLMs into smaller, specialized systems that focus on distinct aspects of input data. This approach, particularly when sparsely activated, enhances computational efficiency and resource allocation, especially in parallel GPU computing environments. The video traces the evolution of MoE systems from their inception in 2017 by Google Brain, highlighting the integration of MoE layers within recurrent language models and the critical role of the gating network in directing input tokens to the appropriate expert systems.

The technical specifics of MoE systems are delved into, focusing on the gating network's intelligence in assigning tokens to specific expert systems. Various gating functions, such as softmax gating and noisy top-k gating, are discussed, detailing their role in the sparsity and noise addition to the gating process. The presenter emphasizes the importance of backpropagation in training the gating network alongside the rest of the model, ensuring effective assignment of tokens and balancing computational load. The video also addresses the challenges of data parallelism and model parallelism in MoE systems, underlining the need for balanced network bandwidth and utilization.

Advancements in MoE systems are discussed, with a particular focus on the development of 'megablocks' in 2022, which tackled limitations of classical MoE systems by reformulating computations in terms of block sparse mathematical operations. This innovation led to the creation of more efficient GPU kernels for block sparse matrix multiplication, significantly enhancing the computational speed. The video concludes by discussing the latest trends in MoE systems, including the integration of instruction tuning in 2023, which further refined the performance of MoE systems on downstream tasks. The presentation provides an in-depth view of the evolution, technical underpinnings, and future directions of MoE systems in the realm of LLMs and vision language models.

Mixtral 8x7B config:
"dim": 4096,
"n_layers": 32,
"head_dim": 128,
"hidden_dim": 14336,
"n_heads": 32,
"n_kv_heads": 8,
"norm_eps": 1e-05,
"vocab_size": 32000,
"moe": {
"num_experts_per_tok": 2,
"num_experts": 8

Unproven info: GPT-4’s 8 experts with 111 billion parameters each.

recommended literature:
---------------------------------
MEGABLOCKS: EFFICIENT SPARSE TRAINING WITH MIXTURE-OF-EXPERTS

OUTRAGEOUSLY LARGE NEURAL NETWORKS:
THE SPARSELY-GATED MIXTURE-OF-EXPERTS LAYER

Github: MegaBlocks is a light-weight library for mixture-of-experts (MoE) training

#ai
#experts
#tutorialyoutube
Рекомендации по теме
Комментарии
Автор

Video implementation with MoE training with several swiching Lora layers would be great!

javiergimenezmoya
Автор

Hopefully this doesn’t sound entitled, but rather expresses my gratitude towards your excellent work - yesterday I did a YouTube search for MOE on this topic and saw several videos but decided not to watch others and rather wait for your analysis- and here I am today and this video enters my feed automatically :)

Thanks for all you do for your community!

TylerLali
Автор

What a great class! Very much appreciated 🙌👏👏🙏

HugoCatarino
Автор

Please create a video on Fine tuning a MoE LLM using LoRA adapters.
Can one train individual expert LLM within a MoE such as Mixtral 8x7B

suleimanshehu
Автор

Is this where I raise the obvious question of "wouldn't a Grokked(tm) model be the perfect fit for an Expert-Picking mechanism?"

TheDoomerBlox
Автор

Can you please share a link to your Presentation. Need to use the content to make my own abridged notes.

LNJP
Автор

very nice, thank you for a great vid.

darknessbelowth
Автор

Woah...thanks a lot for this clean and powerful explanation about this dense topics, as a representative of average people, I appreciate it so much.

patxigonzalez
Автор

In autoregressive model, the generation of the token is progressively. However, when will the router works? Is it in each pass or the routing will be decided at the very beginning ?

yinghaohu
Автор

00:02 Mixture of Experts LLM enables efficient computation and research allocation for AI models.
02:46 Mixture of Experts LLM uses different gating functions to assign tokens to specific expert systems.
05:24 Mega Blocks addressed limitations of classical MoE system and optimized block sparse computations.
08:12 Mixture of Experts selects the top K expert system based on scores.
10:59 Mixture of Experts LLM enhances model parameters without computational expense
13:33 Mixture of Experts LLM - MoE efficiently organizes student-teacher distribution
16:07 Block Spar formulation ensures no token is left behind
18:35 Mixture of Expert system dynamically adjusts block sizes for more efficiency in matrix multiplication
20:57 Mixture of expert layer consists of independent feed-forward experts with an intelligence gating functionality.

hoangvanhao
Автор

which PDF reader you are using to read the research paper?

YashNimavat-bs
Автор

Can you explain to me how to mix MoE with Lora adapters?

davidamberweatherspoon
Автор

Do you have a patreon or other paid subscription?

densonsmith