News for hackers. Stuff that matters.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by ignoramous on Monday January 08, 2024 @11:37PM (#38922391)
> the newer Apple Silicon Macs with unified memory

Mixtral has been MLXd already? Write ups, if any?

Re:Mixtral 8x7B: A sparse Mixture of Experts language model by vessenes on Tuesday January 09, 2024 @12:29AM (#38922697)
Yes it has, actually: https://github.com/ml-explore/mlx-examples. It's right in the main repo. NB, I haven't tried this, I'm using llama.cpp with a non-K-quant quantization on my MBP.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by summarity on Tuesday January 09, 2024 @05:19AM (#38924403)
I have and don't consider MLX to be production ready. I've tested it on M1Max and M1Ultra (128) machines. It's completely non-deterministic in its resource consumption, sometimes using the GPU fully, sometimes getting seemingly stuck while processing, sometimes the GPU throttles.

However, there's one curious thing: llama.cpp _always_ leads to GPU throttling on Apple Silicon (e.g. the M1Max GPU will go from 1200MHz to around 700MHz), and then fully saturates it. In the rare cases I could get MLX to stay on the GPU, it was able to keep it at the maximum clock rate. However the unpredictable pauses and seemingly unoptimized prompt processing makes it hard to pick a winner in end-to-end tokens/s

Re:Mixtral 8x7B: A sparse Mixture of Experts language model by LoganDark on Monday January 08, 2024 @11:42PM (#38922421)
Not to my knowledge. But because the unified memory doubles as VRAM for the onboard GPU, normal GPU acceleration can access the entire model even if it's 50+ GB. That's why ASi Macs are currently the holy grail for at-home inferencing, and also why projects like llama.cpp focus so much on ASi above all else, and why so many UIs release for macOS first before other operating systems. Certain Mac models offer up to 192GB of unified memory.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by mkesper on Tuesday January 09, 2024 @02:32AM (#38923414)
But that's not a Macbook. And a Macbook M3Max with 128GB of RAM is almost 8000€.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by zarzavat on Tuesday January 09, 2024 @08:25AM (#38925887)
Considering how inaccessible and expensive 128GB of pro-level cards is, that is believe it or not, a good price.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by LoganDark on Tuesday January 09, 2024 @06:28PM (#38933847)
Not to mention that's 128GB for a single GPU. No need to shard or split.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by Terretta on Tuesday January 09, 2024 @07:14AM (#38925244)
Many options for running Mistral models in your terminal using LLM:

https://simonwillison.net/2023/Dec/18/mistral/

I liked "Using Llamafile’s OpenAI API endpoint" described there, using Justine Tunney's llamafiles for Mixtral, but the article link is out of date, as the models have been replaced with newer: https://huggingface.co/jartine

Re:Mixtral 8x7B: A sparse Mixture of Experts language model by reexpressionist on Tuesday January 09, 2024 @09:02AM (#38926263)
Here's the direct link and I can confirm that Mixtral-8x7B-v0.1 works on M2 Ultra 128GB via MLX and is easy to setup (the longest part is just downloading the weights):

https://github.com/ml-explore/mlx-examples/tree/main/llms/mi...

We'll have a tutorial soon (next week) on combining/composing with Reexpress to add uncertainty quantification (and to use it for semantic search). A link will be here: Tutorial 6: https://re.express/guide.html

Re:Mixtral 8x7B: A sparse Mixture of Experts language model by teilo on Tuesday January 09, 2024 @09:22AM (#38926481)
I'm running it on an M2 Max with 96GB, and have plenty of room to spare. And it's fast. Faster than I can get responses from ChatGPT.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by coder543 on Tuesday January 09, 2024 @10:09AM (#38927012)
How many tokens/s? Which quantization? If you could test Q4KM and Q3KM, it would be interesting to hear how the M2 Max does!
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by teilo on Tuesday January 09, 2024 @06:22PM (#38933788)
No quantization (8_0). The full 48GB model. As for token count, I haven't tested it on more than 200 or so.
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by pilotneko on Tuesday January 09, 2024 @07:39PM (#38934549)
Isn’t 8_0 8-bit quantization?
Re:Mixtral 8x7B: A sparse Mixture of Experts language model by teilo on Thursday January 11, 2024 @10:34AM (#38953594)
Sorry. That was a major brain fart. Yes. 8-bit quantization, and using 49G of RAM.