What is "large" about a large model?
There is no agreed cutoff, but the term large language model (LLM) usually refers to decoder (or encoder–decoder) models pretrained on hundreds of billions to tens of trillions of tokens, with billions of parameters or more, and used through instructions and prompts rather than fine-tuning per task.
Pretraining data
Its main source is the web (Common Crawl and similar snapshots), together with books, Wikipedia, scientific papers and source code. The typical preparation pipeline:
- Text extraction from HTML, removing menus and ads.
- Language identification.
- Quality filters: rules (page length, symbol ratio, repeated words) or quality classifiers trained on reference "good" texts.
- Deduplication at the document and span level (MinHash, long-string matching). Lee et al. (2022) showed that deduplication reduces verbatim memorization and improves performance with less training.
- Removing personal data and harmful content.
- Decontamination: removing anything that matches benchmark test sets.
- Mixing: setting the share of each source and language.
Arabic: its share of the published web is small relative to its number of speakers, and much of it is low quality, duplicated or machine-translated. So Arabic models built their own corpora; some resorted to translating high-quality English texts into Arabic to increase the data (as in Jais), and to mixing Arabic with English and code.
Scaling laws
Kaplan et al. (2020) found that the test loss L decreases as a power law with each of the number of parameters N, the number of training tokens D and the compute C, when none of them is the bottleneck:
with small exponents (about 0.07–0.1), meaning a steady improvement every time we double the resources, across several orders of magnitude. Training compute is roughly estimated as:
The Chinchilla correction
Hoffmann et al. (2022) redid the experiments with a different methodology (training about 400 models with different sizes and data, tuning the learning-rate schedule for each training length), and found that the optimal size and the optimal data should grow in roughly the same proportion with compute: N_{\text{opt}} \propto C^{0.5} and D_{\text{opt}} \propto C^{0.5}. The common rule of thumb: about 20 tokens per parameter. They trained Chinchilla with 70 billion parameters on 1.4 trillion tokens, and it outperformed Gopher (280 billion) with roughly the same compute. The conclusion: many earlier models (including GPT-3) were data-starved relative to their size.
Beyond Chinchilla
Chinchilla computes the optimum for training only. But a model is used millions of times after training, and the cost of inference grows with its size. So LLaMA (2023) trained a 7-billion-parameter model on a trillion tokens, far more than the "optimum", to get a strong small model that is cheap to use. Most open models since then followed this approach (Llama 3, for example, was trained on more than 15 trillion tokens).
Emergent abilities: real or a measurement artifact?
Wei et al. (2022) described emergent abilities that appear suddenly beyond a certain size and are absent from smaller models (such as multi-step arithmetic). But Schaeffer et al. (2023) showed that many of these "jumps" disappear when a continuous metric is used instead of a discontinuous one such as exact match; that is, the improvement may be gradual while the metric makes it look sudden. The methodological lesson: the choice of metric shapes the conclusion.
Mixture of experts
Instead of a single feedforward network in each block, there are E "experts" (feedforward networks) and a router that chooses the best k of them for each token (usually 1 or 2):
So the total number of parameters is large, and the number active per token is small. Example: Mixtral 8x7B has about 47 billion total parameters and about 13 billion active per token (two experts out of eight). The challenges: balancing the load across experts (an extra balancing loss), and the memory needed to load all the experts.
Extending the context window
From 512 tokens in BERT to 2048 in GPT-3 to hundreds of thousands and more in recent models. The tools: rotary positional encoding with adjusted frequencies, continued training on long documents, and efficient attention. Caution: a long window does not mean all its parts are used equally; studies showed that models may benefit from information at the start and end of the context more than from the middle ("lost in the middle").
Infrastructure
Training a large model requires thousands of accelerators for weeks or months, with data parallelism, tensor parallelism and pipeline parallelism, mixed precision (BF16), checkpoints, and handling hardware failures and loss spikes. This explains why training large models is concentrated in a limited number of institutions.
Large Arabic models
- Jais (2023): 13 billion parameters, Arabic–English, with a balanced vocabulary.
- AceGPT (2024): adapting LLaMA 2 to Arabic through continued pretraining, instruction tuning and feedback that takes local values into account.
- ALLaM (2024): models from Saudi SDAIA that extend the vocabulary of an English model and train it on an Arabic–English mix, showing that "acquiring a second language" is possible without forgetting the first.
Their details are in the Models tab.
