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
File size: 343 Bytes
e52d1ec | 1 2 3 4 5 6 7 8 9 10 11 12 | #include "torch_binding.h"
#include "registration.h"
#include <torch/library.h>
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)
|