Instructions to use replicate/megablocks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/megablocks with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("replicate/megablocks") - Notebooks
- Google Colab
- Kaggle
Download csrc/new_sort.h from replicate/megablocks: direct link, hf CLI and curl.
- Browser
- Download file 264 Bytes
-
https://huggingface.co/replicate/megablocks/resolve/main/csrc/new_sort.h
- Command line
-
hf download hf://replicate/megablocks/csrc/new_sort.h
-
curl -L -o new_sort.h https://huggingface.co/replicate/megablocks/resolve/main/csrc/new_sort.h
264 Bytes
| namespace megablocks { | |
| // Public interface function for radix sorting with indices | |
| void sort(torch::Tensor x, | |
| int end_bit, | |
| torch::Tensor x_out, | |
| torch::Tensor iota_out); | |
| } // namespace megablocks |