You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: `resolveModelFile` method
* feat: `hf:` URI support
* fix: improve GGUF metadata read times
* fix: hide internal type
* docs: document the `hf:` URI
> If the model file URL is of a single part of a multi-part model (for example, [this model](https://huggingface.co/bartowski/Meta-Llama-3-70B-Instruct-GGUF/blob/main/Meta-Llama-3-70B-Instruct-Q5_K_L.gguf/Meta-Llama-3-70B-Instruct-Q5_K_L-00001-of-00002.gguf)),
166
166
> it will also download all the other parts as well into the same directory.
167
+
168
+
::: tip
169
+
Consider using [model URIs](./downloading-models.md#model-uris) to download and load models.
If a corresponding model file is not found in the given directory, the model will automatically be downloaded.
110
+
111
+
When a file is being downloaded, the download progress is shown in the console by default.
112
+
<br/>
113
+
Set the [`cli`](../api/type-aliases/ResolveModelFileOptions#cli) option to `false` to disable this behavior.
114
+
:::
115
+
72
116
## Downloading Gated Models From Hugging Face {#hf-token}
73
117
Some models on Hugging Face are "gated", meaning they require a manual consent from you before you can download them.
74
118
75
119
To download such models, after completing the consent form on the model card, you need to create a [Hugging Face token](https://huggingface.co/docs/hub/en/security-tokens) and set it in one of the following locations:
76
120
* Set an environment variable called `HF_TOKEN` the token
77
121
* Set the `~/.cache/huggingface/token` file content to the token
78
122
79
-
Now, using the CLI or the [`createModelDownloader`](../api/functions/createModelDownloader.md) method will automatically use the token to download gated models.
123
+
Now, using the CLI, the [`createModelDownloader`](../api/functions/createModelDownloader.md) method,
124
+
or the [`resolveModelFile`](../api/functions/resolveModelFile.md) method will automatically use the token to download gated models.
80
125
81
-
Alternatively, you can use the token in the [`tokens`](../api/type-aliases/ModelDownloaderOptions.md#tokens) option when using [`createModelDownloader`](../api/functions/createModelDownloader.md).
126
+
Alternatively, you can use the token in the [`tokens`](../api/type-aliases/ModelDownloaderOptions.md#tokens) option when using [`createModelDownloader`](../api/functions/createModelDownloader.md) or [`resolveModelFile`](../api/functions/resolveModelFile.md).
82
127
83
128
## Inspecting Remote Models
84
129
You can inspect the metadata of a remote model without downloading it by either using the [`inspect gguf` command](../cli/inspect/gguf.md) with a URL,
We recommend you to get a GGUF model from either [Michael Radermacher on Hugging Face](https://huggingface.co/mradermacher) or [search HuggingFace directly](https://huggingface.co/models?library=gguf) for a GGUF model.
54
+
We recommend getting a GGUF model from either [Michael Radermacher on Hugging Face](https://huggingface.co/mradermacher) or by [searching HuggingFace directly](https://huggingface.co/models?library=gguf) for a GGUF model.
55
55
56
-
We recommend you to start by getting a small model that doesn't have a lot of parameters just to ensure everything works, so try downloading a `7B`/`8B` parameters model first (search for models with both `7B`/`8B` and `GGUF` in their name).
56
+
We recommend starting by getting a small model that doesn't have a lot of parameters just to ensure everything works, so try downloading a `7B`/`8B` parameters model first (search for models with both `7B`/`8B` and `GGUF` in their name).
57
57
58
58
For improved download speeds, you can use the [`pull`](../cli/pull.md) command to download a model:
description: "Model file to use for the chat. Can be a path to a local file or a URL of a model file to download. Leave empty to choose from a list of recommended models"
82
+
description: "Model file to use for the chat. Can be a path to a local file or a URI of a model file to download. Leave empty to choose from a list of recommended models"
description: "Model file to use for the chat. Can be a path to a local file or a URL of a model file to download. Leave empty to choose from a list of recommended models"
62
+
description: "Model file to use for the completion. Can be a path to a local file or a URI of a model file to download. Leave empty to choose from a list of recommended models"
description: "Model file to use for the chat. Can be a path to a local file or a URL of a model file to download. Leave empty to choose from a list of recommended models"
64
+
description: "Model file to use for the infill. Can be a path to a local file or a URI of a model file to download. Leave empty to choose from a list of recommended models"
0 commit comments