update readme to llama3.1 (#5933)

This commit is contained in:
Michael 2024-07-28 17:21:38 -04:00 committed by GitHub
parent f3d7a481b7
commit 2c01610616
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,10 +35,10 @@ The official [Ollama Docker image](https://hub.docker.com/r/ollama/ollama) `olla
## Quickstart ## Quickstart
To run and chat with [Llama 3](https://ollama.com/library/llama3): To run and chat with [Llama 3.1](https://ollama.com/library/llama3.1):
``` ```
ollama run llama3 ollama run llama3.1
``` ```
## Model library ## Model library
@ -49,8 +49,9 @@ Here are some example models that can be downloaded:
| Model | Parameters | Size | Download | | Model | Parameters | Size | Download |
| ------------------ | ---------- | ----- | ------------------------------ | | ------------------ | ---------- | ----- | ------------------------------ |
| Llama 3 | 8B | 4.7GB | `ollama run llama3` | | Llama 3.1 | 8B | 4.7GB | `ollama run llama3.1` |
| Llama 3 | 70B | 40GB | `ollama run llama3:70b` | | Llama 3.1 | 70B | 40GB | `ollama run llama3.1:70b` |
| Llama 3.1 | 405B | 231GB | `ollama run llama3.1:405b` |
| Phi 3 Mini | 3.8B | 2.3GB | `ollama run phi3` | | Phi 3 Mini | 3.8B | 2.3GB | `ollama run phi3` |
| Phi 3 Medium | 14B | 7.9GB | `ollama run phi3:medium` | | Phi 3 Medium | 14B | 7.9GB | `ollama run phi3:medium` |
| Gemma 2 | 9B | 5.5GB | `ollama run gemma2` | | Gemma 2 | 9B | 5.5GB | `ollama run gemma2` |
@ -97,16 +98,16 @@ See the [guide](docs/import.md) on importing models for more information.
### Customize a prompt ### Customize a prompt
Models from the Ollama library can be customized with a prompt. For example, to customize the `llama3` model: Models from the Ollama library can be customized with a prompt. For example, to customize the `llama3.1` model:
``` ```
ollama pull llama3 ollama pull llama3.1
``` ```
Create a `Modelfile`: Create a `Modelfile`:
``` ```
FROM llama3 FROM llama3.1
# set the temperature to 1 [higher is more creative, lower is more coherent] # set the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 1 PARAMETER temperature 1
@ -141,7 +142,7 @@ ollama create mymodel -f ./Modelfile
### Pull a model ### Pull a model
``` ```
ollama pull llama3 ollama pull llama3.1
``` ```
> This command can also be used to update a local model. Only the diff will be pulled. > This command can also be used to update a local model. Only the diff will be pulled.
@ -149,13 +150,13 @@ ollama pull llama3
### Remove a model ### Remove a model
``` ```
ollama rm llama3 ollama rm llama3.1
``` ```
### Copy a model ### Copy a model
``` ```
ollama cp llama3 my-model ollama cp llama3.1 my-model
``` ```
### Multiline input ### Multiline input
@ -179,14 +180,14 @@ The image features a yellow smiley face, which is likely the central focus of th
### Pass the prompt as an argument ### Pass the prompt as an argument
``` ```
$ ollama run llama3 "Summarize this file: $(cat README.md)" $ ollama run llama3.1 "Summarize this file: $(cat README.md)"
Ollama is a lightweight, extensible framework for building and running language models on the local machine. It provides a simple API for creating, running, and managing models, as well as a library of pre-built models that can be easily used in a variety of applications. Ollama is a lightweight, extensible framework for building and running language models on the local machine. It provides a simple API for creating, running, and managing models, as well as a library of pre-built models that can be easily used in a variety of applications.
``` ```
### Show model information ### Show model information
``` ```
ollama show llama3 ollama show llama3.1
``` ```
### List models on your computer ### List models on your computer
@ -214,7 +215,7 @@ Next, start the server:
Finally, in a separate shell, run a model: Finally, in a separate shell, run a model:
``` ```
./ollama run llama3 ./ollama run llama3.1
``` ```
## REST API ## REST API
@ -225,7 +226,7 @@ Ollama has a REST API for running and managing models.
``` ```
curl http://localhost:11434/api/generate -d '{ curl http://localhost:11434/api/generate -d '{
"model": "llama3", "model": "llama3.1",
"prompt":"Why is the sky blue?" "prompt":"Why is the sky blue?"
}' }'
``` ```
@ -234,7 +235,7 @@ curl http://localhost:11434/api/generate -d '{
``` ```
curl http://localhost:11434/api/chat -d '{ curl http://localhost:11434/api/chat -d '{
"model": "llama3", "model": "llama3.1",
"messages": [ "messages": [
{ "role": "user", "content": "why is the sky blue?" } { "role": "user", "content": "why is the sky blue?" }
] ]