Instructions to use marcsun13/topk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use marcsun13/topk 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("marcsun13/topk", version=1) - Notebooks
- Google Colab
- Kaggle
Download CARD.md from marcsun13/topk: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/marcsun13/topk/resolve/main/CARD.md
- Command line
-
hf download hf://marcsun13/topk/CARD.md
-
curl -L -o CARD.md https://huggingface.co/marcsun13/topk/resolve/main/CARD.md
library_name: kernels {% if license %}license: {{ license }} {% endif %}---
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the kernels library. This card was automatically generated.
How to use
{% if functions %}
# make sure `kernels` is installed: `pip install -U kernels`
from kernels import get_kernel
kernel_module = get_kernel("{{ repo_id }}", version={{ version }})
{{ functions[0] }} = kernel_module.{{ functions[0] }}
{{ functions[0] }}(...)
{% else %}
Usage example not available. {% endif %}
Available functions
{% if functions %} {% for func in functions %}
{{ func }}{% endfor %} {% else %}
Function list not available. {% endif %} {% if layers %}
Available layers
{% for layer in layers %}
{{ layer }}{% endfor %} {% endif %}
Benchmarks
{% if has_benchmark %}
Benchmarking script is available for this kernel. Run kernels benchmark {{ repo_id }} --version {{ version }}.
{% else %}
No benchmark available yet. {% endif %} {% if upstream %}
Source code
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with kernels.
{% endif %}