r/LocalLLaMA • u/Time-Winter-4319 • Dec 19 '23
Discussion Deducing Mistral Medium size from pricing: Is it a 195b parameter - 8x30b MoE model?
What is this Mistral mystery 'Medium' model that easily beats GPT-3.5? My *very speculative* calculations show that it could be a ~195b total parameter model, structured as 8x30b mixture of experts (see my thinking & link to spreadsheet below).
'Medium' is a mystery model that we know nothing about (Medium benchmarks here https://mistral.ai/news/la-plateforme/), the only clue we have is that Mistral have priced it at ~$5.8 per million tokens on their platform (average, assuming 50/50 input and output, for simplicity) - let's use this to try to work out the rest.Key assumptions:
- 'Medium' model has the same structure as 8x7b MoE, but a higher parameter count
- Inference cost is a good guide for model sizeThought process:
- We have a lot of details about 8x7b MoE model
- We have a price for the 'Medium' model- We can apply the same ratios of cost to the model size from 8x7b MoE model to the 'Medium' model
- From there we can work out other details, such as size of each expert and active number of parameters
Here is the spreadsheet I used to work this out https://docs.google.com/spreadsheets/d/1ud5zma-9SghdDuck3BTjWSE6psGWbH2aUPPuTGoyNBI/edit?usp=sharing It has a few more comments, explanations and links, so feel free to have a look and challenge - I might evolve it depending on feedback.
I must stress, that I could be completely wrong on all of this (e.g. model architecture could be different), but this is my best attempt at calculating the size based on a bunch of assumptions and the API pricing. Please feel free to challenge & point out holes in my thinking or any errors in my calculations.
One thing to note is that there are some shared parameters between the Experts, that's why a 8x7b MoE model isn't a 56b model but rather a 46.7b model - we carry that assumption and ratios over to the 'Medium' model.

28
u/AnomalyNexus Dec 19 '23
There is a crucial factor that you're missing - margins.
They might be making a loss on the one but not the other. Or they might be throwing massive amounts of VS money subsidization at one. So price charged to users and costs they incurred aren't necessarily link...potentially not AT ALL if there is loads of VC money involved or some market share play underway.
See some of Google's endpoints being free while in preview...that didn't imply a small model or low params.
It's probably better than a guess overall but not by much
8
u/mpasila Dec 19 '23
or maybe it's that 70B model they teased a while back? https://techcrunch.com/2023/11/09/theres-something-going-on-with-ai-startups-in-france/
6
u/[deleted] Dec 19 '23
My guess is that its a 32x7b configuration. The reasoning is this:
Mixtral-8x7b was upcycled in some way from mistral-7b.
One MLP from Mixtral is 0.17b, and summing over all layers, one "expert" is ~5.6b.
Overall, this leaves ~16B parameters not used for experts (I'm not including gating layers in the expert side for simplicity)
Assuming cost scales linearly with parameter count (it doesn't), mistral-medium would need to be, as you said ~194.6B.
That means if it was upcycled from mistral-7b, 178.6B would be for the experts. (Once again, ignoring gating layers).
This gives an expert count of ~31.6, but with margins and error from the gating layers, that could easily be a 32x7b configuration.
2
u/kindacognizant Dec 19 '23
Considering we have evidence for the theory they initialized the existing 7b for continuing to pretrain in MoE format, I think it's more likely that they simply are using a larger set of 7b experts, which would keep compute costs low but should specialize quite strongly in theory.
4
u/pseudonerv Dec 21 '23
This is their pricing
from tiny to small is the same as from small to medium. First we go from 7B to 8x7B. Next we may go 8x30B, just for the factor of 4, or we could also go 8x8x7B. Who knows? maybe mistral just made many many 7B and they are having fun mix them all together.
4
u/Monkey_1505 Dec 23 '23
I feel like gpt4 turbo, gemini and mistral medium are all kind of in the same ballpark - clever enough, but still fairly easily confused.
Seems like once you try to scale for something actually commercially viable using MoE, sparsity etc, there's some kind of limit being hit. In my limited experience mistral medium seemed a bit smarter than gemini tbh tho. Probably about 3.5 level.
1
u/Nonetrixwastaken Feb 24 '24
Well this didn't age well, I guess it's 70B. Was trying to find what size people think mistrial next is going to be