AI

What '49 billion active' means if you plan to host a model yourself

A colleague sized a self hosted Mistral Large 4 at two graphics cards. It has about a trillion parameters, and mixture of experts is why both numbers are true.

Scroll

Tanvir had the sum on the whiteboard before most of us had found a chair. Mistral Large 4, 49 billion parameters, a byte each at 8 bits, so call it 50 gigabytes of memory. Two decent cards, he said, maybe one if we were feeling brave. Someone from finance asked whether this meant we could stop paying for the API, and Tanvir said yes, more or less, give it a quarter.

I wrote "2 GPUs?" in my notebook, with the question mark, which is about as far as I go in a planning meeting when I'm not sure of my ground. And I wasn't. I thought he'd forgotten the memory a long conversation eats up while the model is running, and I was going to bring it up afterwards over tea. That turned out to be the least of it.

The 49 billion was right, as far as it went. It's the number of parameters Mistral Large 4 uses for each token, according to Mistral's launch post. The model has about a trillion in total. (The documentation says 52 billion active, not 49, and as one report noted, neither page has been corrected. I've used 49 here because it's the launch post's figure, but I couldn't tell you which one an engineer at Mistral would put on a whiteboard.) Tanvir had read the launch post. So had I. Neither of us had stopped on the word "active", which in hindsight was the only word in the sentence doing anything.

So that evening I went and read the paper people point to, which is from 2017, where Noam Shazeer and colleagues describe a sparsely gated layer. The idea is that a network can hold an enormous number of parameters and only use a few of them for any given piece of input. There's a small router inside the model. It looks at each token as it comes through and sends it off to a handful of specialist sub networks, which the paper calls experts, and the rest of the experts sit there doing nothing for that token. The next token might go somewhere else entirely. Add it up and you get a model that owns a trillion parameters and spends about 49 billion of them on each token, which is how both of the numbers in the launch post can be true at once and how a perfectly reasonable person can read one of them and size a server off it.

What the experts are actually expert in, I don't know. I asked Tanvir the next day and he said "it's not like that, it's not one for maths and one for poetry," and then went to get his tea before I could ask what it was like.

The picture that made it stick for me was a polyclinic, the kind you find three of on any road in Dhanmondi. It has forty doctors on its books. You go in with a bad knee and you see two of them. The other 38 still have rooms with the AC running, and they have to be in the building in case the next patient through the door needs one of them. The consulting time is the compute, and the building, which you pay for whether anyone is sitting in it or not, is the memory.

(These places also hand you a token when you arrive, a laminated card with a number on it, and I notice that's a slightly too convenient coincidence for this post. I'm leaving it alone.)

So speed and the electricity bill follow the 49 billion, which is why these models can be cheap to serve at scale. Memory follows the trillion. Every expert has to be loaded and sitting ready on the hardware, because the router might pick any of them for the next token and you can't go and fetch one from a disk in the middle of a sentence. At 8 bits per parameter a trillion parameters is about a terabyte. At 4 bits it's roughly half that. Either way it's a rack of expensive accelerators, and Tanvir's two cards were out by a factor of about twenty. Moonshot's Kimi K3 is bigger again, at about 2.7 trillion, which roughly triples the bill for the building.

When I showed him, he did the arithmetic again on the back of the agenda and said "oh," and after a bit, "so it's quick, it's just huge," which is a fair summary and shorter than mine.

It bothers me how the word open gets used in these meetings, as if it meant small enough for us. Some open models are. Nace.AI's Drex Max v1 is a 27 billion parameter dense model that a 24 gigabyte Mac can run, so every parameter does work on every token and what you see on the label is roughly what you need in memory. One person can try that over a weekend. The trillion parameter models are open in the sense that you're allowed to download them. Whether you can do anything with them depends on whether you own the building.