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: 585 Bytes
1bfc3f0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | """Arbitrary-horizon frontend bound to one ActionCodec2 action space."""
from transformers import AutoConfig, AutoProcessor
from ...backends.actioncodec2.hf import ActionCodec2FrontendHFConfig
from .generation import ActionCodec2LogitsProcessor
from .processor import ActionCodec2
from .tokenizer import ActionCodec2Tokenizer
AutoConfig.register(ActionCodec2.model_type, ActionCodec2FrontendHFConfig, exist_ok=True)
AutoProcessor.register(ActionCodec2FrontendHFConfig, ActionCodec2, exist_ok=True)
__all__ = ["ActionCodec2", "ActionCodec2Tokenizer", "ActionCodec2LogitsProcessor"]
|