If we define hyperparameters of an LLM transformer model as: D = dimension H = n heads L…
- User
If we define hyperparameters of an LLM transformer model as: D = dimension H = n heads L = n layers C = maximum context length in tokens V = vocabulary size P = the total number of weights in the model What is the formula for P with respect to other hyperparameters? If there are other important hyperparameters that weren't mentioned, feel free to define them. Or if there is no dependency on some hyperparameter, you can skip it.
We have the following data points: if (D = 4096, H = 32, L = 32) then P = 6.7 billion if (D = 5120, H = 40, L = 40) then P = 13 billion if (D = 6656, H = 52, L = 60) then P = 32.5 billion if (D = 8192, H = 64, L = 80) then P = 65.2 billion C and V are constant across all the data points: C = 2048 V = 32000
- Assistant
The total number of parameters ( P ) in a transformer-based language model can be calculated using the following formula:
[ P = V \times D + 12 \times L \times D^2 ]
Explanation of the Formula:
-
Embedding Parameters (( V \times D )):
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.