Instructions to use replicate/sonic-moe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/sonic-moe 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/sonic-moe", version=1) - Notebooks
- Google Colab
- Kaggle
Download build/torch-cuda/__init__.py from replicate/sonic-moe: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/replicate/sonic-moe/resolve/main/build/torch-cuda/__init__.py
- Command line
-
hf download hf://replicate/sonic-moe/build/torch-cuda/__init__.py
-
curl -L -o __init__.py https://huggingface.co/replicate/sonic-moe/resolve/main/build/torch-cuda/__init__.py
530 Bytes
| # ******************************************************************************** | |
| # Copyright (c) 2025, Wentao Guo, Mayank Mishra, Xinle Cheng, Ion Stoica, Tri Dao | |
| # ******************************************************************************** | |
| __version__ = "0.1.2.post1" | |
| from .enums import KernelBackendMoE | |
| from .functional import moe_general_routing_inputs, moe_TC_softmax_topk_layer | |
| from .moe import MoE | |
| __all__ = [ | |
| "KernelBackendMoE", | |
| "MoE", | |
| "moe_general_routing_inputs", | |
| "moe_TC_softmax_topk_layer", | |
| ] | |