Metadata-Version: 2.1
Name: hf-model-downloader
Version: 0.0.1
Summary: HuggingFace model downloader
Home-page: https://github.com/muellerzr/hf-downloader
Author: Zach Mueller
Author-email: muellerzr@gmail.com
License: Apache
Keywords: deep learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
License-File: LICENSE

# hf-model-downloader

## Install

`pip install hf-model-downloader`

`pip install git+https://github.com/muellerzr/hf-model-downloader`

## What is it?

An easy way to download models quickly from huggingface.co with specified backends to specific directories. 

While on its own you can pass in `--local_dir` when using the `huggingface_hub` CLI, many libraries (such as all of the `meta-llama` models) come with two sets
of weights in the repo, `original` and `safetensor` varients *in the same branch*. As a result, this can bloat our downloads when we don't need them.

`hf-downloader` solves this by making it easier to download weights to wherever you want, specifying the weight revision you need (and then will also download the relevant config files, etc)

As this is a wrapper around the `huggingface_hub` CLI, tokens can be passed in via `--token` or by using `huggingface-cli login` (recommended)


### Examples with `meta-llama/Meta-Llama-3.1-8B-Instruct`


**Downloading the `.safetensors` version** (default)
```bash
download-model --backend safetensors meta-llama/Meta-Llama-3.1-8B-Instruct 
```

**Downloading the `.pth` version**
```bash
hf-downloader --backend torch meta-llama/Meta-Llama-3.1-8B-Instruct 
```

**Downloading to a specific directory**
```bash
hf-downloader --local-dir my_llama meta-llama/Meta-Llama-3.1-8B-Instruct 
```

**Using `hf_transfer` for faster downloads**
```bash
hf-downloader --fast meta-llama/Meta-Llama-3.1-8B-Instruct
```
