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
File size: 660 Bytes
1bfc3f0 895e804 1bfc3f0 ce32ca3 1bfc3f0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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})
|