Skip to main content
Log in

Python module

hf_utils

Utilities for interacting with HuggingFace Files/Repos.

HuggingFaceFile

class max.pipelines.hf_utils.HuggingFaceFile(repo_id: str, filename: str)

A simple object for tracking huggingface model metadata. The repo_id will frequently be used to load a tokenizer, whereas the filename is used to download model weights.

download()

download(force_download: bool = False) → Path

Download the file and return the file path where the data is saved locally.

exists()

exists() → bool

filename

filename*: str*

repo_id

repo_id*: str*

size()

size() → int | None