Skip to content

Commit e8aaea0

Browse files
drnicpdevine
andauthored
Update 'llama2' -> 'llama3' in most places (ollama#4116)
* Update 'llama2' -> 'llama3' in most places --------- Co-authored-by: Patrick Devine <patrick@infrahq.com>
1 parent 267e25a commit e8aaea0

File tree

21 files changed

+94
-102
lines changed

21 files changed

+94
-102
lines changed

docs/api.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
### Model names
1919

20-
Model names follow a `model:tag` format, where `model` can have an optional namespace such as `example/model`. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version.
20+
Model names follow a `model:tag` format, where `model` can have an optional namespace such as `example/model`. Some examples are `orca-mini:3b-q4_1` and `llama3:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version.
2121

2222
### Durations
2323

@@ -66,7 +66,7 @@ Enable JSON mode by setting the `format` parameter to `json`. This will structur
6666

6767
```shell
6868
curl http://localhost:11434/api/generate -d '{
69-
"model": "llama2",
69+
"model": "llama3",
7070
"prompt": "Why is the sky blue?"
7171
}'
7272
```
@@ -77,7 +77,7 @@ A stream of JSON objects is returned:
7777

7878
```json
7979
{
80-
"model": "llama2",
80+
"model": "llama3",
8181
"created_at": "2023-08-04T08:52:19.385406455-07:00",
8282
"response": "The",
8383
"done": false
@@ -99,7 +99,7 @@ To calculate how fast the response is generated in tokens per second (token/s),
9999

100100
```json
101101
{
102-
"model": "llama2",
102+
"model": "llama3",
103103
"created_at": "2023-08-04T19:22:45.499127Z",
104104
"response": "",
105105
"done": true,
@@ -121,7 +121,7 @@ A response can be received in one reply when streaming is off.
121121

122122
```shell
123123
curl http://localhost:11434/api/generate -d '{
124-
"model": "llama2",
124+
"model": "llama3",
125125
"prompt": "Why is the sky blue?",
126126
"stream": false
127127
}'
@@ -133,7 +133,7 @@ If `stream` is set to `false`, the response will be a single JSON object:
133133

134134
```json
135135
{
136-
"model": "llama2",
136+
"model": "llama3",
137137
"created_at": "2023-08-04T19:22:45.499127Z",
138138
"response": "The sky is blue because it is the color of the sky.",
139139
"done": true,
@@ -155,7 +155,7 @@ If `stream` is set to `false`, the response will be a single JSON object:
155155

156156
```shell
157157
curl http://localhost:11434/api/generate -d '{
158-
"model": "llama2",
158+
"model": "llama3",
159159
"prompt": "What color is the sky at different times of the day? Respond using JSON",
160160
"format": "json",
161161
"stream": false
@@ -166,7 +166,7 @@ curl http://localhost:11434/api/generate -d '{
166166

