MoE (Mixture of Experts) — sparse transformer architecture: вместо monolithic FFN, модель содержит много expert networks + router, который выбирает top-k experts для каждого token. Total params huge (1.8T), но active per-token меньше (400B). Inference cost sub-linear к total size. Public MoE models: Mixtral 8x7B (47B total, 13B active), DeepSeek R1 (671B, ~37B active), GPT-4 suspected MoE.
Ниже: подробности, пример, смежные термины, FAQ.
# Run Mixtral 8x7B via Ollama (quantized)
$ ollama pull mixtral:8x7b
$ ollama run mixtral:8x7b "What is MoE?"
# Python with transformers
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained('mistralai/Mixtral-8x7B-Instruct-v0.1')
# 47B total params, but only 13B 'active' при inferenceПозволяет scale parameters дешево (inference cost ~ active params). Frontier models 2025+ — почти все MoE (GPT-4, Claude 3.5, Gemini, DeepSeek R1).
Сложнее чем dense. LoRA на router + experts отдельно. Requires more data.
Нужно memory для total params (все experts грузятся). Mixtral 8x7B → 47B × 2 bytes FP16 = 94 GB. INT4 quant → ~26 GB.