[GH-ISSUE #6129] Llama3.1 seems broken #29588

Closed
opened 2026-04-22 08:35:07 -05:00 by GiteaMirror · 16 comments
Owner

Originally created by @bopm on GitHub (Aug 1, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6129

What is the issue?

Running on MacStudio m1, fresh pull with ollama run llama3.1.
Using next as a test:

I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?

Expected results are 36/unknown location for river.
Actual results:

ollama run llama3.1
pulling manifest
pulling 87048bcd5521... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB
pulling 8cf247399e57... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB
pulling f1cd752815fc... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  12 KB
pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏   96 B
pulling e711233e7343... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  485 B
verifying sha256 digest
writing manifest
removing any unused layers
success
>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each.
...  I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
You started with 10 apples, found 3 gold coins and lost 4 apples, gained 1 coin, collected a bunch of apples from birds and bought more apples with your coins.

First, let's calculate how many apples you got from the birds. Three birds dropped 6 apples each, so that's 18 apples.
So now we have:10 (initial apples) - 4 (lost apples) + 1 (gained apple) + 18(apples from birds)=25 apples.

Next, let's calculate how many gold coins you have in total. You found 3, gained 1 and won 6 but had to share them with your teammates so you got 6/3=2.
So now we have:3 (initial coins) + 1(gained coin)+ 2(shared coins)=6.

You spent all the coins on apples. The price of an apple is 0.5 coins, so how many apples can you buy with your gold coins?
The answer is 6/0.5=12.
But remember, you already had 25 apples and you bought more apples for your gold coins (not your apples). So the total number of apples you have now is 25+12=37.
Now about the river: It runs near a big city that has something to do with what you can spend your coins on.

>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each.
...  I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
Let's break it down step by step:

**Apples:**

* You start with 10 apples.
* You lose 4 apples, so you're left with 10 - 4 = 6 apples.
* Then, three birds drop 6 apples each, which is a total of 3 x 6 = 18 apples. So, now you have 6 + 18 = 24 apples.
* And then, you gain more apples from buying them with your coins (we'll get to that in a minute). But let's not forget about the initial 10 apples you had, which means you already had 10 apples before all this happened.

**Coins:**

* You find 3 gold coins in the river.
* You gain another coin later on, so now you have 4 coins total (3 + 1).
* Then, you win 6 more gold coins playing an online game, but you share them with your 2 teammates. That means you get to keep only half of those coins: 6 / 2 = 3.
* So now you add these new coins to the ones you already had, and you have a total of 4 (initial coins) + 3 (new coins) = 7 coins.

**Buying apples with coins:**

* You buy apples for all your coins. The price of an apple is 0.5 coins.
* Since you have 7 coins, that's how many apples you can buy: 7 / 0.5 = 14 apples.
* But remember, earlier I mentioned that you already had some apples before buying more? That means the total number of apples you now have includes both these new apples and the ones you previously accumulated.

**Final answer:**

You start with 10 apples initially. Then, you accumulate more apples from birds (24 apples) and gain more apples by buying them with your coins (14 apples). So, in total, you now have:

10 (initial apples) + 24 (apples from birds) + 14 (new apples bought) = 48 apples

**The river:**

It runs near a big city that has something to do with what you can spend the coins on... You used your gold coins to buy apples! The price of an apple was related to how many coins you had, so it was probably somewhere where you could easily trade
your coins for goods.

>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each.
...  I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
**Apples:**

* You start with 10 apples.
* You lose 4 apples, so you're left with 10 - 4 = 6 apples.
* Then, three birds drop 6 apples each, which is a total of 3 x 6 = 18 apples. So, now you have 6 + 18 = 24 apples.

**Coins:**

* You find 3 gold coins in the river.
* You gain another coin later on, so now you have 4 coins total (3 + 1).
* Then, you win 6 more gold coins playing an online game, but you share them with your 2 teammates. That means you get to keep only half of those coins: 6 / 2 = 3.
* So now you add these new coins to the ones you already had, and you have a total of 4 (initial coins) + 3 (new coins) = 7 coins.

**Buying apples with coins:**

* You buy apples for all your coins. The price of an apple is 0.5 coins.
* Since you have 7 coins, that's how many apples you can buy: 7 / 0.5 = 14 apples.
* But remember, you already had some apples before buying more? That means the total number of apples you now have includes both these new apples and the ones you previously accumulated.

**Final answer:**

You start with 10 apples initially. Then, you accumulate more apples from birds (24 apples) and gain more apples by buying them with your coins (14 apples). So, in total, you now have:

24 (apples from birds) + 14 (new apples bought) = 38 apples

**The river:**

It runs near a big city that has something to do with what you can spend the coins on...

So no correct calculations after first three runs.
Feeding same model to llama.cpp (llama-cli --version
version: 3497 (ed9d2854)
built with Apple clang version 15.0.0 (clang-1500.3.9.4) for arm64-apple-darwin23.4.0):

llama-cli -m /Users/sergeymoiseev/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87 -c 8192 -ngl 33 -cnv
...
== Running in interactive mode. ==
 - Press Ctrl+C to interject at any time.
 - Press Return to return control to the AI.
 - To return control without starting a new line, end your input with '/'.
 - If you want to submit another line, end your input with '\'.


> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
You started with 10 apples and lost 4 of them. So now you have 10 - 4 = 6 apples.
You gained 1 coin. You had 3 coins before that. So now you have 3 + 1 = 4 coins.
Three birds gave you a lot of apples. Since each bird dropped 6 apples, you got 3 x 6 = 18 apples. So now you have 6 + 18 = 24 apples.
You had 4 coins and you won 6 coins. You shared the 6 coins equally with your 2 teammates. So that's 6 / 3 = 2 coins you got to keep. Now you have 4 + 2 = 6 coins.
You have 24 apples and 6 coins. The price of one apple is 0.5 coins. So the number of apples you can buy is 6 / 0.5 = 12.
So now you have 24 - 12 = 12 apples left. You had 12 apples at the end.

You can buy apples with the coins in any city. The river could be near any city. The river could be near a city called "Apple City" or "Gold Coast" or "Pigeonville." It could be anywhere.

> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
You started with 10 apples. You found 3 gold coins in the river, but that doesn't affect the number of apples.

You lost 4 apples, but gained 1 gold coin. So now you have 10 - 4 = 6 apples and 3 + 1 = 4 gold coins.

The three birds dropped 6 apples each, so you got 3 x 6 = 18 apples. Now you have 6 + 18 = 24 apples and still 4 gold coins.

You played the online game and won 6 gold coins. You shared them equally with your 2 teammates, so you got 6 / 3 = 2 gold coins. Now you have 4 + 2 = 6 gold coins.

You have 24 apples and 6 gold coins. The price of an apple is 0.5 coins. So, the number of apples you can buy is 6 / 0.5 = 12.

You can buy 12 apples with the 6 gold coins, so you'll have 24 - 12 = 12 apples left.

As for where the river is, the problem states that it runs near a big city that has something to do with what you can spend the coins on. It doesn't specify what the city is, but it does say that you can spend the coins on apples, and apples are related to the city of Apple City.

> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
You started with 10 apples.

You found 3 gold coins in the river, so you have 3 gold coins now.

You lost 4 apples, so you have 10 - 4 = 6 apples now.

You gained 1 gold coin, so now you have 3 + 1 = 4 gold coins.

You got 18 apples from the three birds, so now you have 6 + 18 = 24 apples.

You played the online game and won 6 gold coins, but you had to share them equally with your 2 teammates, so you got 6 / 3 = 2 gold coins. Now you have 4 + 2 = 6 gold coins.

You have 24 apples and 6 gold coins. The price of an apple is 0.5 coins. So, the number of apples you can buy is 6 / 0.5 = 12.

You can buy 12 apples with the 6 gold coins, so now you have 24 - 12 = 12 apples left.

The river is near a big city where you can spend the gold coins. Since you spent the gold coins on apples, it's likely that the city is Apple City or somewhere related to apples.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.2

Originally created by @bopm on GitHub (Aug 1, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6129 ### What is the issue? Running on MacStudio m1, fresh pull with `ollama run llama3.1`. Using next as a test: ``` I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? ``` Expected results are 36/unknown location for river. Actual results: ``` ollama run llama3.1 pulling manifest pulling 87048bcd5521... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB pulling 8cf247399e57... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB pulling f1cd752815fc... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 12 KB pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 96 B pulling e711233e7343... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 485 B verifying sha256 digest writing manifest removing any unused layers success >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. ... I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? You started with 10 apples, found 3 gold coins and lost 4 apples, gained 1 coin, collected a bunch of apples from birds and bought more apples with your coins. First, let's calculate how many apples you got from the birds. Three birds dropped 6 apples each, so that's 18 apples. So now we have:10 (initial apples) - 4 (lost apples) + 1 (gained apple) + 18(apples from birds)=25 apples. Next, let's calculate how many gold coins you have in total. You found 3, gained 1 and won 6 but had to share them with your teammates so you got 6/3=2. So now we have:3 (initial coins) + 1(gained coin)+ 2(shared coins)=6. You spent all the coins on apples. The price of an apple is 0.5 coins, so how many apples can you buy with your gold coins? The answer is 6/0.5=12. But remember, you already had 25 apples and you bought more apples for your gold coins (not your apples). So the total number of apples you have now is 25+12=37. Now about the river: It runs near a big city that has something to do with what you can spend your coins on. >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. ... I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? Let's break it down step by step: **Apples:** * You start with 10 apples. * You lose 4 apples, so you're left with 10 - 4 = 6 apples. * Then, three birds drop 6 apples each, which is a total of 3 x 6 = 18 apples. So, now you have 6 + 18 = 24 apples. * And then, you gain more apples from buying them with your coins (we'll get to that in a minute). But let's not forget about the initial 10 apples you had, which means you already had 10 apples before all this happened. **Coins:** * You find 3 gold coins in the river. * You gain another coin later on, so now you have 4 coins total (3 + 1). * Then, you win 6 more gold coins playing an online game, but you share them with your 2 teammates. That means you get to keep only half of those coins: 6 / 2 = 3. * So now you add these new coins to the ones you already had, and you have a total of 4 (initial coins) + 3 (new coins) = 7 coins. **Buying apples with coins:** * You buy apples for all your coins. The price of an apple is 0.5 coins. * Since you have 7 coins, that's how many apples you can buy: 7 / 0.5 = 14 apples. * But remember, earlier I mentioned that you already had some apples before buying more? That means the total number of apples you now have includes both these new apples and the ones you previously accumulated. **Final answer:** You start with 10 apples initially. Then, you accumulate more apples from birds (24 apples) and gain more apples by buying them with your coins (14 apples). So, in total, you now have: 10 (initial apples) + 24 (apples from birds) + 14 (new apples bought) = 48 apples **The river:** It runs near a big city that has something to do with what you can spend the coins on... You used your gold coins to buy apples! The price of an apple was related to how many coins you had, so it was probably somewhere where you could easily trade your coins for goods. >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. ... I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? **Apples:** * You start with 10 apples. * You lose 4 apples, so you're left with 10 - 4 = 6 apples. * Then, three birds drop 6 apples each, which is a total of 3 x 6 = 18 apples. So, now you have 6 + 18 = 24 apples. **Coins:** * You find 3 gold coins in the river. * You gain another coin later on, so now you have 4 coins total (3 + 1). * Then, you win 6 more gold coins playing an online game, but you share them with your 2 teammates. That means you get to keep only half of those coins: 6 / 2 = 3. * So now you add these new coins to the ones you already had, and you have a total of 4 (initial coins) + 3 (new coins) = 7 coins. **Buying apples with coins:** * You buy apples for all your coins. The price of an apple is 0.5 coins. * Since you have 7 coins, that's how many apples you can buy: 7 / 0.5 = 14 apples. * But remember, you already had some apples before buying more? That means the total number of apples you now have includes both these new apples and the ones you previously accumulated. **Final answer:** You start with 10 apples initially. Then, you accumulate more apples from birds (24 apples) and gain more apples by buying them with your coins (14 apples). So, in total, you now have: 24 (apples from birds) + 14 (new apples bought) = 38 apples **The river:** It runs near a big city that has something to do with what you can spend the coins on... ``` So no correct calculations after first three runs. Feeding same model to llama.cpp (llama-cli --version version: 3497 (ed9d2854) built with Apple clang version 15.0.0 (clang-1500.3.9.4) for arm64-apple-darwin23.4.0): ``` llama-cli -m /Users/sergeymoiseev/.ollama/models/blobs/sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87 -c 8192 -ngl 33 -cnv ... == Running in interactive mode. == - Press Ctrl+C to interject at any time. - Press Return to return control to the AI. - To return control without starting a new line, end your input with '/'. - If you want to submit another line, end your input with '\'. > I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? You started with 10 apples and lost 4 of them. So now you have 10 - 4 = 6 apples. You gained 1 coin. You had 3 coins before that. So now you have 3 + 1 = 4 coins. Three birds gave you a lot of apples. Since each bird dropped 6 apples, you got 3 x 6 = 18 apples. So now you have 6 + 18 = 24 apples. You had 4 coins and you won 6 coins. You shared the 6 coins equally with your 2 teammates. So that's 6 / 3 = 2 coins you got to keep. Now you have 4 + 2 = 6 coins. You have 24 apples and 6 coins. The price of one apple is 0.5 coins. So the number of apples you can buy is 6 / 0.5 = 12. So now you have 24 - 12 = 12 apples left. You had 12 apples at the end. You can buy apples with the coins in any city. The river could be near any city. The river could be near a city called "Apple City" or "Gold Coast" or "Pigeonville." It could be anywhere. > I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? You started with 10 apples. You found 3 gold coins in the river, but that doesn't affect the number of apples. You lost 4 apples, but gained 1 gold coin. So now you have 10 - 4 = 6 apples and 3 + 1 = 4 gold coins. The three birds dropped 6 apples each, so you got 3 x 6 = 18 apples. Now you have 6 + 18 = 24 apples and still 4 gold coins. You played the online game and won 6 gold coins. You shared them equally with your 2 teammates, so you got 6 / 3 = 2 gold coins. Now you have 4 + 2 = 6 gold coins. You have 24 apples and 6 gold coins. The price of an apple is 0.5 coins. So, the number of apples you can buy is 6 / 0.5 = 12. You can buy 12 apples with the 6 gold coins, so you'll have 24 - 12 = 12 apples left. As for where the river is, the problem states that it runs near a big city that has something to do with what you can spend the coins on. It doesn't specify what the city is, but it does say that you can spend the coins on apples, and apples are related to the city of Apple City. > I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? You started with 10 apples. You found 3 gold coins in the river, so you have 3 gold coins now. You lost 4 apples, so you have 10 - 4 = 6 apples now. You gained 1 gold coin, so now you have 3 + 1 = 4 gold coins. You got 18 apples from the three birds, so now you have 6 + 18 = 24 apples. You played the online game and won 6 gold coins, but you had to share them equally with your 2 teammates, so you got 6 / 3 = 2 gold coins. Now you have 4 + 2 = 6 gold coins. You have 24 apples and 6 gold coins. The price of an apple is 0.5 coins. So, the number of apples you can buy is 6 / 0.5 = 12. You can buy 12 apples with the 6 gold coins, so now you have 24 - 12 = 12 apples left. The river is near a big city where you can spend the gold coins. Since you spent the gold coins on apples, it's likely that the city is Apple City or somewhere related to apples. ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.2
GiteaMirror added the bug label 2026-04-22 08:35:07 -05:00
Author
Owner

@bopm commented on GitHub (Aug 2, 2024):

ollama run llama3.1:8b-instruct-q4_K_M also seems to be broken and hallucinating answers.
When the same model is fed into llama.cpp

llama-cli -m /Users/sergeymoiseev/.ollama/models/blobs/sha256-5b3f826b3d31ee0548eebb17c766871341a6ab40cbcec69d7c484d382b889d99 --color --threads 30 --keep -1 --n-predict -1 --ctx-size 10000 --interactive -ngl 99 --simple-io -e --multiline-input --no-display-prompt --conversation --no-mmap --temp 0.6 --chat-template llama3 -cnv

it gives correct responses.

<!-- gh-comment-id:2265701479 --> @bopm commented on GitHub (Aug 2, 2024): `ollama run llama3.1:8b-instruct-q4_K_M` also seems to be broken and hallucinating answers. When the same model is fed into llama.cpp ``` llama-cli -m /Users/sergeymoiseev/.ollama/models/blobs/sha256-5b3f826b3d31ee0548eebb17c766871341a6ab40cbcec69d7c484d382b889d99 --color --threads 30 --keep -1 --n-predict -1 --ctx-size 10000 --interactive -ngl 99 --simple-io -e --multiline-input --no-display-prompt --conversation --no-mmap --temp 0.6 --chat-template llama3 -cnv ``` it gives correct responses.
Author
Owner

@igorschlum commented on GitHub (Aug 2, 2024):

with llama3.1:70b-instruct-q8_0 with Ollama, it works well:

Let's break down the events:

You start with 10 apples.
You find 3 gold coins in a river near a big city (the city isn't relevant to this problem, so let's ignore it).
You lose 4 apples but gain a gold coin, leaving you with:
Apples: 10 - 4 = 6
Coins: 3 + 1 = 4
Three birds run into your path and drop 6 apples each. That's a total of:
Apples: 6 + (3 x 6) = 24
You play an online game, win 6 gold coins, but have to share them with two teammates. Since you'll get one-third of the coins:
Coins won: 6 / 3 = 2
New total coins: 4 + 2 = 6
Now that you have a total of 24 apples and 6 gold coins, let's calculate how many more apples you can buy:

You have 6 gold coins to spend.
Each apple costs 0.5 coins.
Number of new apples bought: 6 / 0.5 = 12
Total apples now: Old + New = 24 + 12 = 36
As for the river, we don't know its name or exact location beyond being near a big city, but it seems to be some sort of mythical place where gold coins can be found...

<!-- gh-comment-id:2266143067 --> @igorschlum commented on GitHub (Aug 2, 2024): with llama3.1:70b-instruct-q8_0 with Ollama, it works well: Let's break down the events: You start with 10 apples. You find 3 gold coins in a river near a big city (the city isn't relevant to this problem, so let's ignore it). You lose 4 apples but gain a gold coin, leaving you with: Apples: 10 - 4 = 6 Coins: 3 + 1 = 4 Three birds run into your path and drop 6 apples each. That's a total of: Apples: 6 + (3 x 6) = 24 You play an online game, win 6 gold coins, but have to share them with two teammates. Since you'll get one-third of the coins: Coins won: 6 / 3 = 2 New total coins: 4 + 2 = 6 Now that you have a total of 24 apples and 6 gold coins, let's calculate how many more apples you can buy: You have 6 gold coins to spend. Each apple costs 0.5 coins. Number of new apples bought: 6 / 0.5 = 12 Total apples now: Old + New = 24 + 12 = 36 As for the river, we don't know its name or exact location beyond being near a big city, but it seems to be some sort of mythical place where gold coins can be found...
Author
Owner

@SirFalk commented on GitHub (Aug 3, 2024):

I‘ve also found Llama3.1 to just do whatever it wants. When I input a Text ~10000 characters, no matter what instruction, it just creates a summary. Even on 70B. Even in json mode (lol). I've just gone back to using Llama3. Though I‘m not sure it‘s a bug, maybe it‘s just bad.

<!-- gh-comment-id:2266859879 --> @SirFalk commented on GitHub (Aug 3, 2024): I‘ve also found Llama3.1 to just do whatever it wants. When I input a Text ~10000 characters, no matter what instruction, it just creates a summary. Even on 70B. Even in json mode (lol). I've just gone back to using Llama3. Though I‘m not sure it‘s a bug, maybe it‘s just bad.
Author
Owner

@Manouchehri commented on GitHub (Aug 3, 2024):

I also can't seem to import Llama 3.1 models that I downloaded from Hugging Face, not sure if it's related?

[user@1.2.3.4 demo-llm]$ docker exec -it ollama ollama create llama3.1:8b-instruct -f /my-model-configs/llama-3.1-8b-instruct
transferring model data
converting model
Error: proto: cannot parse invalid wire-format data
huggingface-cli download --token "hf_REMOVED" \
  meta-llama/Meta-Llama-3.1-8B-Instruct \
  --local-dir /llama-models/Meta-Llama-3.1-8B-Instruct \
  --local-dir-use-symlinks False

llama-3.1-8b-instruct:

FROM /llama-models/Meta-Llama-3.1-8B-Instruct
<!-- gh-comment-id:2266876726 --> @Manouchehri commented on GitHub (Aug 3, 2024): I also can't seem to import Llama 3.1 models that I downloaded from Hugging Face, not sure if it's related? ``` [user@1.2.3.4 demo-llm]$ docker exec -it ollama ollama create llama3.1:8b-instruct -f /my-model-configs/llama-3.1-8b-instruct transferring model data converting model Error: proto: cannot parse invalid wire-format data ``` ```sh huggingface-cli download --token "hf_REMOVED" \ meta-llama/Meta-Llama-3.1-8B-Instruct \ --local-dir /llama-models/Meta-Llama-3.1-8B-Instruct \ --local-dir-use-symlinks False ``` `llama-3.1-8b-instruct`: ``` FROM /llama-models/Meta-Llama-3.1-8B-Instruct ```
Author
Owner

@Technocality commented on GitHub (Aug 4, 2024):

This might be related to this: #6060
Also less related but might be something: #6071

<!-- gh-comment-id:2267287840 --> @Technocality commented on GitHub (Aug 4, 2024): This might be related to this: #6060 Also less related but might be something: #6071
Author
Owner

@Tom-Neverwinter commented on GitHub (Aug 6, 2024):

I often find this model repeats regardless of the settings. I assume its not been fixed especially as the model states july a week before additional tokenizer fixes were implemented

<!-- gh-comment-id:2271714062 --> @Tom-Neverwinter commented on GitHub (Aug 6, 2024): I often find this model repeats regardless of the settings. I assume its not been fixed especially as the model states july a week before additional tokenizer fixes were implemented
Author
Owner

@dhiltgen commented on GitHub (Aug 9, 2024):

We've fixed a few bugs recently which should hopefully address this. Please make sure to upgrade to the latest version of ollama (v0.3.4) and re-pull llama3.1.

<!-- gh-comment-id:2278766416 --> @dhiltgen commented on GitHub (Aug 9, 2024): We've fixed a few bugs recently which should hopefully address this. Please make sure to upgrade to the latest version of ollama (v0.3.4) and re-pull llama3.1.
Author
Owner

@igorschlum commented on GitHub (Aug 9, 2024):

@Tom-Neverwinter All Llama 3.1 models were updated 2 to 3 days ago, and the Llama 3.1:8b family is being re-uploaded today.

@bopm Please let us know if the new Llama 3.1 models uploaded today resolve the issue you're describing.

<!-- gh-comment-id:2278780809 --> @igorschlum commented on GitHub (Aug 9, 2024): @Tom-Neverwinter All Llama 3.1 models were updated 2 to 3 days ago, and the Llama 3.1:8b family is being re-uploaded today. @bopm Please let us know if the new Llama 3.1 models uploaded today resolve the issue you're describing.
Author
Owner

@bopm commented on GitHub (Aug 12, 2024):

@igorschlum it was quite efficient for a few days at the end of last week. After re-pulling llama3.1 today it's hallucinating all over again. Not a single right answer.
ollama version is 0.3.4

ollama run llama3.1
pulling manifest
pulling 8eeb52dfb3bb... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB
pulling 11ce4ee3e170... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB
pulling 0ba8f0e314b4... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  12 KB
pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏   96 B
pulling 1a4c3c319823... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  485 B
verifying sha256 digest
writing manifest
removing any unused layers
success
>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path
...  and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And
...  where is the river?
Let's break down your situation step by step:

1. You start with 10 apples.
2. Finding gold coins doesn't directly affect your apple count, but it's a crucial part of the story for what you can spend them on later.
3. Losing 4 apples means you now have 10 - 4 = 6 apples.

At this point, we know you lost some apples and found no more.

But wait! Three birds drop 6 apples each. That adds 18 apples to your count: 6 (already had) + 18 (new ones from the birds) = 24 apples.

Now, let's focus on the coins. You initially find 3 gold coins. Later, you gain a coin but lose one when playing an online game with teammates. Each of you gets 2 coins for winning, and since there are 3 of you, that makes 6
coins in total. However, because each of you has to share equally, the number of coins you end up with doesn't change from what you had before - which was 4 (the one you gained minus the one you lost). So, after playing the
game and sharing the coins with teammates, your overall coin count remains effectively the same as when you started, considering the share didn't add or subtract more than 1 coin. The key detail is actually the finding of
gold coins by you at the start.

The river running near a big city initially seemed like an important clue for spending the coins on something specific related to the city, but it turns out that's not relevant to calculating your final apple count. It was
just a narrative device to make the story more engaging.

Given the price of one apple is 0.5 gold coins and you had effectively 4 coins (considering the game play with teammates), we can calculate how many apples you could buy: 4 coins / 0.5 coins per apple = 8 apples.

So, if you already had 24 apples from the birds, and then bought 8 more using your gold coins, your final count of apples would be: 24 (from birds) + 8 (bought with coins) = 32 apples.

Therefore, after all these events, you end up having 32 apples.

>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path
...  and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And
...  where is the river?
To solve this, let's break it down step by step:

1. You start with **10** apples.
2. Finding 3 gold coins doesn't change your apple count but adds to your coin count.

At this point:
- Apples: 10
- Coins: 3

3. Losing 4 apples means you now have 10 - 4 = 6 apples and no change in coin count.

At this point:
- Apples: 6
- Coins: 3

4. Three birds drop 6 apples each, adding 18 apples to your count.
   You now have **24** apples (6 + 18) and the same coin count as before - which hasn't changed due to the bird incident.

At this point:
- Apples: 24
- Coins: 3

5. Gaining a gold coin increases your total coins but doesn't add or subtract apples.
   You now have **1** more coin than previously, bringing the total coin count to **4**.

At this point:
- Apples: 24
- Coins: 4

6. Playing an online game and winning 6 gold coins seems like it would increase your coin count significantly, but you actually share those equally with teammates - meaning each of you gets 2 coins for the win.
   The total shared is indeed **6** (your teammate's gain plus yours), but this sharing doesn't add or subtract any coins from what you already have. Your coins after winning would be the same as before because your "gain"
and "loss" due to sharing cancel each other out, and since we're considering the final share of 2 each, the effective change remains **0** for you.

At this point:
- Apples: 24
- Coins: 4

However, when playing an online game, you actually won gold coins but had to give some away to teammates. So, your actual gain after winning is effectively **1**, because of sharing 6 equally (which means you end up with the
same number of coins as before). The 2 additional coins from your win were given to your 2 teammates, so there's no change in your coin count after this.

At this point:
- Apples: 24
- Coins: 4

7. You buy apples for all the gold coins you have (which is **4**), since the sharing didn't increase or decrease it from what you already had.

Given the price of an apple is 0.5 gold coins, and you have 4 coins:
   - Number of apples you can buy = Coins / Price per Apple
     = 4 / 0.5
     = 8

At this point:
- Apples: **24 + 8 = 32**
- Coins: 0 (since all coins were used to buy apples)

Therefore, after buying the apples with your gold coins, you end up having **32** apples.

As for where the river is located, it runs near a big city that allows you to spend your coins on something. However, the specifics of how and what you spend the coins on aren't detailed in your final scenario update.

>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path
...  and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And
...  where is the river?
To find out how many apples you have, let's break down your situation:

1. You start with **10** apples.
2. Finding 3 gold coins doesn't change your apple count but adds to your coin count.

At this point:
- Apples: 10
- Coins: 3

3. Losing 4 apples means you now have 10 - 4 = **6** apples and gain a gold coin, increasing the coin count by 1.
   You now have 3 (from before) + 1 (gained) = 4 coins.

At this point:
- Apples: 6
- Coins: 4

4. Three birds drop 6 apples each, adding 18 apples to your count.
   This means you now have **24** apples (6 from before + 18 new ones).

At this point:
- Apples: 24
- Coins: 4

5. Playing an online game and winning 6 gold coins initially seems significant, but sharing them equally with teammates (2 of you) means each gets 3 coins.
   You get 3 coins from the win, not 6, because it's shared between you and your 2 teammates.

At this point:
- Apples: 24
- Coins: 7 (4 coins you had + 3 new ones)

6. You buy apples for all the gold coins you have.
   Given the price of an apple is 0.5 coins, and you have 7 coins:
   - Number of apples you can buy = Coins / Price per Apple
     = 7 / 0.5
     = 14

At this point:
- Apples: **24 + 14 = 38**
- Coins: 0 (since all coins were used to buy apples)

Therefore, after buying the apples with your gold coins, you end up having **38** apples.

As for where the river is located, it runs near a big city that allows you to spend your coins on something. However, this detail doesn't directly contribute to calculating how many apples you have but is an interesting plot
point.

>>> /bye
<!-- gh-comment-id:2284324629 --> @bopm commented on GitHub (Aug 12, 2024): @igorschlum it was quite efficient for a few days at the end of last week. After re-pulling `llama3.1` today it's hallucinating all over again. Not a single right answer. `ollama version is 0.3.4` ``` ollama run llama3.1 pulling manifest pulling 8eeb52dfb3bb... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB pulling 11ce4ee3e170... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB pulling 0ba8f0e314b4... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 12 KB pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 96 B pulling 1a4c3c319823... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 485 B verifying sha256 digest writing manifest removing any unused layers success >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path ... and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And ... where is the river? Let's break down your situation step by step: 1. You start with 10 apples. 2. Finding gold coins doesn't directly affect your apple count, but it's a crucial part of the story for what you can spend them on later. 3. Losing 4 apples means you now have 10 - 4 = 6 apples. At this point, we know you lost some apples and found no more. But wait! Three birds drop 6 apples each. That adds 18 apples to your count: 6 (already had) + 18 (new ones from the birds) = 24 apples. Now, let's focus on the coins. You initially find 3 gold coins. Later, you gain a coin but lose one when playing an online game with teammates. Each of you gets 2 coins for winning, and since there are 3 of you, that makes 6 coins in total. However, because each of you has to share equally, the number of coins you end up with doesn't change from what you had before - which was 4 (the one you gained minus the one you lost). So, after playing the game and sharing the coins with teammates, your overall coin count remains effectively the same as when you started, considering the share didn't add or subtract more than 1 coin. The key detail is actually the finding of gold coins by you at the start. The river running near a big city initially seemed like an important clue for spending the coins on something specific related to the city, but it turns out that's not relevant to calculating your final apple count. It was just a narrative device to make the story more engaging. Given the price of one apple is 0.5 gold coins and you had effectively 4 coins (considering the game play with teammates), we can calculate how many apples you could buy: 4 coins / 0.5 coins per apple = 8 apples. So, if you already had 24 apples from the birds, and then bought 8 more using your gold coins, your final count of apples would be: 24 (from birds) + 8 (bought with coins) = 32 apples. Therefore, after all these events, you end up having 32 apples. >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path ... and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And ... where is the river? To solve this, let's break it down step by step: 1. You start with **10** apples. 2. Finding 3 gold coins doesn't change your apple count but adds to your coin count. At this point: - Apples: 10 - Coins: 3 3. Losing 4 apples means you now have 10 - 4 = 6 apples and no change in coin count. At this point: - Apples: 6 - Coins: 3 4. Three birds drop 6 apples each, adding 18 apples to your count. You now have **24** apples (6 + 18) and the same coin count as before - which hasn't changed due to the bird incident. At this point: - Apples: 24 - Coins: 3 5. Gaining a gold coin increases your total coins but doesn't add or subtract apples. You now have **1** more coin than previously, bringing the total coin count to **4**. At this point: - Apples: 24 - Coins: 4 6. Playing an online game and winning 6 gold coins seems like it would increase your coin count significantly, but you actually share those equally with teammates - meaning each of you gets 2 coins for the win. The total shared is indeed **6** (your teammate's gain plus yours), but this sharing doesn't add or subtract any coins from what you already have. Your coins after winning would be the same as before because your "gain" and "loss" due to sharing cancel each other out, and since we're considering the final share of 2 each, the effective change remains **0** for you. At this point: - Apples: 24 - Coins: 4 However, when playing an online game, you actually won gold coins but had to give some away to teammates. So, your actual gain after winning is effectively **1**, because of sharing 6 equally (which means you end up with the same number of coins as before). The 2 additional coins from your win were given to your 2 teammates, so there's no change in your coin count after this. At this point: - Apples: 24 - Coins: 4 7. You buy apples for all the gold coins you have (which is **4**), since the sharing didn't increase or decrease it from what you already had. Given the price of an apple is 0.5 gold coins, and you have 4 coins: - Number of apples you can buy = Coins / Price per Apple = 4 / 0.5 = 8 At this point: - Apples: **24 + 8 = 32** - Coins: 0 (since all coins were used to buy apples) Therefore, after buying the apples with your gold coins, you end up having **32** apples. As for where the river is located, it runs near a big city that allows you to spend your coins on something. However, the specifics of how and what you spend the coins on aren't detailed in your final scenario update. >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path ... and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And ... where is the river? To find out how many apples you have, let's break down your situation: 1. You start with **10** apples. 2. Finding 3 gold coins doesn't change your apple count but adds to your coin count. At this point: - Apples: 10 - Coins: 3 3. Losing 4 apples means you now have 10 - 4 = **6** apples and gain a gold coin, increasing the coin count by 1. You now have 3 (from before) + 1 (gained) = 4 coins. At this point: - Apples: 6 - Coins: 4 4. Three birds drop 6 apples each, adding 18 apples to your count. This means you now have **24** apples (6 from before + 18 new ones). At this point: - Apples: 24 - Coins: 4 5. Playing an online game and winning 6 gold coins initially seems significant, but sharing them equally with teammates (2 of you) means each gets 3 coins. You get 3 coins from the win, not 6, because it's shared between you and your 2 teammates. At this point: - Apples: 24 - Coins: 7 (4 coins you had + 3 new ones) 6. You buy apples for all the gold coins you have. Given the price of an apple is 0.5 coins, and you have 7 coins: - Number of apples you can buy = Coins / Price per Apple = 7 / 0.5 = 14 At this point: - Apples: **24 + 14 = 38** - Coins: 0 (since all coins were used to buy apples) Therefore, after buying the apples with your gold coins, you end up having **38** apples. As for where the river is located, it runs near a big city that allows you to spend your coins on something. However, this detail doesn't directly contribute to calculating how many apples you have but is an interesting plot point. >>> /bye ```
Author
Owner

@bopm commented on GitHub (Aug 12, 2024):

At the same time llama3.1:8b-instruct-q4_K_M is gives more correct answers, but not still gives few incorrect at the start.

<!-- gh-comment-id:2284335179 --> @bopm commented on GitHub (Aug 12, 2024): At the same time `llama3.1:8b-instruct-q4_K_M` is gives more correct answers, but not still gives few incorrect at the start.
Author
Owner

@igorschlum commented on GitHub (Aug 12, 2024):

@bopm if you ask the LLM to solve it carfully and focus on math results, both Ollama 3 and Ollama 3.1 succeed in the task.

the way the prompt is written is important.

(base) igor@macIgor ~ % ollama run llama3
>>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result.
... 
...  
... I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the 
... coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coi
... ns but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apple
... 
... s do I have? And where is the river?
Here's a rewritten version of each step, focusing on the mathematical results:

**Initial Situation**

* I start with 10 apples.
* I find 3 gold coins in the river.

**Update after finding coins**

* My total number of coins increases by 3 to 3 + 0 = 3.

**Loss and gain of apples**

* I lose 4 apples, leaving me with 10 - 4 = 6 apples.
* I gain a gold coin, increasing my total number of coins to 3 + 1 = 4.

**Birds dropping apples**

* Each of the three birds drops 6 apples, adding 6 × 3 = 18 apples to my total.
* My new apple count is 6 (initial) + 18 = 24 apples.

**Online game and sharing coins**

* I win 6 gold coins in the online game.
* Since I have to share them equally with my 2 teammates, each of us gets 6 ÷ 3 = 2 coins.
* My new total number of coins is 4 (initial) + 2 = 6.

**Buying apples with coins**

* The price of an apple is 0.5 coins.
* I can buy apples with my coins: 6 coins ÷ 0.5 coins per apple = 12 apples.
* My new total number of apples is 24 (initial) + 12 = 36 apples.

**Question Answer**

* I have 36 apples.
* The river is still near the big city, as it's not explicitly stated that the river has moved or changed location.

>>> /exit
(base) igor@macIgor ~ % ollama run llama3.1 
>>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result.
... 
...  
... I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the 
... coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coi
... ns but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apple
... 
... s do I have? And where is the river?
Here are the steps rewritten to focus on the mathematical result:

**Step 1: Initial Apple Count**
I start with 10 apples.

**Step 2: Coin Discovery**
I find 3 gold coins in a location (the river) near a city, but this information is irrelevant for calculating the number of apples. We'll denote 
the total coin count as `coins = 3`.

**Step 3: Apple Loss and Coin Gain**
I lose 4 apples, reducing my apple count to `apples = 10 - 4 = 6`. I also gain a gold coin, increasing my coin count to `coins = 3 + 1 = 4`.

**Step 4: Bird-Related Apple Gain**
Three birds drop 6 apples each, so the total number of apples gained is `3 * 6 = 18`. My new apple count is `apples = 6 + 18 = 24`.

**Step 5: Online Game Result**
I win 6 gold coins, but I must share them equally with my 2 teammates. This means I get only 2 of the 6 coins, increasing my coin count to 
`coins = 4 + 2 = 6`. The number of apples remains unchanged for now.

**Step 6: Apple Purchase**
I buy apples for all the coins I have, and since each apple costs 0.5 coins, I can afford `coins / 0.5 = 12` apples. My new apple count is 
`apples = 24 + 12 = 36`.

The rewritten steps now focus on the mathematical progression of apple counts, making it easier for a language model to calculate the final 
answer.

The new version of llama3.1 is not more broken than Llama 3.

Tell us if you have other doubts. On my side, I think that this issue can be closed as resolve since the main point was the update of the llama3.1 model.

<!-- gh-comment-id:2284492779 --> @igorschlum commented on GitHub (Aug 12, 2024): @bopm if you ask the LLM to solve it carfully and focus on math results, both Ollama 3 and Ollama 3.1 succeed in the task. the way the prompt is written is important. ``` (base) igor@macIgor ~ % ollama run llama3 >>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result. ... ... ... I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the ... coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coi ... ns but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apple ... ... s do I have? And where is the river? Here's a rewritten version of each step, focusing on the mathematical results: **Initial Situation** * I start with 10 apples. * I find 3 gold coins in the river. **Update after finding coins** * My total number of coins increases by 3 to 3 + 0 = 3. **Loss and gain of apples** * I lose 4 apples, leaving me with 10 - 4 = 6 apples. * I gain a gold coin, increasing my total number of coins to 3 + 1 = 4. **Birds dropping apples** * Each of the three birds drops 6 apples, adding 6 × 3 = 18 apples to my total. * My new apple count is 6 (initial) + 18 = 24 apples. **Online game and sharing coins** * I win 6 gold coins in the online game. * Since I have to share them equally with my 2 teammates, each of us gets 6 ÷ 3 = 2 coins. * My new total number of coins is 4 (initial) + 2 = 6. **Buying apples with coins** * The price of an apple is 0.5 coins. * I can buy apples with my coins: 6 coins ÷ 0.5 coins per apple = 12 apples. * My new total number of apples is 24 (initial) + 12 = 36 apples. **Question Answer** * I have 36 apples. * The river is still near the big city, as it's not explicitly stated that the river has moved or changed location. >>> /exit ``` ``` (base) igor@macIgor ~ % ollama run llama3.1 >>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result. ... ... ... I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the ... coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coi ... ns but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apple ... ... s do I have? And where is the river? Here are the steps rewritten to focus on the mathematical result: **Step 1: Initial Apple Count** I start with 10 apples. **Step 2: Coin Discovery** I find 3 gold coins in a location (the river) near a city, but this information is irrelevant for calculating the number of apples. We'll denote the total coin count as `coins = 3`. **Step 3: Apple Loss and Coin Gain** I lose 4 apples, reducing my apple count to `apples = 10 - 4 = 6`. I also gain a gold coin, increasing my coin count to `coins = 3 + 1 = 4`. **Step 4: Bird-Related Apple Gain** Three birds drop 6 apples each, so the total number of apples gained is `3 * 6 = 18`. My new apple count is `apples = 6 + 18 = 24`. **Step 5: Online Game Result** I win 6 gold coins, but I must share them equally with my 2 teammates. This means I get only 2 of the 6 coins, increasing my coin count to `coins = 4 + 2 = 6`. The number of apples remains unchanged for now. **Step 6: Apple Purchase** I buy apples for all the coins I have, and since each apple costs 0.5 coins, I can afford `coins / 0.5 = 12` apples. My new apple count is `apples = 24 + 12 = 36`. The rewritten steps now focus on the mathematical progression of apple counts, making it easier for a language model to calculate the final answer. ``` The new version of llama3.1 is not more broken than Llama 3. Tell us if you have other doubts. On my side, I think that this issue can be closed as resolve since the main point was the update of the llama3.1 model.
Author
Owner

@bopm commented on GitHub (Aug 12, 2024):

It's not working even with such prompt:

ollama run llama3.1
pulling manifest
pulling 8eeb52dfb3bb... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB
pulling 11ce4ee3e170... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB
pulling 0ba8f0e314b4... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  12 KB
pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏   96 B
pulling 1a4c3c319823... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏  485 B
verifying sha256 digest
writing manifest
removing any unused layers
success
>>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each.
...  I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?
You start with 10 apples, find 3 gold coins in a river (but we don't know which river), lose 4 apples, gain 1 coin, and are given 18 more apples by birds (6 x 3). You then win 6 gold coins online but have to share them with teammates. This means you
get 6 / 3 = 2 gold coins.

So now we have a list of all the changes:

- Started with 10 apples.
- Lost 4, so 10 - 4 = 6
- Gained 1 apple, so 6 + 1 = 7
- Got 18 from birds, so 7 + 18 = 25
- Then you won 2 gold coins, which you can buy 2 / 0.5 = 4 more apples with.
This means that now we have 25 + 4 = 29 apples.

There are many rivers near big cities all over the world, so it's hard to figure out exactly where this river is.

>>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result.
Here are the steps rewritten to emphasize the mathematical operations:

**Step 1:** Initial condition: Number of apples = 10
No change in apple count.

**Step 2:** Find gold coins in river.
New information: Gold coins = 3, Apples remain unchanged.

**Step 3:** Lose 4 apples from initial amount.
Resulting apple count = Initial apple count - Lost apples = 10 - 4 = 6

**Step 4:** Gain 1 additional apple.
New apple count = Previous apple count + Gained apples = 6 + 1 = 7

**Step 5:** Receive 18 apples from birds.
New apple count = Previous apple count + Received apples = 7 + 18 = 25

**Step 6:** Win gold coins in online game, but must share equally with teammates.
Net gain of gold coins = 6 / 3 = 2 (shared among 3 people)

**Step 7:** Purchase additional apples with net gain of gold coins.
Number of new apples = Net gain of gold coins / Coin value per apple = 2 / 0.5 = 4

**Step 8:** Calculate final number of apples.
Final number of apples = Previous apple count + New apples purchased = 25 + 4 = 29

>>> Send a message (/? for help)

Now if I feed same model to llama.cpp it hallucinating before specific prompt, but not after.

> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? \
Let's break down the information step by step:

1. You have 10 apples.
2. You find 3 gold coins in the bottom of a river.
3. You lose 4 apples but gain 1 gold coin. Now you have:
	* 10 - 4 = 6 apples
	* 3 (initial gold coins) + 1 (gained gold coin) = 4 gold coins
4. Three birds drop 6 apples each, so you gain 18 apples. Now you have:
	* 6 (initial apples) + 18 (gained apples) = 24 apples
	* 4 gold coins (no change)
5. You win 6 gold coins in the game, but share them equally with 2 teammates, so you gain 3 gold coins (half of 6). Now you have:
	* 24 apples (no change)
	* 4 (initial gold coins) + 3 (gained gold coins) = 7 gold coins
6. You buy apples for all the gold coins you have, and the price of an apple is 0.5 coins. You can buy 7 / 0.5 = 14 apples with the 7 gold coins. Now you have:
	* 24 (initial apples) + 14 (bought apples) = 38 apples
	* 0 gold coins (since you spent them all)

So, you have 38 apples.

As for the river, it's implied that you can spend the gold coins in the city near the river, which has something to do with coins. This makes me think of a city that has a lot of casinos and a reputation for being a place where people spend their coins. A good guess for the city would be Las Vegas.

> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result.
I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?\
Here are the rewritten steps:

**Step 1: Initial Apple Count**
I have 10 apples.

**Step 2: Initial Gold Coin Count**
I find 3 gold coins in the bottom of a river.

**Step 3: Apple and Gold Coin Update**
I lose 4 apples, which leaves me with 10 - 4 = 6 apples.
I gain 1 gold coin, which brings my total to 3 (initial gold coins) + 1 = 4 gold coins.

**Step 4: Apple Gain**
Three birds drop 6 apples each, adding 3 x 6 = 18 apples to my total.
Now I have 6 (initial apples) + 18 (gained apples) = 24 apples.
My gold coin count remains the same: 4 gold coins.

**Step 5: Gold Coin Share and Update**
I win 6 gold coins in an online game, but I share them equally with 2 teammates, so I gain 6 / 3 = 2 gold coins.
My new gold coin count is 4 (initial gold coins) + 2 (gained gold coins) = 6 gold coins.
My apple count remains the same: 24 apples.

**Step 6: Apple Purchase**
I buy apples for all the gold coins I have, and the price of an apple is 0.5 coins.
I can buy 6 / 0.5 = 12 apples with the 6 gold coins.
My new apple count is 24 (initial apples) + 12 (bought apples) = 36 apples.
My gold coin count is now 0, since I spent them all.

**Final Question: Apple Count**
How many apples do I have? (Answer: 36)

**Final Question: River Location**
Where is the river? (Answer: Unknown, but implied to be near a city related to gold coins)

And what is important for me, is that last Friday before I repulled model today, it was working flawlessly without any specific prompts for me. Unfortunately, I do not have any logs of that.

<!-- gh-comment-id:2284863466 --> @bopm commented on GitHub (Aug 12, 2024): It's not working even with such prompt: ``` ollama run llama3.1 pulling manifest pulling 8eeb52dfb3bb... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB pulling 11ce4ee3e170... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.7 KB pulling 0ba8f0e314b4... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 12 KB pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 96 B pulling 1a4c3c319823... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 485 B verifying sha256 digest writing manifest removing any unused layers success >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. ... I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? You start with 10 apples, find 3 gold coins in a river (but we don't know which river), lose 4 apples, gain 1 coin, and are given 18 more apples by birds (6 x 3). You then win 6 gold coins online but have to share them with teammates. This means you get 6 / 3 = 2 gold coins. So now we have a list of all the changes: - Started with 10 apples. - Lost 4, so 10 - 4 = 6 - Gained 1 apple, so 6 + 1 = 7 - Got 18 from birds, so 7 + 18 = 25 - Then you won 2 gold coins, which you can buy 2 / 0.5 = 4 more apples with. This means that now we have 25 + 4 = 29 apples. There are many rivers near big cities all over the world, so it's hard to figure out exactly where this river is. >>> Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result. Here are the steps rewritten to emphasize the mathematical operations: **Step 1:** Initial condition: Number of apples = 10 No change in apple count. **Step 2:** Find gold coins in river. New information: Gold coins = 3, Apples remain unchanged. **Step 3:** Lose 4 apples from initial amount. Resulting apple count = Initial apple count - Lost apples = 10 - 4 = 6 **Step 4:** Gain 1 additional apple. New apple count = Previous apple count + Gained apples = 6 + 1 = 7 **Step 5:** Receive 18 apples from birds. New apple count = Previous apple count + Received apples = 7 + 18 = 25 **Step 6:** Win gold coins in online game, but must share equally with teammates. Net gain of gold coins = 6 / 3 = 2 (shared among 3 people) **Step 7:** Purchase additional apples with net gain of gold coins. Number of new apples = Net gain of gold coins / Coin value per apple = 2 / 0.5 = 4 **Step 8:** Calculate final number of apples. Final number of apples = Previous apple count + New apples purchased = 25 + 4 = 29 >>> Send a message (/? for help) ``` Now if I feed same model to llama.cpp it hallucinating before specific prompt, but not after. ``` > I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river? \ Let's break down the information step by step: 1. You have 10 apples. 2. You find 3 gold coins in the bottom of a river. 3. You lose 4 apples but gain 1 gold coin. Now you have: * 10 - 4 = 6 apples * 3 (initial gold coins) + 1 (gained gold coin) = 4 gold coins 4. Three birds drop 6 apples each, so you gain 18 apples. Now you have: * 6 (initial apples) + 18 (gained apples) = 24 apples * 4 gold coins (no change) 5. You win 6 gold coins in the game, but share them equally with 2 teammates, so you gain 3 gold coins (half of 6). Now you have: * 24 apples (no change) * 4 (initial gold coins) + 3 (gained gold coins) = 7 gold coins 6. You buy apples for all the gold coins you have, and the price of an apple is 0.5 coins. You can buy 7 / 0.5 = 14 apples with the 7 gold coins. Now you have: * 24 (initial apples) + 14 (bought apples) = 38 apples * 0 gold coins (since you spent them all) So, you have 38 apples. As for the river, it's implied that you can spend the gold coins in the city near the river, which has something to do with coins. This makes me think of a city that has a lot of casinos and a reputation for being a place where people spend their coins. A good guess for the city would be Las Vegas. > Can you carfully rewrite each step of this logical question in a way that another LLM can focus on the mathematic result. I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and drop 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the river?\ Here are the rewritten steps: **Step 1: Initial Apple Count** I have 10 apples. **Step 2: Initial Gold Coin Count** I find 3 gold coins in the bottom of a river. **Step 3: Apple and Gold Coin Update** I lose 4 apples, which leaves me with 10 - 4 = 6 apples. I gain 1 gold coin, which brings my total to 3 (initial gold coins) + 1 = 4 gold coins. **Step 4: Apple Gain** Three birds drop 6 apples each, adding 3 x 6 = 18 apples to my total. Now I have 6 (initial apples) + 18 (gained apples) = 24 apples. My gold coin count remains the same: 4 gold coins. **Step 5: Gold Coin Share and Update** I win 6 gold coins in an online game, but I share them equally with 2 teammates, so I gain 6 / 3 = 2 gold coins. My new gold coin count is 4 (initial gold coins) + 2 (gained gold coins) = 6 gold coins. My apple count remains the same: 24 apples. **Step 6: Apple Purchase** I buy apples for all the gold coins I have, and the price of an apple is 0.5 coins. I can buy 6 / 0.5 = 12 apples with the 6 gold coins. My new apple count is 24 (initial apples) + 12 (bought apples) = 36 apples. My gold coin count is now 0, since I spent them all. **Final Question: Apple Count** How many apples do I have? (Answer: 36) **Final Question: River Location** Where is the river? (Answer: Unknown, but implied to be near a city related to gold coins) ``` And what is important for me, is that last Friday before I repulled model today, it was working flawlessly without any specific prompts for me. Unfortunately, I do not have any logs of that.
Author
Owner

@YueChenkkk commented on GitHub (Sep 4, 2024):

I also can't seem to import Llama 3.1 models that I downloaded from Hugging Face, not sure if it's related?

[user@1.2.3.4 demo-llm]$ docker exec -it ollama ollama create llama3.1:8b-instruct -f /my-model-configs/llama-3.1-8b-instruct
transferring model data
converting model
Error: proto: cannot parse invalid wire-format data
huggingface-cli download --token "hf_REMOVED" \
  meta-llama/Meta-Llama-3.1-8B-Instruct \
  --local-dir /llama-models/Meta-Llama-3.1-8B-Instruct \
  --local-dir-use-symlinks False

llama-3.1-8b-instruct:

FROM /llama-models/Meta-Llama-3.1-8B-Instruct

I have the same issue, did you solve it?

<!-- gh-comment-id:2328055169 --> @YueChenkkk commented on GitHub (Sep 4, 2024): > I also can't seem to import Llama 3.1 models that I downloaded from Hugging Face, not sure if it's related? > > ``` > [user@1.2.3.4 demo-llm]$ docker exec -it ollama ollama create llama3.1:8b-instruct -f /my-model-configs/llama-3.1-8b-instruct > transferring model data > converting model > Error: proto: cannot parse invalid wire-format data > ``` > > ```shell > huggingface-cli download --token "hf_REMOVED" \ > meta-llama/Meta-Llama-3.1-8B-Instruct \ > --local-dir /llama-models/Meta-Llama-3.1-8B-Instruct \ > --local-dir-use-symlinks False > ``` > > `llama-3.1-8b-instruct`: > > ``` > FROM /llama-models/Meta-Llama-3.1-8B-Instruct > ``` I have the same issue, did you solve it?
Author
Owner

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

@Manouchehri @YueChenkkk The invalid wire-format data issue should be fixed with the 0.3.8. The problem is that the HF model included both the safetensors and pytorch weights and Ollama was getting confused (the pytorch weights are in the original/ subdir). ollama create will only pass in the safetensors files, so it should be faster as well too.

<!-- gh-comment-id:2349761662 --> @pdevine commented on GitHub (Sep 13, 2024): @Manouchehri @YueChenkkk The `invalid wire-format data` issue should be fixed with the `0.3.8`. The problem is that the HF model included both the safetensors and pytorch weights and Ollama was getting confused (the pytorch weights are in the `original/` subdir). `ollama create` will only pass in the safetensors files, so it should be faster as well too.
Author
Owner

@pdevine commented on GitHub (Feb 12, 2025):

I think we can safely close this.

<!-- gh-comment-id:2654939503 --> @pdevine commented on GitHub (Feb 12, 2025): I think we can safely close this.
Author
Owner

@pdevine commented on GitHub (Feb 12, 2025):

Also, I would definitely recommend checking out some of the new reasoning models.

<!-- gh-comment-id:2654941464 --> @pdevine commented on GitHub (Feb 12, 2025): Also, I would definitely recommend checking out some of the new reasoning models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#29588