News for hackers. Stuff that matters.
Re:Visualize Mixtral Moe by wing-_-nuts on Friday December 22, 2023 @10:27AM (#38735024)
I do wonder, say one has 16 gb of vram and 64gb of ram. IIRC mixtral takes ~ 40gb total, if you were using it for creative writing or whatever could you load certain layers into gpu memory and certain layers into system ram? I wonder what the overall speed of this would be?
Re:Visualize Mixtral Moe by orost on Friday December 22, 2023 @12:35PM (#38736509)
You can partially offload with some backends (e.g. llama.cpp and derivatives) but speed gains from that don't come in until it's mostly offloaded. I have 8GB VRAM and it's not enough to get any boost on mixtral in Q8. 16GB might do better or it might not.

The speed is quite good even on CPU only though, I get 3.5 tokens per second with 6 cores and DDR5-6000. For comparison llama2-70B is less than 1 t/s on the same hardware in Q4. And, subjectively, Mixtral performs better.

Re:Visualize Mixtral Moe by joshhart on Friday December 22, 2023 @10:42AM (#38735167)
If you are making many requests in batch this works ok because you can shuffle the next layer in while the current one is processing a set of matrix multiplies. This takes it from being a memory bound problem to a flops bound problem. This really only works if you care about throughput and not latency.
Re:Visualize Mixtral Moe by gpderetta on Friday December 22, 2023 @10:54AM (#38735312)
I understand that for each token mixtral will only need two (of eight) submodels. I wonder if there is temporal locality and an LRU caching schema could be used.
Re:Visualize Mixtral Moe by Kubuxu on Friday December 22, 2023 @07:25PM (#38740416)
It is two out of eight at each layer, with 32 layers independent of each other. There are no eight "sub-models".

However, this raises a question: could a slightly more complex router use output layer n-1 to choose experts for layer n+1 (vs n and n+1 today)? This way, there is more time to load the needed experts for the n+1 layer.

Re:Visualize Mixtral Moe by EarthLaunch on Friday December 22, 2023 @11:11AM (#38735500)
I did this with 24GB VRAM and 32GB DDR5, using LM Studio, and it was about as fast as I could read. (I read fast but I'd have to run it again to guess the token rate.)

I'm upgrading to 96GB RAM now to run the larger models, but I do wonder whether it'll be slow when using proportionally less VRAM.

Re:Visualize Mixtral Moe by patrakov on Saturday December 23, 2023 @02:35AM (#38742390)
With a recent llama.cpp, Mixtral, when run using CPU only (8 threads), produces 4 tokens per second on a Dell Inspiron 7415 laptop with AMD Ryzen 7 5700U, upgraded to 64 GB of RAM. As this is an APU, even one layer is too much for the VRAM, so acceleration cannot be used.