# databricks/megablocks

Repository: https://github.com/databricks/megablocks
Canonical: https://ross.abutalabs.com/products/megablocks
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-03-25T04:53:14+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 28, longevity 94
- inputs: {"age_days": 1316, "days_push": 161, "days_rel": 460, "gap_med": 51, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1588, forks 231 (observed 2026-08-28T04:05:07.952057+00:00)

## What it is
MegaBlocks is a lightweight Python library for efficient training of mixture-of-experts (MoE) models, built around its dropless-MoE (dMoE) layers implemented with block-sparse operations. It integrates with Megatron-LM for data, expert, and pipeline parallel training and can also be used with frameworks like vLLM.

## Use cases
- train mixture-of-experts language models efficiently
- avoid token dropping in MoE training without capacity_factor tuning
- accelerate transformer training with dropless MoE layers
- run distributed MoE training with Megatron-LM
- serve Mixtral-8x7B with vLLM using dMoE kernels
- use grouped GEMM MoE kernels on Hopper GPUs

## When to choose
- you are training MoE transformer models in PyTorch and want high throughput without token dropping
- you already use Megatron-LM and want expert/data/pipeline parallel MoE support
- you need efficient block-sparse or grouped GEMM MoE kernels on NVIDIA GPUs

## When to avoid
- you only need MoE inference without training
- you are not working with GPU-accelerated PyTorch training
- you need a general-purpose deep learning framework rather than MoE-specific layers

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-training, gpu-computing
- domain: machine-learning, deep-learning, large-language-models
- platform: python
- tags: mixture-of-experts, moe, dropless-moe, block-sparse, megatron-lm, pytorch, distributed-training, gpu, docker, linux

## Member repositories
- databricks/megablocks (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.952057+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:55:00.343168+00:00, confidence not recorded.
  - readme: https://github.com/databricks/megablocks (fetched 2026-08-28T04:05:07.952057+00:00, sha 04272de1f007)
  - registry_pypi: https://pypi.org/pypi/megablocks/json (fetched 2026-08-29T11:25:42.571678+00:00, sha d0f96192d8bb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
