Instructions to use replicate/mrope_get_position_ids with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/mrope_get_position_ids with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("replicate/mrope_get_position_ids") - Notebooks
- Google Colab
- Kaggle
Download torch-ext/torch_binding.cpp from replicate/mrope_get_position_ids: direct link, hf CLI and curl.
- Browser
- Download file 343 Bytes
-
https://huggingface.co/replicate/mrope_get_position_ids/resolve/main/torch-ext/torch_binding.cpp
- Command line
-
hf download hf://replicate/mrope_get_position_ids/torch-ext/torch_binding.cpp
-
curl -L -o torch_binding.cpp https://huggingface.co/replicate/mrope_get_position_ids/resolve/main/torch-ext/torch_binding.cpp
343 Bytes
| TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) { | |
| ops.def("get_position_ids(Tensor out, Tensor input_ids, Tensor " | |
| "image_grid_thw) -> ()"); | |
| ops.impl("get_position_ids", torch::kCUDA, &get_position_ids); | |
| } | |
| REGISTER_EXTENSION(TORCH_EXTENSION_NAME) | |