Ask HN: GPT-4 has 1.7T parameters. What's a parameter?
Hi folks, AI newbie here.
Can those of you that are well versed in AI please help me understand what exactly constitutes a parameter?
I often see LLMs being compared / ranked based on their number of parameters, so I'm hoping to better understand this metric.
I have a rudimentary understanding of artificial neural networks (in terms of inputs -> functions -> outputs), and by extension, a very basic understanding of deep learning.
But when it comes to defining a parameter, my google searches thus far have led me to concepts such as 'AI model behaviour' and 'adjustable settings' which, whilst interesting, are still too complex for me to distil into simple terms.
If I were to explain what a parameter is to my child, what might I say?
Thanks!
9 comments
[ 3.6 ms ] story [ 30.9 ms ] threada, b and c are parameters. So this is a model with 3 parameters. Keep adding parameters and chaining various operations on large inputs f(g(h(...) until 1.7T.
I have a basic grasp of algebra (including quadratic functions such as in your example).
So am I on the right track in extrapolating this to say that LLM parameters are the adjustable coefficients and constants in the chain of functions?
Here, (a_1, a_2, ..., a_n, b) are trainable, i.e. adjustable, parameters. (x_1, x_2, ..., x_n) are the inputs to the neuron. y is its output. Because linear functions are inflexible, neurons typically pass the output y to a non-linear function. The classical non-linear function is a sigmoid, but there are many choices. So you have z = sigmoid(y) = sigmoid(ax + b) = sigmoid(a_1 * x_1 + a_2 * x_2 + ... a_n * x_n + b). These non-linear functions usually have no trainable parameters.
Such a structure, a linear function composed with a non-linear function is the cornerstone of modern statistics, where it is called a generalized linear model (GLM). Hence, neural networks are just many GLMs or neurons grouped into layers, with layers connected to each other.
>GPT-4 has 1.7T parameters
That's a rumored parameter count. OpenAI has not released technical details of any of their newer models.
"Parameters are coefficients inside the model that are adjusted by the training procedure. The dataset is what you train the model on. Language models are trained with tokens that are subword units (e.g. prefix, root, suffix)."
His comment on GPT-4 parameters count
"Also: a model with more parameters is not necessarily better. It's generally more expensive to run and requires more RAM than a single GPU card can have. GPT-4 is rumored to be a "mixture of experts", i.e. a neural net consisting of multiple specialized modules, only one of which is run on any particular prompt. So the effective number of parameters used at any one time is smaller than the total number."
In the context of transformer language models, that includes the weights and biases in the feed-forward layers, as well as the input embeddings, positional encodings, and transformers query, key, and value matrixes.