Instructions to use ZibinDong/ActionCodec2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZibinDong/ActionCodec2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZibinDong/ActionCodec2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download setup.py from ZibinDong/ActionCodec2: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/ZibinDong/ActionCodec2/resolve/main/setup.py
- Command line
-
hf download hf://ZibinDong/ActionCodec2/setup.py
-
curl -L -o setup.py https://huggingface.co/ZibinDong/ActionCodec2/resolve/main/setup.py
660 Bytes
| import sys | |
| from setuptools import setup | |
| from pybind11.setup_helpers import Pybind11Extension, build_ext | |
| from pathlib import Path | |
| native = 'actioncodec2_kernels' | |
| openmp = ['-fopenmp'] if sys.platform.startswith('linux') else [] | |
| setup(name='actioncodec2-kernels', version='0.1.0', packages=['actioncodec2_kernels'], | |
| ext_modules=[Pybind11Extension('actioncodec2_kernels._native', | |
| sources=sorted(str(p) for p in Path(native).glob('*.cpp')), | |
| include_dirs=[native], cxx_std=17, | |
| extra_compile_args=['-O3', '-fvisibility=hidden', '-ffp-contract=off', *openmp], | |
| extra_link_args=openmp)], cmdclass={'build_ext': build_ext}) | |