[GH-ISSUE #7458] mistake:ollama run llama3_8b_chat_uncensored_q4_0 #66797

Closed
opened 2026-05-04 08:14:07 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @1015g on GitHub (Oct 31, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7458

What is the issue?

Why is this happening? I've successfully converted it to Ollama format using the ollama create llama3_8b_chat_uncensored_q4_0 -f Modelfile command and successfully loaded and run it with the ollama run command, but why is it answering such an unreasonable nonsense? Is this GUFF model incompatible with Ollama?

Microsoft Windows [version 10.0.19045.5011]
(c) Microsoft Corporation.All rights reserved.
C:\Users\Administrator>ollama -v
ollama version is 0.3.14 C:\Users\Administrator>ollama run llama3_8b_chat_uncensored_q4_0

Hello
,I'm Wang Wei. Now, let's talk about collection classes in Java, namely List and Map. For example, there is such a piece of code: ```
public static void main(String[] args) {
List list = new ArrayList();
for (int i=0; i<10; ++i) {
list.add(i);
}
// Use the for-each statement
for (Integer integer : list) {
System.out.println(integer + " ");
}
}

- Then use the for-each statement to loop through this array;                                                                                                                                                                                                         You may ask, why is there no 'int i=0; 'Such a statement? This is because in Java 8, the variables of the for-each loop are only valid in the internal scope. In other words, the variables in the for-each loop are only used in the loop body and cannot be used externally. If you want to use it externally, you can do so with a normal for loop.                                                                                                                                                         Now let's take a look at the 'Map', which looks like this:                                                                                                                                                                                                                 ```                                                                                                                     
public static void main(String[] args) {                                                                                 
 Map map = new HashMap();                                                                                                
 for (int i=0; i<10; ++i) {                                                                                              
 map.put(i, "value" + i);                                                                                                
 }                                                                                                                       
// Use the for-each statement                                                                                                    
 for (Entry entry : map.entrySet()) {                                                                                    
 System.out.println(entry.getKey() + ":" + entry.getValue());                                                            
 }                                                                                                                      
}                                                                                                                       
```                                                                                                                                                                                                                                             Let's analyze this code:                                                                                                                                                                                                                         - Create a map with HashMap and add the data.                                                                               
- Then use a for-each loop to iterate over this array;                                                                                                                                                                                                             In Java 8, Maps can also use the for-each statement. If you want to use key-value pairs externally for variables, you can do so using a normal for loop.                                                                                                                                               So why do ArrayList and HashMap use the for-each statement? Because they're all iterative. Of course, there are other types of collections that can also be iterable. Like what   
 :                                                                                                                                                                                                                                               ```                                                                                                                     
List list = Arrays.asList(1, 2, 3);                                                                                     
Map map = EnumMap.of(Color.class, Color.RED);                                                                           
```                                                                                                                                                                                                                                             If you want to use the for-each statement in Java 8, make sure your class implements the Iterable <T>interface or Collection<T>or other iterable interfaces.                                                                                                                                                                                                                                              If you want to create your own collection class and can use the for-each statement, just implement the Iterable <T>interface. Specifically, just override the iterator() method.                                                                                                                                                                                                                                                ```                                                                                                                     
public class MyList implements Iterable {                                                                                
 ...                                                                                                                     
 private List list;                                                                                                                                                                                                                              public MyList() {                                                                                                       
this.list = new ArrayList();                                                                                           
 }                                                                                                                                                                                                                                               public void add(Object o) {                                                                                             
this.list.add(o);                                                                                                      
 }                                                                                                                                                                                                                                               
 @Override                                                                                                               
 public Iterator iterator() {                                                                                            
 return this.list.iterator();                                                                                            
 }                                                                                                                      
}                                                                                                                       
```                                                                                                                                                                                                                                             If you want to use the for-each statement to iterate over an array, you can also use Stream. Specifically, just call 'Arrays.stream(arrayName)'.                                                                                                                                      ```                                                                                                                     
public static void main(String[] args) {                                                                                
 int[] array = new int[10];                                                                                             
 for (int i=0; i<10; ++i) {                                                                                             
 array[i] = i;                                                                                                          
 }                                                                                                                                                                                                                                               
 Arrays.stream(array).forEach(x -> System.out.println(x));                                                             
}                                                                                                                      

hello
######### ### H2
This is a test header #### H3
This is another test header
Link text
Bold text
Italicized text
Strike through text
>Blockquote
- [ ] Todo list item 1

  • Todo list item 2

Image alt text

     python                                                                                                             
def hello():                                                                                                           
 print("Hello, world!")                                                                                               
```                                                                                                                                                                                                                                         ```css                                                                                                                
body {                                                                                                                 
 background-color: red;                                                                                               
}                                                                                                                     

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.3.14

Originally created by @1015g on GitHub (Oct 31, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7458 ### What is the issue? Why is this happening? I've successfully converted it to Ollama format using the ollama create llama3_8b_chat_uncensored_q4_0 -f Modelfile command and successfully loaded and run it with the ollama run command, but why is it answering such an unreasonable nonsense? Is this GUFF model incompatible with Ollama? Microsoft Windows [version 10.0.19045.5011] (c) Microsoft Corporation.All rights reserved. C:\Users\Administrator>ollama -v ollama version is 0.3.14 C:\Users\Administrator>ollama run llama3_8b_chat_uncensored_q4_0 >>> Hello ,I'm Wang Wei. Now, let's talk about collection classes in Java, namely List and Map. For example, there is such a piece of code: ``` public static void main(String[] args) { List list = new ArrayList(); for (int i=0; i<10; ++i) { list.add(i); } // Use the for-each statement for (Integer integer : list) { System.out.println(integer + " "); } } ``` Let's break down this code: - Start by creating an array with ArrayList, and then add the data; - Then use the for-each statement to loop through this array; You may ask, why is there no 'int i=0; 'Such a statement? This is because in Java 8, the variables of the for-each loop are only valid in the internal scope. In other words, the variables in the for-each loop are only used in the loop body and cannot be used externally. If you want to use it externally, you can do so with a normal for loop. Now let's take a look at the 'Map', which looks like this: ``` public static void main(String[] args) { Map map = new HashMap(); for (int i=0; i<10; ++i) { map.put(i, "value" + i); } // Use the for-each statement for (Entry entry : map.entrySet()) { System.out.println(entry.getKey() + ":" + entry.getValue()); } } ``` Let's analyze this code: - Create a map with HashMap and add the data. - Then use a for-each loop to iterate over this array; In Java 8, Maps can also use the for-each statement. If you want to use key-value pairs externally for variables, you can do so using a normal for loop. So why do ArrayList and HashMap use the for-each statement? Because they're all iterative. Of course, there are other types of collections that can also be iterable. Like what : ``` List list = Arrays.asList(1, 2, 3); Map map = EnumMap.of(Color.class, Color.RED); ``` If you want to use the for-each statement in Java 8, make sure your class implements the Iterable <T>interface or Collection<T>or other iterable interfaces. If you want to create your own collection class and can use the for-each statement, just implement the Iterable <T>interface. Specifically, just override the iterator() method. ``` public class MyList implements Iterable { ... private List list; public MyList() { this.list = new ArrayList(); } public void add(Object o) { this.list.add(o); } @Override public Iterator iterator() { return this.list.iterator(); } } ``` If you want to use the for-each statement to iterate over an array, you can also use Stream. Specifically, just call 'Arrays.stream(arrayName)'. ``` public static void main(String[] args) { int[] array = new int[10]; for (int i=0; i<10; ++i) { array[i] = i; } Arrays.stream(array).forEach(x -> System.out.println(x)); } ``` >>> hello ######### ### H2 This is a test header #### H3 This is another test header [Link text](http://www.example.com) **Bold text** *Italicized text* ~Strike through text~ >Blockquote - [ ] Todo list item 1 - [x] Todo list item 2 ![Image alt text](/path/to/image.png) ``` python def hello(): print("Hello, world!") ``` ```css body { background-color: red; } ``` ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.14
GiteaMirror added the bug label 2026-05-04 08:14:07 -05:00
Author
Owner

@1015g commented on GitHub (Oct 31, 2024):

I forgot to mention that if you load the GUFF file with koboldcpp there is no problem, which means that there is nothing wrong with the model itself

<!-- gh-comment-id:2450857170 --> @1015g commented on GitHub (Oct 31, 2024): I forgot to mention that if you load the GUFF file with koboldcpp there is no problem, which means that there is nothing wrong with the model itself
Author
Owner

@rick-github commented on GitHub (Oct 31, 2024):

Where did you get the model from? What's in your Modelfile?

<!-- gh-comment-id:2450876724 --> @rick-github commented on GitHub (Oct 31, 2024): Where did you get the model from? What's in your Modelfile?
Author
Owner

@1015g commented on GitHub (Nov 1, 2024):

Where did you get the model from? What's in your Modelfile?

Huggingface, of course.In the .ollamamodelsblobs directory are some sha256 files,As I mentioned in this article, I've successfully converted the guff file to the ollama format using the ollama command.

<!-- gh-comment-id:2451721959 --> @1015g commented on GitHub (Nov 1, 2024): > Where did you get the model from? What's in your Modelfile? Huggingface, of course.In the .ollamamodelsblobs directory are some sha256 files,As I mentioned in this article, I've successfully converted the guff file to the ollama format using the ollama command.
Author
Owner

@rick-github commented on GitHub (Nov 1, 2024):

If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it.

<!-- gh-comment-id:2451739400 --> @rick-github commented on GitHub (Nov 1, 2024): If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it.
Author
Owner

@1015g commented on GitHub (Nov 1, 2024):

If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it.

https://huggingface.co/georgesung/llama3_8b_chat_uncensored/blob/main/llama3_8b_chat_uncensored_q4_0.gguf,I'm sorry.

<!-- gh-comment-id:2452560300 --> @1015g commented on GitHub (Nov 1, 2024): > If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it. https://huggingface.co/georgesung/llama3_8b_chat_uncensored/blob/main/llama3_8b_chat_uncensored_q4_0.gguf,I'm sorry.
Author
Owner

@1015g commented on GitHub (Nov 1, 2024):

If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it.

Modelfile>FROM F:/llama3_8b_chat_uncensored_q4_0.gguf,Sorry again, this is the command file before the last time I converted the format, and I had set other normal parameters before, but they all ended up having all kinds of problems when running the model to answer the questions even worse than the ones above, so I had to delete all the code and only do the most basic format conversion commands, and the result was that as in the article above, it failed again.

<!-- gh-comment-id:2452560790 --> @1015g commented on GitHub (Nov 1, 2024): > If you don't provide a link to the HuggingFace repo where you got the model from, nobody will be able to download it to try to replicate the issue. If you don't provide the contents of your Modelfile, nobody can create a model to the replicate the issue. If nobody can replicate the issue, nobody can help you resolve it. Modelfile>FROM F:/llama3_8b_chat_uncensored_q4_0.gguf,Sorry again, this is the command file before the last time I converted the format, and I had set other normal parameters before, but they all ended up having all kinds of problems when running the model to answer the questions even worse than the ones above, so I had to delete all the code and only do the most basic format conversion commands, and the result was that as in the article above, it failed again.
Author
Owner

@rick-github commented on GitHub (Nov 1, 2024):

Use this as your Modelfile:

FROM F:/llama3_8b_chat_uncensored_q4_0.gguf
TEMPLATE """{{ .System }}

### HUMAN:
{{ .Prompt }}

### RESPONSE:
"""
PARAMETER stop "### HUMAN:"
PARAMETER stop "### RESPONSE:"
$ ollama run llama3_8b_chat_uncensored_q4_0 
>>> hello
Hello, how can I help you today?

>>> why is the sky blue?
The color of the sky is actually caused by a combination of factors, including the scattering of light by
gases and particles in the atmosphere. The gas molecules in the atmosphere scatter blue light more 
than other colors, so it appears as though the sky is blue when you look up at it from Earth's surface.

>>> """What does this code do:
... public static void main(String[] args) {
...   List list = new ArrayList();
...   for (int i=0; i<10; ++i) {
...     list.add(i);
...   }
...   // Use the for-each statement
...   for (Integer integer : list) {
...     System.out.println(integer + " ");
...   }
... }
... """
This code creates a new ArrayList and adds integers from 0 to 9 to it using the add method. Then,
it uses a for-foreach loop to iterate over each element in the list and print them out with a
space between each one.
<!-- gh-comment-id:2452641826 --> @rick-github commented on GitHub (Nov 1, 2024): Use this as your Modelfile: ```modelfile FROM F:/llama3_8b_chat_uncensored_q4_0.gguf TEMPLATE """{{ .System }} ### HUMAN: {{ .Prompt }} ### RESPONSE: """ PARAMETER stop "### HUMAN:" PARAMETER stop "### RESPONSE:" ``` ```console $ ollama run llama3_8b_chat_uncensored_q4_0 >>> hello Hello, how can I help you today? >>> why is the sky blue? The color of the sky is actually caused by a combination of factors, including the scattering of light by gases and particles in the atmosphere. The gas molecules in the atmosphere scatter blue light more than other colors, so it appears as though the sky is blue when you look up at it from Earth's surface. >>> """What does this code do: ... public static void main(String[] args) { ... List list = new ArrayList(); ... for (int i=0; i<10; ++i) { ... list.add(i); ... } ... // Use the for-each statement ... for (Integer integer : list) { ... System.out.println(integer + " "); ... } ... } ... """ This code creates a new ArrayList and adds integers from 0 to 9 to it using the add method. Then, it uses a for-foreach loop to iterate over each element in the list and print them out with a space between each one. ```
Author
Owner

@1015g commented on GitHub (Nov 1, 2024):

why is the sky blue?

Wow, friend, you're amazing!thank

<!-- gh-comment-id:2452662204 --> @1015g commented on GitHub (Nov 1, 2024): > ``` > why is the sky blue? > ``` Wow, friend, you're amazing!thank
Author
Owner

@pdevine commented on GitHub (Nov 13, 2024):

Ty @rick-github ! I'll go ahead and close this.

<!-- gh-comment-id:2474919493 --> @pdevine commented on GitHub (Nov 13, 2024): Ty @rick-github ! I'll go ahead and close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#66797