Instructions to use jonl521/modeling_simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jonl521/modeling_simple with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jonl521/modeling_simple", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download .venv/lib/python3.14/site-packages/torch/fx/_compatibility.py from jonl521/modeling_simple: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/torch/fx/_compatibility.py
- Command line
-
hf download hf://jonl521/modeling_simple/.venv/lib/python3.14/site-packages/torch/fx/_compatibility.py
-
curl -L -o _compatibility.py https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/torch/fx/_compatibility.py
1.08 kB
| import textwrap | |
| from typing import Any, Callable, TypeVar | |
| _BACK_COMPAT_OBJECTS: dict[Any, None] = {} | |
| _MARKED_WITH_COMPATIBILITY: dict[Any, None] = {} | |
| _T = TypeVar("_T") | |
| def compatibility(is_backward_compatible: bool) -> Callable[[_T], _T]: | |
| if is_backward_compatible: | |
| def mark_back_compat(fn: _T) -> _T: | |
| docstring = textwrap.dedent(getattr(fn, "__doc__", None) or "") | |
| docstring += """ | |
| .. note:: | |
| Backwards-compatibility for this API is guaranteed. | |
| """ | |
| fn.__doc__ = docstring | |
| _BACK_COMPAT_OBJECTS.setdefault(fn) | |
| _MARKED_WITH_COMPATIBILITY.setdefault(fn) | |
| return fn | |
| return mark_back_compat | |
| else: | |
| def mark_not_back_compat(fn: _T) -> _T: | |
| docstring = textwrap.dedent(getattr(fn, "__doc__", None) or "") | |
| docstring += """ | |
| .. warning:: | |
| This API is experimental and is *NOT* backward-compatible. | |
| """ | |
| fn.__doc__ = docstring | |
| _MARKED_WITH_COMPATIBILITY.setdefault(fn) | |
| return fn | |
| return mark_not_back_compat | |