guinmoon / LLMFarm

llama and other large language models on iOS and MacOS offline using GGML library.
https://llmfarm.site
MIT License
1.05k stars 62 forks source link

Aya-23-8B gibberish if metal AND mmap turned on #77

Open mounta11n opened 1 week ago

mounta11n commented 1 week ago

Hi there, i wanted to run Aya-23-8B from cohere on the iPad pro 12,9“ M1, since Aya is an excellent multilingual llm. It turned out that it gives me gibberish whenever metal and mmap is turned on at the same time. I i tried it a lot of times with different configurations. It seems to be independent from which prompt format and other options. It it is only metla-AND-mmap dependent.

If metal=OFF and mmap=OFF, the time until first token is very long, but it gives me coherent answers, but very very slow (like ~0,15 t/s ).

If metal=OFF and mmap=ON, the time until first token is short (so seems mmap is really on) and it gives me coherent answers, but very very slow (like ~0,15 t/s ).

If metal=ON and mmap=OFF, it gives me coherent and correct answers at ~8 t/s.

If metal=ON AND mmap=ON, it spit out only gibberish, and interestingly much faster than the case before. Here I get 12 t/s for some reason.

—-

I have been using

—-

metal=off mmap=off

IMG_0645

metal=on mmap=on

IMG_0646

guinmoon commented 1 week ago

Hi. What version of LLMFarm are you using?

mounta11n commented 1 week ago

I tried it with:

savkinavmono commented 1 week ago

Hi. What prompt format are you using?

Try this:

<|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>