Update import.md

This commit is contained in:
Jeffrey Morgan 2023-10-19 12:17:36 -04:00 committed by GitHub
parent fe6f3b48f7
commit 6b213216d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
# Import a model # Import a model
This guide walks through importing a PyTorch, Safetensors or GGUF model from a HuggingFace repo to Ollama. This guide walks through importing a PyTorch, Safetensors or GGUF model.
## Supported models ## Supported models
@ -15,7 +15,9 @@ To view a model's architecture, check the `config.json` file in its HuggingFace
## Importing ## Importing
### Step 1: Clone the HuggingFace repository ### Step 1: Clone the HuggingFace repository (optional)
If the model is currently hosted in a HuggingFace repository, first clone that repository to download the raw model.
``` ```
git lfs install git lfs install
@ -23,9 +25,9 @@ git clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1
cd Mistral-7B-Instruct-v0.1 cd Mistral-7B-Instruct-v0.1
``` ```
### Step 2: Convert and quantize (for PyTorch and Safetensors) ### Step 2: Convert and quantize to a `.bin` file (optional, for PyTorch and Safetensors)
A [Docker image](https://hub.docker.com/r/ollama/quantize) with the tooling required to convert and quantize models is available. If the model is in PyTorch or Safetensors format, a [Docker image](https://hub.docker.com/r/ollama/quantize) with the tooling required to convert and quantize models is available.
First, Install [Docker](https://www.docker.com/get-started/). First, Install [Docker](https://www.docker.com/get-started/).