Instructions to use replicate/yoso with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/yoso with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/yoso", version=1) - Notebooks
- Google Colab
- Kaggle
Download torch-ext/torch_binding.h from replicate/yoso: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/replicate/yoso/resolve/main/torch-ext/torch_binding.h
- Command line
-
hf download hf://replicate/yoso/torch-ext/torch_binding.h
-
curl -L -o torch_binding.h https://huggingface.co/replicate/yoso/resolve/main/torch-ext/torch_binding.h
1.31 kB
| at::Tensor lsh_cumulation( | |
| at::Tensor query_mask, // [batch_size, num_query] | |
| at::Tensor query_hash_code, // [batch_size, num_query, num_hash_f] | |
| at::Tensor key_mask, // [batch_size, num_key] | |
| at::Tensor key_hash_code, // [batch_size, num_key, num_hash_f] | |
| at::Tensor value, // [batch_size, num_key, value_dim] | |
| int hashtable_capacity, | |
| bool use_cuda, | |
| int version | |
| ); | |
| std::vector<at::Tensor> fast_hash( | |
| at::Tensor query_mask, | |
| at::Tensor query_vector, | |
| at::Tensor key_mask, | |
| at::Tensor key_vector, | |
| int num_hash_f, | |
| int hash_code_len, | |
| bool use_cuda, | |
| int version | |
| ); | |
| at::Tensor lsh_weighted_cumulation( | |
| at::Tensor query_mask, // [batch_size, num_query] | |
| at::Tensor query_hash_code, // [batch_size, num_query, num_hash_f] | |
| at::Tensor query_weight, // [batch_size, num_query, weight_dim] | |
| at::Tensor key_mask, // [batch_size, num_key] | |
| at::Tensor key_hash_code, // [batch_size, num_key, num_hash_f] | |
| at::Tensor key_weight, // [batch_size, num_key, weight_dim] | |
| at::Tensor value, // [batch_size, num_key, value_dim] | |
| int hashtable_capacity, | |
| bool use_cuda, | |
| int version | |
| ); |