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 tests/fixtures/fixtures.py from replicate/megablocks: direct link, hf CLI and curl.
- Browser
- Download file 329 Bytes
-
https://huggingface.co/replicate/megablocks/resolve/main/tests/fixtures/fixtures.py
- Command line
-
hf download hf://replicate/megablocks/tests/fixtures/fixtures.py
-
curl -L -o fixtures.py https://huggingface.co/replicate/megablocks/resolve/main/tests/fixtures/fixtures.py
329 Bytes
| # Copyright 2024 Databricks | |
| # SPDX-License-Identifier: Apache-2.0 | |
| import pytest | |
| from tests.conftest import _get_option | |
| def rank_zero_seed(pytestconfig: pytest.Config) -> int: | |
| """Read the rank_zero_seed from the CLI option.""" | |
| seed = _get_option(pytestconfig, 'seed', default='0') | |
| return int(seed) | |