CoolFace
Modelpublic

replicate/megablocks

sourceHugging Faceapache-2.0updated 22d agoView on Hugging Face
0likes122downloads
README.md47 linesDownload Raw Back to root
1---2library_name: kernels3license: apache-2.04---5 6> [!CAUTION]7> Starting from September 13, 2026, we will be removing the "model" type repositories of kernels (e.g., kernels-community/flash-attn3). Make sure you're using a latest version of kernels. If you face any disruption, please report them here: https://github.com/huggingface/kernels/issues/new.8 9This is the repository card of kernels-community/megablocks that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.10 11## How to use12 13```python14# make sure `kernels` is installed: `pip install -U kernels`15from kernels import get_kernel16 17kernel_module = get_kernel("kernels-community/megablocks")18MyReplacementLayer = kernel_module.MyReplacementLayer19 20MyReplacementLayer(...)21```22 23## Available functions24- `MyReplacementLayer`25- `exclusive_cumsum`26- `inclusive_cumsum`27- `histogram`28- `indices`29- `replicate_forward`30- `replicate_backward`31- `sort`32- `cumsum`33- `argsort`34- `Arguments`35- `ParallelDroplessMLP`36- `dMoE`37- `SparseGLU`38- `MLP`39- `SparseMLP`40- `MoE`41- `ParallelMLP`42- `get_load_balancing_loss`43 44## Benchmarks45 46Benchmarking script is available for this kernel. Run `kernels benchmark kernels-community/megablocks`.47