Skip to main content

Crate zsfm_hub

Crate zsfm_hub 

Source

Structs§

DownloadedRepo
ModelFiles
Paths to all local files needed for conversion.

Constants§

FORMAT_PRIORITY
Checkpoint file extensions this tool knows how to read, in the order preferred when a repo ships more than one format and the caller doesn’t request a specific one.

Functions§

canonical_gguf_path
Where the canonical, always-F32 GGUF for repo_id lives once converted once. Every per-model convert command checks this path first: if present, it recasts straight from this cached GGUF to whatever dtype was requested instead of re-downloading and re-converting from HuggingFace.
download_any_format
Download a repo’s checkpoint in whatever format it’s stored in (or a specific one, if format is given). Resolves HF’s standard sharding indices for safetensors and bin; for every other format, if more than one file matches, file_filter (a case-insensitive substring) is required to pick which ones — this avoids silently pulling every alternative quantization/variant of a multi-GB checkpoint.
download_file
Download (or locate from cache) a single arbitrary file from repo_id, resuming a partial download if one exists. For models that don’t fit the config.json + model.safetensors shape — e.g. Lag-Llama’s raw PyTorch Lightning .ckpt checkpoint.
download_model
Download (or locate from cache) config.json + model.safetensors[.index.json] for repo_id into model_dir.
download_model_prefixed
Same as download_model, but every remote path is joined under prefix first.
list_repo_files
List every file path in a repo at revision (default branch: "main").
upload_repo