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/_dynamo/hooks.py from jonl521/modeling_simple: direct link, hf CLI and curl.
- Browser
- Download file 867 Bytes
-
https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/torch/_dynamo/hooks.py
- Command line
-
hf download hf://jonl521/modeling_simple/.venv/lib/python3.14/site-packages/torch/_dynamo/hooks.py
-
curl -L -o hooks.py https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/torch/_dynamo/hooks.py
867 Bytes
| """Hook system for Dynamo's guard functionality. | |
| This module provides a way to register callback functions that are triggered during | |
| guard-related operations. | |
| The Hooks class manages two types of hook functions: | |
| - guard_export_fn: Called when guards need to be exported, taking a GuardsSet as input | |
| - guard_fail_fn: Called when a guard check fails, taking a GuardFail object as input | |
| These hooks enable customization of guard export and failure handling behaviors. | |
| """ | |
| import dataclasses | |
| from typing import Callable, Optional | |
| from torch._guards import GuardsSet | |
| from .types import GuardFail, GuardFilterEntry | |
| class Hooks: | |
| guard_export_fn: Optional[Callable[[GuardsSet], None]] = None | |
| guard_fail_fn: Optional[Callable[[GuardFail], None]] = None | |
| guard_filter_fn: Optional[Callable[[list[GuardFilterEntry]], list[bool]]] = None | |