167167
```json
168168
{
169-
"model": "llama2",
169+
"model": "llama3",
170170
"created_at": "2023-11-09T21:07:55.186497Z",
171171
"response": "{\n\"morning\": {\n\"color\": \"blue\"\n},\n\"noon\": {\n\"color\": \"blue-gray\"\n},\n\"afternoon\": {\n\"color\": \"warm gray\"\n},\n\"evening\": {\n\"color\": \"orange\"\n}\n}\n",
172172
"done": true,
@@ -289,7 +289,7 @@ If you want to set custom options for the model at runtime rather than in the Mo
289289

290290
```shell
291291
curl http://localhost:11434/api/generate -d '{
292-
"model": "llama2",
292+
"model": "llama3",
293293
"prompt": "Why is the sky blue?",
294294
"stream": false,
295295
"options": {
@@ -332,7 +332,7 @@ curl http://localhost:11434/api/generate -d '{
332332

333333
```json
334334
{
335-
"model": "llama2",
335+
"model": "llama3",
336336
"created_at": "2023-08-04T19:22:45.499127Z",
337337
"response": "The sky is blue because it is the color of the sky.",
338338
"done": true,
@@ -354,7 +354,7 @@ If an empty prompt is provided, the model will be loaded into memory.
354354

355355
```shell
356356
curl http://localhost:11434/api/generate -d '{
357-
"model": "llama2"
357+
"model": "llama3"
358358
}'
359359
```
360360

@@ -364,7 +364,7 @@ A single JSON object is returned:
364364

365365
```json
366366
{
367-
"model": "llama2",
367+
"model": "llama3",
368368
"created_at": "2023-12-18T19:52:07.071755Z",
369369
"response": "",
370370
"done": true
@@ -407,7 +407,7 @@ Send a chat message with a streaming response.
407407

408408
```shell
409409
curl http://localhost:11434/api/chat -d '{
410-
"model": "llama2",
410+
"model": "llama3",
411411
"messages": [
412412
{
413413
"role": "user",
@@ -423,7 +423,7 @@ A stream of JSON objects is returned:
423423

424424
```json
425425
{
426-
"model": "llama2",
426+
"model": "llama3",
427427
"created_at": "2023-08-04T08:52:19.385406455-07:00",
428428
"message": {
429429
"role": "assistant",
@@ -438,7 +438,7 @@ Final response:
438438

439439
```json
440440
{
441-
"model": "llama2",
441+
"model": "llama3",
442442
"created_at": "2023-08-04T19:22:45.499127Z",
443443
"done": true,
444444
"total_duration": 4883583458,
@@ -456,7 +456,7 @@ Final response:
456456

457457
```shell
458458
curl http://localhost:11434/api/chat -d '{
459-
"model": "llama2",
459+
"model": "llama3",
460460
"messages": [
461461
{
462462
"role": "user",
@@ -471,7 +471,7 @@ curl http://localhost:11434/api/chat -d '{
471471

472472
```json
473473
{
474-
"model": "registry.ollama.ai/library/llama2:latest",
474+
"model": "registry.ollama.ai/library/llama3:latest",
475475
"created_at": "2023-12-12T14:13:43.416799Z",
476476
"message": {
477477
"role": "assistant",
@@ -495,7 +495,7 @@ Send a chat message with a conversation history. You can use this same approach
495495

496496
```shell
497497
curl http://localhost:11434/api/chat -d '{
498-
"model": "llama2",
498+
"model": "llama3",
499499
"messages": [
500500
{
501501
"role": "user",
@@ -519,7 +519,7 @@ A stream of JSON objects is returned:
519519

520520
```json
521521
{
522-
"model": "llama2",
522+
"model": "llama3",
523523
"created_at": "2023-08-04T08:52:19.385406455-07:00",
524524
"message": {
525525
"role": "assistant",
@@ -533,7 +533,7 @@ Final response:
533533

534534
```json
535535
{
536-
"model": "llama2",
536+
"model": "llama3",
537537
"created_at": "2023-08-04T19:22:45.499127Z",
538538
"done": true,
539539
"total_duration": 8113331500,
@@ -591,7 +591,7 @@ curl http://localhost:11434/api/chat -d '{
591591

592592
```shell
593593
curl http://localhost:11434/api/chat -d '{
594-
"model": "llama2",
594+
"model": "llama3",
595595
"messages": [
596596
{
597597
"role": "user",
@@ -609,7 +609,7 @@ curl http://localhost:11434/api/chat -d '{
609609

610610
```json
611611
{
612-
"model": "registry.ollama.ai/library/llama2:latest",
612+
"model": "registry.ollama.ai/library/llama3:latest",
613613
"created_at": "2023-12-12T14:13:43.416799Z",
614614
"message": {
615615
"role": "assistant",
@@ -651,7 +651,7 @@ Create a new model from a `Modelfile`.
651651
```shell
652652
curl http://localhost:11434/api/create -d '{
653653
"name": "mario",
654-
"modelfile": "FROM llama2\nSYSTEM You are mario from Super Mario Bros."
654+
"modelfile": "FROM llama3\nSYSTEM You are mario from Super Mario Bros."
655655
}'
656656
```
657657

@@ -758,7 +758,7 @@ A single JSON object will be returned.
758758
}
759759
},
760760
{
761-
"name": "llama2:latest",
761+
"name": "llama3:latest",
762762
"modified_at": "2023-12-07T09:32:18.757212583-08:00",
763763
"size": 3825819519,
764764
"digest": "fe938a131f40e6f6d40083c9f0f430a515233eb2edaa6d72eb85c50d64f2300e",
@@ -792,7 +792,7 @@ Show information about a model including details, modelfile, template, parameter
792792

793793
```shell
794794
curl http://localhost:11434/api/show -d '{
795-
"name": "llama2"
795+
"name": "llama3"
796796
}'
797797
```
798798

@@ -827,8 +827,8 @@ Copy a model. Creates a model with another name from an existing model.
827827

828828
```shell
829829
curl http://localhost:11434/api/copy -d '{
830-
"source": "llama2",
831-
"destination": "llama2-backup"
830+
"source": "llama3",
831+
"destination": "llama3-backup"
832832
}'
833833
```
834834

@@ -854,7 +854,7 @@ Delete a model and its data.
854854

855855
```shell
856856
curl -X DELETE http://localhost:11434/api/delete -d '{
857-
"name": "llama2:13b"
857+
"name": "llama3:13b"
858858
}'
859859
```
860860

@@ -882,7 +882,7 @@ Download a model from the ollama library. Cancelled pulls are resumed from where
882882

883883
```shell
884884
curl http://localhost:11434/api/pull -d '{
885-
"name": "llama2"
885+
"name": "llama3"
886886
}'
887887
```
888888

docs/faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ When using the API, specify the `num_ctx` parameter:
3232

3333
```
3434
curl http://localhost:11434/api/generate -d '{
35-
"model": "llama2",
35+
"model": "llama3",
3636
"prompt": "Why is the sky blue?",
3737
"options": {
3838
"num_ctx": 4096
@@ -88,9 +88,9 @@ On windows, Ollama inherits your user and system environment variables.
8888

8989
3. Edit or create New variable(s) for your user account for `OLLAMA_HOST`, `OLLAMA_MODELS`, etc.
9090

91-
4. Click OK/Apply to save
91+
4. Click OK/Apply to save
9292

93-
5. Run `ollama` from a new terminal window
93+
5. Run `ollama` from a new terminal window
9494

9595

9696
## How can I expose Ollama on my network?
@@ -221,12 +221,12 @@ The `keep_alive` parameter can be set to:
221221

222222
For example, to preload a model and leave it in memory use:
223223
```shell
224-
curl http://localhost:11434/api/generate -d '{"model": "llama2", "keep_alive": -1}'
224+
curl http://localhost:11434/api/generate -d '{"model": "llama3", "keep_alive": -1}'
225225
```
226226

227227
To unload the model and free up memory use:
228228
```shell
229-
curl http://localhost:11434/api/generate -d '{"model": "llama2", "keep_alive": 0}'
229+
curl http://localhost:11434/api/generate -d '{"model": "llama3", "keep_alive": 0}'
230230
```
231231

232232
Alternatively, you can change the amount of time all models are loaded into memory by setting the `OLLAMA_KEEP_ALIVE` environment variable when starting the Ollama server. The `OLLAMA_KEEP_ALIVE` variable uses the same parameter types as the `keep_alive` parameter types mentioned above. Refer to section explaining [how to configure the Ollama server](#how-do-i-configure-ollama-server) to correctly set the environment variable.

docs/modelfile.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A model file is the blueprint to create and share models with Ollama.
1010
- [Examples](#examples)
1111
- [Instructions](#instructions)
1212
- [FROM (Required)](#from-required)
13-
- [Build from llama2](#build-from-llama2)
13+
- [Build from llama3](#build-from-llama3)
1414
- [Build from a bin file](#build-from-a-bin-file)
1515
- [PARAMETER](#parameter)
1616
- [Valid Parameters and Values](#valid-parameters-and-values)
@@ -48,7 +48,7 @@ INSTRUCTION arguments
4848
An example of a `Modelfile` creating a mario blueprint:
4949

5050
```modelfile
51-
FROM llama2
51+
FROM llama3
5252
# sets the temperature to 1 [higher is more creative, lower is more coherent]
5353
PARAMETER temperature 1
5454
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
@@ -67,33 +67,25 @@ To use this:
6767

6868
More examples are available in the [examples directory](../examples).
6969

70-
### `Modelfile`s in [ollama.com/library][1]
71-
72-
There are two ways to view `Modelfile`s underlying the models in [ollama.com/library][1]:
73-
74-
- Option 1: view a details page from a model's tags page:
75-
1. Go to a particular model's tags (e.g. https://ollama.com/library/llama2/tags)
76-
2. Click on a tag (e.g. https://ollama.com/library/llama2:13b)
77-
3. Scroll down to "Layers"
78-
- Note: if the [`FROM` instruction](#from-required) is not present,
79-
it means the model was created from a local file
80-
- Option 2: use `ollama show` to print the `Modelfile` for any local models like so:
70+
To view the Modelfile of a given model, use the `ollama show --modelfile` command.
8171

8272
```bash
83-
> ollama show --modelfile llama2:13b
73+
> ollama show --modelfile llama3
8474
# Modelfile generated by "ollama show"
8575
# To build a new Modelfile based on this one, replace the FROM line with:
86-
# FROM llama2:13b
76+
# FROM llama3:latest
77+
FROM /Users/pdevine/.ollama/models/blobs/sha256-00e1317cbf74d901080d7100f57580ba8dd8de57203072dc6f668324ba545f29
78+
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>
79+
80+
{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
8781
88-
FROM /root/.ollama/models/blobs/sha256:123abc
89-
TEMPLATE """[INST] {{ if .System }}<<SYS>>{{ .System }}<</SYS>>
82+
{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
9083
91-
{{ end }}{{ .Prompt }} [/INST] """
92-
SYSTEM """"""
93-
PARAMETER stop [INST]
94-
PARAMETER stop [/INST]
95-
PARAMETER stop <<SYS>>
96-
PARAMETER stop <</SYS>>
84+
{{ .Response }}<|eot_id|>"""
85+
PARAMETER stop "<|start_header_id|>"
86+
PARAMETER stop "<|end_header_id|>"
87+
PARAMETER stop "<|eot_id|>"
88+
PARAMETER stop "<|reserved_special_token"
9789
```
9890

9991
## Instructions
@@ -106,10 +98,10 @@ The `FROM` instruction defines the base model to use when creating a model.
10698
FROM <model name>:<tag>
10799
```
108100

109-
#### Build from llama2
101+
#### Build from llama3
110102

111103
```modelfile
112-
FROM llama2
104+
FROM llama3
113105
```
114106

115107
A list of available base models:

0 commit comments

Comments
 (0)