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 # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/megablocks", version=1) - Notebooks
- Google Colab
- Kaggle
Download csrc/new_indices.h from replicate/megablocks: direct link, hf CLI and curl.
- Browser
- Download file 336 Bytes
-
https://huggingface.co/replicate/megablocks/resolve/main/csrc/new_indices.h
- Command line
-
hf download hf://replicate/megablocks/csrc/new_indices.h
-
curl -L -o new_indices.h https://huggingface.co/replicate/megablocks/resolve/main/csrc/new_indices.h
336 Bytes
| namespace megablocks { | |
| // Public interface function for constructing indices from padded bins | |
| void indices(torch::Tensor padded_bins, | |
| int block_size, | |
| int output_block_rows, | |
| int output_block_columns, | |
| torch::Tensor out); | |
| } // namespace megablocks |