_download_model() — pytorch Function Reference
Architecture documentation for the _download_model() function in huggingface.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 2c3d93c7_6719_b38f_a928_3d268c212537["_download_model()"] f731aa1a_ba23_ab06_f8e5_e87d6a842749["load_model()"] f731aa1a_ba23_ab06_f8e5_e87d6a842749 -->|calls| 2c3d93c7_6719_b38f_a928_3d268c212537 121584aa_ef62_fff7_1d2f_03dd864e80c3["_get_model_cls_and_config()"] 2c3d93c7_6719_b38f_a928_3d268c212537 -->|calls| 121584aa_ef62_fff7_1d2f_03dd864e80c3 style 2c3d93c7_6719_b38f_a928_3d268c212537 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/huggingface.py lines 401–408
def _download_model(self, model_name):
model_cls, config = self._get_model_cls_and_config(model_name)
if "auto" in model_cls.__module__:
# Handle auto classes
model = model_cls.from_config(config)
else:
model = model_cls(config)
return model
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _download_model() do?
_download_model() is a function in the pytorch codebase.
What does _download_model() call?
_download_model() calls 1 function(s): _get_model_cls_and_config.
What calls _download_model()?
_download_model() is called by 1 function(s): load_model.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free