[GH-ISSUE #6246] Modelfile - Customize a prompt #65944

Closed
opened 2026-05-03 23:16:59 -05:00 by GiteaMirror · 11 comments
Owner

Originally created by @LucasFreitas88 on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6246

What is the issue?

I cannot change the modelfile file with new prompt instructions, as in the documentation example (Customize a prompt item).

Model: Llama 3.1 8B

Notebook: Macbook Air M1 - Mac Os Sonoma 14.6.1

The answer to the question posed in the example (hi) is an endless sequence of strange characters like:

H114@(02228'6.:@6@?/B+:&H((,/1A:8/=>=<.C-.C2>9C;H!$C=+5&,'&C7@44D>&BC=D"C%6<BB%;;$//2<D814),';?:@!!9:2H114@(02228'6.:@6@?/B+:&H((,/1A:8/=>=<.-C-.C2>9C;H!$C=+5&,'*&C7@44D>&BC=D"C%6< ...

What is happening? The procedure I used is exactly the same as described in the documentation.

OS

macOS

GPU

No response

CPU

No response

Ollama version

0.3.4

Originally created by @LucasFreitas88 on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6246 ### What is the issue? I cannot change the modelfile file with new prompt instructions, as in the documentation example (Customize a prompt item). Model: Llama 3.1 8B Notebook: Macbook Air M1 - Mac Os Sonoma 14.6.1 The answer to the question posed in the example (hi) is an endless sequence of strange characters like: H*114@(02228'6.:@6@?/B+:&H((,/1A:8/=>=<.C-.C2>9C*;H!$C=+5&,'*&C7@44D>&BC=D"C%6<BB%;;$*//2<D814),';?:@!!9:2H*114@(02228'6.:@6@?/B+:&H((,/1A:8/=>=<.-C-.C2>9C*;H!$C=+5&,'*&C7@44D>&BC=D"C%6< ... What is happening? The procedure I used is exactly the same as described in the documentation. ### OS macOS ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.3.4
GiteaMirror added the bug label 2026-05-03 23:16:59 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 8, 2024):

What's the contents of your modelfile?

<!-- gh-comment-id:2274588967 --> @rick-github commented on GitHub (Aug 8, 2024): What's the contents of your modelfile?
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

I tested it in two ways:

  1. just with the example content in the documentation

  2. with the same content as the original modelfile, plus a SYSTEM line with the documentation example prompt

<!-- gh-comment-id:2274714308 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): I tested it in two ways: 1) just with the example content in the documentation 2) with the same content as the original modelfile, plus a SYSTEM line with the documentation example prompt
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

both work with other models, such as mistral

<!-- gh-comment-id:2274716911 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): both work with other models, such as mistral
Author
Owner

@rick-github commented on GitHub (Aug 8, 2024):

There's another report (#6249) of llama3.1 on a Mac outputting random characters. If you run the model without a customized prompt, does it work any better? Have you tried other quants?

<!-- gh-comment-id:2275625121 --> @rick-github commented on GitHub (Aug 8, 2024): There's another report (#6249) of llama3.1 on a Mac outputting random characters. If you run the model without a customized prompt, does it work any better? Have you tried other quants?
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

I uploaded the version of ollama on my Mac yesterday, exclusively to test prompt changes in Llama3.1 modelfile.
Everything was fine until the day before yesterday, that's why I hadn't tested the model myself. I tested it now, on a new installation, and the model itself actually generates the same random characters.

<!-- gh-comment-id:2275909964 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): I uploaded the version of ollama on my Mac yesterday, exclusively to test prompt changes in Llama3.1 modelfile. Everything was fine until the day before yesterday, that's why I hadn't tested the model myself. I tested it now, on a new installation, and the model itself actually generates the same random characters.
Author
Owner

@rick-github commented on GitHub (Aug 8, 2024):

It's been reported that llama3.1:8b-instruct-q4_K_M works fine, do you find the same?

<!-- gh-comment-id:2275917455 --> @rick-github commented on GitHub (Aug 8, 2024): It's been reported that `llama3.1:8b-instruct-q4_K_M` works fine, do you find the same?
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

on my old installation (version before 0.3.4), the Llama3.1 was working perfectly without prompt changes.

<!-- gh-comment-id:2275918025 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): on my old installation (version before 0.3.4), the Llama3.1 was working perfectly without prompt changes.
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

llama3.1:8b-instruct-q4_K_M works fine

<!-- gh-comment-id:2275970341 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): llama3.1:8b-instruct-q4_K_M works fine
Author
Owner

@rick-github commented on GitHub (Aug 8, 2024):

Can you post server logs from an attempt to use llama3.1:8b? I'd like to see if you are getting the same error: Insufficient Memory (00000008:kIOGPUCommandBufferCallbackErrorOutOfMemory) messages as #6257.

<!-- gh-comment-id:2275992216 --> @rick-github commented on GitHub (Aug 8, 2024): Can you post server logs from an attempt to use `llama3.1:8b`? I'd like to see if you are getting the same `error: Insufficient Memory (00000008:kIOGPUCommandBufferCallbackErrorOutOfMemory)` messages as #6257.
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

It was exactly this error! Thank you so much! I switched to a machine with 32GB of RAM, and it worked perfectly. I realized that it’s necessary to have 4-6GB free, at least on my Mac, to use Llama 3.1 8B, and there are only 8GB of RAM in total.

<!-- gh-comment-id:2276419342 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): It was exactly this error! Thank you so much! I switched to a machine with 32GB of RAM, and it worked perfectly. I realized that it’s necessary to have 4-6GB free, at least on my Mac, to use Llama 3.1 8B, and there are only 8GB of RAM in total.
Author
Owner

@LucasFreitas88 commented on GitHub (Aug 8, 2024):

Thanks!

<!-- gh-comment-id:2276419710 --> @LucasFreitas88 commented on GitHub (Aug 8, 2024): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65944