Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 9 min read Research hardMaster

Your Experts Have Partners. There's HOPE for Keeping Them Together

HOPE (Higher-Order Pruning of Experts) is a second-order expert-pruning method for Mixture-of-Experts LLMs that accounts for pairwise co-activation between experts, where earlier methods score each expert independently. It builds an interaction matrix F from gate-weighted output norms over a calibration pass and selects the prune-set by solving a binary quadratic program via continuous relaxation, which takes 1–2 seconds per layer. The diagonal of F recovers REAP's rankings (Spearman 0.988), so HOPE's gains come from the off-diagonal cooperation terms. Across Qwen3.5 and GLM-4.5-Air models, HOPE posts the best average rank and pulls further ahead at 50% pruning, matching the unpruned Qwen3.5-35B on SWE-Bench Pro (42.3 vs 41.8) while REAP drops to 36.2. The authors ship an open-source calibrate/solve/prune tool that outputs standard HuggingFace checkpoints, and they note that gains shrink at 10–20% pruning and that cross-layer interactions are not modeled.

Assumes: Mixture-of-Experts routingtransformer LLM architecturequadratic programming basicsmodel pruning

Related posts

  • Mixture of Experts (MoEs) in Transformers

    Hugging Face hardMaster

    Hugging Face transformers v5 reworks its internals to treat Mixture of Experts models as first-class: a WeightConverter pipeline packs per-expert checkpoint tensors into contiguous runtime tensors with async, lazy materialization, cutting Qwen1.5-110B load time from ~66s to ~21s (10s with tensor parallelism) on an A100. A pluggable Experts Backend dispatches tokens via eager, batched_mm (torch.bmm) or grouped_mm (torch._grouped_mm) strategies, suited respectively to debugging, small-batch and large-batch/memory-constrained workloads. Expert parallelism shards experts across GPUs with a single config flag, and a collaboration with Unsloth using Triton grouped-GEMM + LoRA kernels yields ~12× faster MoE training with >35% less VRAM.

  • Mixture of Experts Explained

    Hugging Face hardMaster

    Mixture of Experts (MoE) transformers replace dense feed-forward layers with sparse expert layers and a learned router that sends each token to only a few experts. Pretraining is much faster than for dense models, and inference is faster than a dense model with the same parameter count, but all experts must sit in memory: Mixtral 8x7B needs VRAM for about 47B parameters while computing like a 12B model. The history runs from the 1991 origins through Shazeer's noisy top-k gating, GShard's expert capacity and random routing, and Switch Transformers' single-expert routing and selective bfloat16 precision. It also covers load-balancing auxiliary losses, router z-loss, fine-tuning difficulties, expert parallelism and serving tradeoffs.

  • Welcome Mixtral - a SOTA Mixture of Experts on Hugging Face

    Hugging Face mediumAdept

    Mixtral 8x7B is Mistral's sparse Mixture-of-Experts LLM. It replaces feed-forward layers with MoE layers that route each token to 2 of 8 experts, so it has about 45B total parameters but decodes at roughly the speed of a 12B dense model. On release it beat Llama 2 70B on the Open LLM Leaderboard and matched GPT-3.5 on MT-Bench (8.30), under an Apache 2.0 license. Hugging Face shipped integrations for running it with Transformers and Text Generation Inference, plus QLoRA fine-tuning with TRL on one A100 (attention projections only, since sparse MLP layers interact poorly with PEFT). For quantization, VRAM needs are about 90 GB in fp16 and about 23 GB in 4-bit, and GPTQ performs better when the expert gating layers are left unquantized (perplexity 4.40 vs 4.25 in fp16).

  • Together AI expands fine-tuning service with more models, live metrics, and finer controls

    Together AI mediumAdept

    Together Fine-Tuning adds support for new open-weight models (GLM-5.3, Kimi K2.7, Qwen 3.5/3.6/3.8, Gemma 4, DeepSeek-V4-Flash), live per-step metrics via API, CLI and dashboard, and new training controls. These include LoRA on MoE expert layers, early stopping with refunds, and gradient accumulation for arbitrary batch sizes. In an invented-facts test, expert-layer LoRA recalled up to 89% of new knowledge versus 15% for attention-only adapters, and it kept routed experts from falling out of use. Data tooling adds tokenized dataset previews, per-example sample weights, pre-flight JSONL validation and packing controls, alongside price cuts of 30–70%.

  • Introducing the Open Chain of Thought Leaderboard

    Hugging Face mediumAdept

    The Open CoT Leaderboard ranks LLMs by the accuracy gain from chain-of-thought prompting (accuracy with CoT minus loglikelihood accuracy without it) rather than by absolute accuracy, which makes it more robust to training-data contamination. Models are evaluated on LogiQA and LSAT multiple-choice reasoning tasks using six CoT generation regimes: two prompting strategies (Classic "think step by step" and Reflect) crossed with greedy, beam search and sampling decoding, and the best gain across regimes is reported. Early results across 30 models show small 7B models like Phi-2 can gain more from CoT than larger ones such as Mixtral, and instruction/chat finetuning improves both baseline accuracy and CoT gains. No single regime is best for every model and task, and CoT sometimes reduces accuracy.

The quest for software engineering knowledge.

Look:
Layout: