News for hackers. Stuff that matters.
Re:Many options for running Mistral models in your terminal ... by kristianpaul on Monday December 18, 2023 @04:46PM (#38688806)
I run in Linux system it via cli using Ollama, very easy to setup

https://ollama.ai/library/mistral

curl https://ollama.ai/install.sh | sh

ollama run mistral:text

Re:Many options for running Mistral models in your terminal ... by traverseda on Monday December 18, 2023 @08:58PM (#38690899)
Huh, I've fought with a few of these things on my laptop, no nvidia GPU, limited ram, etc.

This actually worked as advertised.

Re:Many options for running Mistral models in your terminal ... by 3abiton on Monday December 18, 2023 @09:42PM (#38691152)
What's the performance like (quality and speed wise)?
Re:Many options for running Mistral models in your terminal ... by all2 on Monday December 18, 2023 @11:03PM (#38691675)
Mistral 7b is serviceable for short contexts. If you have a longer conversation, token generation can start to lag a lot.
Re:Many options for running Mistral models in your terminal ... by tarruda on Tuesday December 19, 2023 @02:12AM (#38692766)
Yesterday I tried mixtral 7bx8 running on the CPU. With an Intel 11th gen chip and 64gb DDR4 at 3200mhz, I got around 2-4 tokens/second in a small context, this gets progressively slower as the context grows.

You would get a much better experience with apple silicon and lots of RAM

Re:Many options for running Mistral models in your terminal ... by yobanate on Tuesday December 19, 2023 @04:06AM (#38693420)
Can confirm. My M3 Max gets about 22t/s, putting the bottleneck BKAC.
Re:Many options for running Mistral models in your terminal ... by 3abiton on Tuesday December 19, 2023 @10:18AM (#38696620)
That's 10x speed increase. What's the secret behind apple M3? Faster clocked RAMs? Specific AI hardware?
Re:Many options for running Mistral models in your terminal ... by bugglebeetle on Tuesday December 19, 2023 @12:44PM (#38698785)
Unified memory and optimizations in llama.cpp (which Ollama wraps).
Re:Many options for running Mistral models in your terminal ... by ithkuil on Tuesday December 19, 2023 @02:53PM (#38700624)
Is that using the GPU?
Re:Many options for running Mistral models in your terminal ... by bugglebeetle on Tuesday December 19, 2023 @03:35PM (#38701137)
It can be variably configured. There are details in the repo, but llama.cpp makes use of Metal.
Re:Many options for running Mistral models in your terminal ... by bugglebeetle on Monday December 18, 2023 @10:09PM (#38691323)
Yeah, I was surprised Ollama was not mentioned as it’s by far the easiest to get started with. If it only had real grammar support, I’d never have to use another library again (it has a JSON mode that generally works, however).
Re:Many options for running Mistral models in your terminal ... by Tomte on Tuesday December 19, 2023 @03:05AM (#38693068)
What is grammar support? I've seen that mentioned several times now. Does it allow to restrict the output to a given template, or am I totally wrong there?
Re:Many options for running Mistral models in your terminal ... by biwills on Tuesday December 19, 2023 @03:34AM (#38693227)
Yes. Here's a quick rundown of grammar in llama.cpp (link on the docs of faraday.dev which runs llama.cpp under the hood)

https://docs.faraday.dev/character-creation/grammars

Re:Many options for running Mistral models in your terminal ... by vunderba on Tuesday December 19, 2023 @02:41AM (#38692929)
I want to like Ollama, but I wish it didn't obfuscate the actual directives (full prompt) that it sends to the underlying model. Ollama uses a custom templatizing script in its Modelfiles to translate user input into the format that a specific model expects ([INST], etc), but it can be difficult to tell if it's working as expected because it won't show up in the logs at all.

Other than that it's a great project - very easy to get started and has a solid API implementation. I've got it running on both a Win 10 + WSL2 docker and on a Mac M1.

Re:Many options for running Mistral models in your terminal ... by coffeeri on Tuesday December 19, 2023 @05:18AM (#38693894)
You can bypass the templating in raw mode, by setting the request parameter `raw` to true.

https://github.com/jmorganca/ollama/blob/main/docs%2Fapi.md

Re:Many options for running Mistral models in your terminal ... by vunderba on Tuesday December 19, 2023 @12:58PM (#38699031)
yeah I guess I could compare the output at 0.0 temperature with same prompt using Modelfile and then after using raw mode with my best guess of how the modelfile is creating the raw data it's passing to Ollama.

I'd push a PR to the repo itself but I have zero experience with Go...

Re:Many options for running Mistral models in your terminal ... by giblaz on Tuesday December 19, 2023 @03:01AM (#38693042)
Ollama is great. I discovered it today while looking for a way to serve LLMs locally for my terminal command generator tool (cmdh: https://github.com/pgibler/cmdh) and was able to get it up and running and implement support for it very easily.