Skip to content

Commit

Permalink
import.md: formatting and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorganca committed Oct 15, 2023
1 parent 6002ceb commit c416087
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/import.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Import a model

This guide walks through creating an Ollama model from an existing model on HuggingFace from PyTorch, Safetensors or GGUF. It optionally covers pushing the model to [ollama.ai](https://ollama.ai/library).
This guide walks through importing a PyTorch, Safetensors or GGUF model from a HuggingFace repo to Ollama.

## Supported models

Expand All @@ -11,7 +11,7 @@ Ollama supports a set of model architectures, with support for more coming soon:
- GPT-NeoX
- BigCode

To view a model's architecture, check its `config.json` file. You should see an entry under `architecture` (e.g. `LlamaForCausalLM`).
To view a model's architecture, check the `config.json` file in its HuggingFace repo. You should see an entry under `architectures` (e.g. `LlamaForCausalLM`).

## Importing

Expand All @@ -23,7 +23,7 @@ git clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1
cd Mistral-7B-Instruct-v0.1
```

### Step 2: Convert and quantize
### Step 2: Convert and quantize (PyTorch and Safetensors)

A [Docker image](https://hub.docker.com/r/ollama/quantize) with the tooling required to convert and quantize models is available.

Expand Down Expand Up @@ -55,7 +55,7 @@ FROM ./q4_0.bin
TEMPLATE "[INST] {{ .Prompt }} [/INST]"
```

### Step 4: Create an Ollama model
### Step 4: Create the Ollama model

Finally, create a model from your `Modelfile`:

Expand All @@ -69,12 +69,12 @@ Next, test the model with `ollama run`:
ollama run example "What is your favourite condiment?"
```

### Step 5: Publish your model (optional - in alpha)
### Step 5: Publish your model (optional – early alpha)

Publishing models is in early alpha. If you'd like to publish your model to share with others, follow these steps:

1. Create [an account](https://ollama.ai/signup)
2. Ollama uses SSH keys similar to Git. Find your public key with `cat ~/.ollama/id_ed25519.pub` and copy it to your clipboard.
2. Run `cat ~/.ollama/id_ed25519.pub` to view your Ollama public key. Copy this to the clipboard.
3. Add your public key to your [Ollama account](https://ollama.ai/settings/keys)

Next, copy your model to your username's namespace:
Expand All @@ -89,7 +89,7 @@ Then push the model:
ollama push <your username>/example
```

After publishing, your model will be available at `https://ollama.ai/<your username>/example`
After publishing, your model will be available at `https://ollama.ai/<your username>/example`.

## Quantization reference

Expand Down

0 comments on commit c416087

Please sign in to comment.