Instructions to use kernels-community/scattermoe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/scattermoe with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/scattermoe") - Notebooks
- Google Colab
- Kaggle
Build uploaded using `kernels`.
Browse files
build/torch-cuda/_ops.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import torch
|
| 2 |
-
ops = torch.ops.
|
| 3 |
|
| 4 |
def add_op_namespace_prefix(op_name: str):
|
| 5 |
"""
|
| 6 |
Prefix op by namespace.
|
| 7 |
"""
|
| 8 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
ops = torch.ops._scattermoe_441f3e5
|
| 3 |
|
| 4 |
def add_op_namespace_prefix(op_name: str):
|
| 5 |
"""
|
| 6 |
Prefix op by namespace.
|
| 7 |
"""
|
| 8 |
+
return f"_scattermoe_441f3e5::{op_name}"
|
build/torch-cuda/metadata.json
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"version": 1,
|
| 3 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"version": 1,
|
| 3 |
+
"license": "Apache-2.0",
|
| 4 |
+
"python-depends": [],
|
| 5 |
+
"backend": {
|
| 6 |
+
"type": "cuda"
|
| 7 |
+
}
|
| 8 |
}
|
build/torch-cuda/scattermoe/__init__.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import ctypes
|
|
|
|
| 2 |
import sys
|
| 3 |
-
|
| 4 |
-
import importlib
|
| 5 |
from pathlib import Path
|
| 6 |
from types import ModuleType
|
| 7 |
|
|
|
|
| 8 |
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
# it would also be used for other imports. So, we make a module name that
|
|
|
|
| 1 |
import ctypes
|
| 2 |
+
import importlib.util
|
| 3 |
import sys
|
|
|
|
|
|
|
| 4 |
from pathlib import Path
|
| 5 |
from types import ModuleType
|
| 6 |
|
| 7 |
+
|
| 8 |
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
# it would also be used for other imports. So, we make a module name that
|