← Open Source
bytedance

flux

A fast communication-overlapping library for tensor/expert parallelism on GPUs.

Model DevelopmentLLM trainingC++
Open on GitHub
Momentum
+0stars in 24 hours0.0%
1.37k
Stars
118
Forks
+3
This week
9
Contributors
Created 2024-03-01 · Updated 2026-10-14 · #10533 today
Top developers
zheng-ningxinZSL98liwenchangbdbz

bytedance/flux is ranked 10,533 with 1,373 stars.

Same-category comparison

bytedance/flux is ranked 10,533 among these 8 peers; akamaster/pytorch_resnet_cifar10 is ranked 10,532.

Same-category comparison
NameRankMetrics
allenai/objaverse-xl10,524
Language:
Python
Stars:
1,375
Forks:
92
Description:
🪐 Objaverse-XL is a Universe of 10M+ 3D Objects. Contains API Scripts for Downloading and Processing.
bonlime/keras-deeplab-v3-plus10,526
Language:
Jupyter Notebook
Stars:
1,374
Forks:
419
Description:
Keras implementation of Deeplab v3+ with pretrained weights.
open-mmlab/mmfashion10,528
Language:
Python
Stars:
1,374
Forks:
297
Description:
Open-source toolbox for visual fashion analysis based on PyTorch.
akamaster/pytorch_resnet_cifar1010,532
Language:
Python
Stars:
1,373
Forks:
343
Description:
Proper implementation of ResNet-s for CIFAR10/100 in pytorch that matches description of the original paper.
sintel-dev/Orion10,535
Language:
Python
Stars:
1,373
Forks:
208
Description:
Unsupervised time series anomaly detection library.
TorchSSL/TorchSSL10,539
Language:
Python
Stars:
1,372
Forks:
185
Description:
A PyTorch-based library for semi-supervised learning (NeurIPS'21).
Cysu/open-reid10,542
Language:
Python
Stars:
1,371
Forks:
347
Description:
Open source person re-identification library in python.
andersbll/deeppy10,543
Language:
Python
Stars:
1,371
Forks:
298
Description:
Deep learning in Python.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageC++
CategoryModel Development
SubcategoryLLM training
KeywordsDistributed training
Stars1,373
Forks118
Contributors9
Created date2024-03-01
Updated date2026-10-14
Stars in 1 day0
Stars in 7 days3
Rank10,533
Previous rank10,529
Rank change-4
7-day stars rank6,954
Previous 7-day stars rank6,170
7-day stars rank change-784
Total stars rank8,702
Previous total stars rank8,691
Total stars rank change-11
CountryChina
README summary

You can get to know us better through the following channels👇 Flux: Fine-grained Computation-communication Overlapping GPU Kernel Library Flux is a communication-overlapping library for dense/MoE models on GPUs, providing high-performance and pluggable kernels to support various parallelisms in model training/inference. Flux's efficient kernels are compatible with Pytorch and can be integrated into existing frameworks easily, supporting various Nvidia GPU architectures and data types. News [2025/03/10]🔥We have released **COMET: Computation-communication Overlapping

for Mixture-of-Experts**. Getting started Install Flux either from source or from PyPI. Install from Source Install in a virtual environment Here is a snippet to install Flux in a virtual environment. Let's finish the installation in an virtual environment with CUDA 12. Then you would expect a wheel package under folder that is suitable for your virtual environment. Install from PyPI We also provide some pre-built wheels for Flux, and you can directly install with pip if

your wanted version is available. Currently we provide wheels for the following configurations: torch(2. Customized Installation Build options for source installation 1. If you are tired of the cmake process, you can set environment variable to 1 to skip cmake if already exists. If you want to build a wheel package, add to the build command. find the output wheel file under dist/ Dependencies Flux depends on and , which are located under , and , which you can install by pip

. NCCL: Managed by git submodule automatically. NVSHMEM: It's suggested that you install nvshmem by ; If you want to build nvshmem from source, you can download it from Flux is tested with nvshmem 3. CUTLASS: Flux leverages CUTLASS to generate high-performance GEMM kernels. 0 Quick Start Below are commands to run some basic demos once you have installed Flux successfully. You can check out the documentations for more details! For a more detailed usage on MoE kernels, please refer to

Flux MoE Usage. A minimal MoE layer can be implemented within only a few tens of lines of code using Flux! For some performance numbers, please refer to Performance Doc. To learn more about the design principles of Flux, please refer to Design Doc. License The Flux Project is under the Apache License v2. Citation If you use Flux in a scientific publication, we encourage you to add the following reference to the related papers: Reference ArXiv Paper (Flux) ArXiv

Paper (Comet) About ByteDance Seed Team Founded in 2023, ByteDance Seed Team is dedicated to crafting the industry's most advanced AI foundation models. The team aspires to become a world-class research team and make significant contributions to the advancement of science and society.

Frequently asked questions

How many stars and forks are recorded?

bytedance/flux has 1,373 stars and 118 forks.

What is the repository rank?

bytedance/flux is ranked 10,533.

What language and category are recorded?

bytedance/flux has 1,373 stars, uses C++ and belongs to Model Development.

Which repository is closest in rank?

bytedance/flux is compared with akamaster/pytorch_resnet_cifar10, ranked 10,532 with 1,373 stars.

README

👋 Hi, everyone!

We are ByteDance Seed team.

You can get to know us better through the following channels👇

Flux: Fine-grained Computation-communication Overlapping GPU Kernel Library

![](https://img.shields.io/badge/Flux-Project Page-yellow) ![](https://img.shields.io/badge/Flux-Tech Report-red)

![](https://img.shields.io/badge/Flux-Wechat Communication Group-07C160)

Flux is a communication-overlapping library for dense/MoE models on GPUs, providing high-performance and pluggable kernels to support various parallelisms in model training/inference.

Flux's efficient kernels are compatible with Pytorch and can be integrated into existing frameworks easily, supporting various Nvidia GPU architectures and data types.

News

[2025/03/10]🔥We have released COMET: Computation-communication Overlapping for Mixture-of-Experts.

Getting started

Install Flux either from source or from PyPI.

Install from Source

git clone --recursive https://github.com/bytedance/flux.git && cd flux

# For Ampere(sm80) GPU
./build.sh --arch 80 --nvshmem
# For Ada Lovelace(sm89) GPU
./build.sh --arch 89 --nvshmem
# For Hopper(sm90) GPU
./build.sh --arch 90 --nvshmem

Install in a virtual environment

Here is a snippet to install Flux in a virtual environment. Let's finish the installation in an virtual environment with CUDA 12.4, torch 2.6.0 and python 3.11.

conda create -n flux python=3.11
conda activate flux
pip3 install packaging
pip3 install ninja
pip3 install torch==2.6.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

./build.sh --clean-all
./build.sh --arch "80;89;90" --nvshmem --package

Then you would expect a wheel package under dist/ folder that is suitable for your virtual environment.

Install from PyPI

We also provide some pre-built wheels for Flux, and you can directly install with pip if your wanted version is available. Currently we provide wheels for the following configurations: torch(2.4.0, 2.5.0, 2.6.0), python(3.10, 3.11), cuda(12.4).

# Make sure that PyTorch is installed.
pip install byte-flux

Customized Installation

Build options for source installation

  1. Add --nvshmem to build Flux with NVSHMEM support. It is essential for the MoE kernels.
  2. If you are tired of the cmake process, you can set environment variable FLUX_BUILD_SKIP_CMAKE to 1 to skip cmake if build/CMakeCache.txt already exists.
  3. If you want to build a wheel package, add --package to the build command. find the output wheel file under dist/

Dependencies

Flux depends on NCCL and CUTLASS, which are located under 3rdparty/, and NVSHMEM, which you can install by pip.

  1. NCCL: Managed by git submodule automatically.
  2. NVSHMEM: It's suggested that you install nvshmem by pip install nvidia-nvshmem-cu12; If you want to build nvshmem from source, you can download it from https://developer.nvidia.com/nvshmem. Flux is tested with nvshmem 3.2.5/3.3.9
  3. CUTLASS: Flux leverages CUTLASS to generate high-performance GEMM kernels. We currently use CUTLASS 4.0.0

Quick Start

Below are commands to run some basic demos once you have installed Flux successfully.

# gemm only
python3 test/python/gemm_only/test_gemm_only.py 4096 12288 6144 --dtype=float16

# all-gather fused with gemm (dense MLP layer0)
./launch.sh test/python/ag_gemm/test_ag_kernel.py 4096 49152 12288 --dtype=float16 --iters=10

# gemm fused with reduce-scatter (dense MLP layer1)
./launch.sh test/python/gemm_rs/test_gemm_rs.py 4096 12288 49152 --dtype=float16 --iters=10

# all-gather fused with grouped gemm (MoE MLP layer0)
./launch.sh test/python/moe_ag_scatter/test_moe_ag.py

# grouped gemm fused with reduce-scatter (MoE MLP layer1)
./launch.sh test/python/moe_gather_rs/test_moe_gather_rs.py

You can check out the documentations for more details!

  • For a more detailed usage on MoE kernels, please refer to Flux MoE Usage. Try some examples as a quick start. A minimal MoE layer can be implemented within only a few tens of lines of code using Flux!
  • For some performance numbers, please refer to Performance Doc.
  • To learn more about the design principles of Flux, please refer to Design Doc.

License

The Flux Project is under the Apache License v2.0.

Citation

If you use Flux in a scientific publication, we encourage you to add the following reference to the related papers:

@misc{chang2024flux,
      title={FLUX: Fast Software-based Communication Overlap On GPUs Through Kernel Fusion},
      author={Li-Wen Chang and Wenlei Bao and Qi Hou and Chengquan Jiang and Ningxin Zheng and Yinmin Zhong and Xuanrun Zhang and Zuquan Song and Ziheng Jiang and Haibin Lin and Xin Jin and Xin Liu},
      year={2024},
      eprint={2406.06858},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

@misc{zhang2025comet,
      title={Comet: Fine-grained Computation-communication Overlapping for Mixture-of-Experts},
      author={Shulai Zhang, Ningxin Zheng, Haibin Lin, Ziheng Jiang, Wenlei Bao, Chengquan Jiang, Qi Hou, Weihao Cui, Size Zheng, Li-Wen Chang, Quan Chen and Xin Liu},
      year={2025},
      eprint={2502.19811},
      archivePrefix={arXiv},
      primaryClass={cs.DC}
}

Reference

About ByteDance Seed Team

Founded in 2023, ByteDance Seed Team is dedicated to crafting the industry's most advanced AI foundation models. The team aspires to become a world-class research team and make significant contributions to the advancement of science and society.

Nearby in the ranking
Similar items