[GH-ISSUE #6330] Finetuned LLAMA 3.1 8B Instruct is giving random output #50482

Closed
opened 2026-04-28 16:01:30 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @krisbianprabowo on GitHub (Aug 13, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6330

What is the issue?

Hello so i tried to running my finetuned model that based on Llama 3.1 8B instruct model.
It's look like it's giving a random output if you check it below:

Screen Shot 2024-08-13 at 11 41 33

I double checked it to make sure if my quantized/formatted to "gguf" model is actually the main problems, so i'm using another text-generation project like LM Studio. It is actually working fine and not giving the random output.
Screen Shot 2024-08-13 at 11 55 39

I ran the llama 3.1 8B instruct models from ollama itself and it's working fine too.

Already updated the Ollama to the latest version and still giving the same output. Perhaps, i'm missing something before running my models so it can give appropriate output?

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.3.5

Originally created by @krisbianprabowo on GitHub (Aug 13, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6330 ### What is the issue? Hello so i tried to running my finetuned model that based on Llama 3.1 8B instruct model. It's look like it's giving a random output if you check it below: <img width="1371" alt="Screen Shot 2024-08-13 at 11 41 33" src="https://github.com/user-attachments/assets/b4757e3b-e18d-411f-ad20-de6890a242cc"> I double checked it to make sure if my quantized/formatted to "gguf" model is actually the main problems, so i'm using another text-generation project like LM Studio. It is actually working fine and not giving the random output. <img width="837" alt="Screen Shot 2024-08-13 at 11 55 39" src="https://github.com/user-attachments/assets/fa153cfe-5fcd-498c-94a3-c350cd2fc597"> I ran the llama 3.1 8B instruct models from ollama itself and it's working fine too. Already updated the Ollama to the latest version and still giving the same output. Perhaps, i'm missing something before running my models so it can give appropriate output? ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.5
GiteaMirror added the bug label 2026-04-28 16:01:30 -05:00
Author
Owner

@jmorganca commented on GitHub (Aug 13, 2024):

Hi @krisbianprabowo sorry to hear. Do you know if you set a prompt template when you created the model with ollama create? Given it's completing your prompt it seems you might be missing the template: https://github.com/ollama/ollama/blob/main/docs/modelfile.md#template

Let me know if this doesn't help! Also if you know the prompt template I can help find the right one to set as TEMPLATE in the Modelfile .

<!-- gh-comment-id:2285378397 --> @jmorganca commented on GitHub (Aug 13, 2024): Hi @krisbianprabowo sorry to hear. Do you know if you set a prompt template when you created the model with `ollama create`? Given it's completing your prompt it seems you might be missing the template: https://github.com/ollama/ollama/blob/main/docs/modelfile.md#template Let me know if this doesn't help! Also if you know the prompt template I can help find the right one to set as `TEMPLATE` in the Modelfile .
Author
Owner

@krisbianprabowo commented on GitHub (Aug 13, 2024):

Thank you for your response @jmorganca . You actually right, i'm still not create a template for my models. I look up into the llama 3.1 instruct repository in huggingface and compare the templates from ollama: https://www.ollama.com/library/llama3.1:8b-instruct-fp16/blobs/11ce4ee3e170

are both using the same chat template? can i use directly the templates from ollama version?

<!-- gh-comment-id:2285407420 --> @krisbianprabowo commented on GitHub (Aug 13, 2024): Thank you for your response @jmorganca . You actually right, i'm still not create a template for my models. I look up into the llama 3.1 instruct repository in huggingface and compare the templates from ollama: https://www.ollama.com/library/llama3.1:8b-instruct-fp16/blobs/11ce4ee3e170 are both using the same chat template? can i use directly the templates from ollama version?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#50482