Nepedia
Back to Discover
Advanced Reader
💻

Large language model

technology Maturity 9-11 Next article →

A large language model, or LLM, is a sophisticated computational model designed for natural language processing. These models are built to handle tasks like language generation, summarization, translation, and reasoning.

The-Transformer-model-architecture
The-Transformer-model-architecture

Most powerful LLMs are generative pre-trained transformers, commonly known as GPTs. They function by using massive amounts of artificial intelligence parameters. These parameters allow the model to identify and replicate patterns found in human-written text. Because they learn from human data, they can reflect the complexities of natural language. However, they may also inherit inaccuracies or biases present in that original training data.

To process language, a model must first perform a step called tokenization.

The-Transformer-model-architecture
The-Transformer-model-architecture

Since machine learning algorithms process numbers rather than letters, text must be converted into a numerical format. First, the system decides on a vocabulary. It then assigns a unique integer index to each entry in that vocabulary. Finally, an embedding is associated with each index. One common method is byte-pair encoding, or BPE. This process starts with individual characters and merges the most frequent adjacent pairs into larger groups. This continues until a specific vocabulary size is reached. This method helps compress datasets for more efficient training.

Modern LLMs rely on a specific structure called the transformer architecture.

The-Transformer-model-architecture
The-Transformer-model-architecture

This architecture was introduced by Google researchers in the 2017 paper "Attention Is All You Need." Before transformers, researchers used recurrent neural networks or LSTM-based encoder-decoder architectures. Transformers are superior because they allow for more efficient parallelization. They can also handle longer contexts and scale better with massive data volumes. This architecture enables emergent behaviors, such as compositional reasoning and the ability to find specific data within huge sets. Some newer models even explore different structures like Mamba, which is a state space model.

Trends in AI training FLOP over time (2010-2025)
Trends in AI training FLOP over time (2010-2025)

The history of these models shows a rapid increase in complexity. In the early 1990s, IBM pioneered word alignment for machine translation. By 2001, smoothed n-gram models were trained on 300 million words. The 2010s saw a shift toward neural networks and word embeddings, such as Word2Vec in 2013. After the transformer breakthrough, BERT was introduced in 2018 as an encoder-only model. OpenAI later released the GPT series, starting with GPT-1 in 2018. GPT-2 gained attention in 2019, and GPT-3 arrived in 2020. The release of ChatGPT in 2022 brought these models into the public eye.

Estimated training cost of some AI models - 2024 AI index
Estimated training cost of some AI models - 2024 AI index

Training these models requires immense computational resources and financial investment. The cost of training has grown alongside the size of the models. In 2019, training the 1.5-billion-parameter GPT-2 cost approximately $50,000. By 2022, training the 540-billion-parameter PaLM model cost about $8 million. The Megatron-Turing NLG 530B model cost around $11 million in 2021. There is no official threshold for what makes a model "large," but the parameter counts continue to climb. For example, the DeepSeek R1 model released in 2025 features 671 billion parameters.

LLM emergent benchmarks
LLM emergent benchmarks

Researchers use benchmark evaluations to test a model's abilities. These tests measure reasoning, factual accuracy, safety, and alignment. However, optimizing a model just to pass a benchmark can be problematic. It might result in a model that follows benchmark outputs without gaining genuine, robust capabilities. To improve behavior, models undergo fine-tuning. This often involves instruction fine-tuning to help the model follow user commands. Another method is reinforcement learning from human feedback, or RLHF. This process shapes how the model responds to different prompts.

The number of publications about Large Language Models by year
The number of publications about Large Language Models by year

The field is also expanding through multimodality and open-weight models. Multimodal large language models, or MLLMs, can process more than just text. They can also understand or generate images, audio, and 3D meshes. Additionally, open-weight models like LLaMA, Mistral, and DeepSeek R1 are becoming more popular. These models allow for greater transparency and community participation. Researchers have found that community-driven contributions can improve model efficiency. This openness helps accelerate innovation and makes AI research more reproducible across the scientific community.

654 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (8)
File:The number of publications about Large Language Models by year.png
The number of publications about Large...
File:Trends_in_AI_training_FLOP_over_time_(2010-2025).svg
Trends_in_AI_training_FLOP_over_time_(2010...
File:Large-scale_AI_training_compute_(FLOP)_vs_Publication_date_(2017-2024).svg
Large-scale_AI_training_compute_(FLOP)_vs_...
File:The-Transformer-model-architecture.png
The-Transformer-model-architecture.png
File:Estimated_training_cost_of_some_AI_models_-_2024_AI_index.jpg
Estimated_training_cost_of_some_AI_models_...
File:Multiple attention heads.png
Multiple attention heads.png
File:LLM emergent benchmarks.png
LLM emergent benchmarks.png
File:Energy consumption per ChatGPT query compared to everyday electricity use.png
Energy consumption per ChatGPT query...
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.