AI
What Is an AI Model? A Plain Explanation
What is an AI model? A plain explanation of weights, training and inference, the main types, real examples and sizes, and how models differ from AI apps.
What is an AI model? An AI model is a program that has learned patterns from data and uses them to make predictions or generate content. Instead of following rules a programmer wrote by hand, it follows rules it worked out itself during training, stored as millions or billions of numbers called weights (or parameters). Give it an input (an email, a photo, a question) and it produces an output (spam or not, "cat", an answer).
Every AI model has two parts: an architecture, which is the structure of the calculation, and the weights, the learned numbers that fill that structure in. The architecture is like an empty form; training fills in the numbers. A model is trained once, which is expensive, and then used many times to make predictions, which is called inference.
This guide explains what a model actually is, how it learns with a tiny worked example, the main types, real examples and sizes, how models relate to apps such as chatbots, and the key terms you'll meet.
AI Model at a Glance
| Term | Plain meaning |
|---|---|
| Model | A learned function that maps inputs to outputs |
| Architecture | The structure of the calculation (layers and how they connect) |
| Weights / parameters | The learned numbers inside the model |
| Training | Adjusting the weights so outputs match examples in the data |
| Inference | Using a trained model to make predictions on new inputs |
| Dataset | The examples the model learns from |
| Loss | A score of how wrong the model's outputs are during training |
| Model file | The saved weights, often gigabytes in size, plus configuration |
| Foundation model | A large model trained on broad data, then adapted to many tasks |
| AI system or app | A product that wraps one or more models with data, rules and an interface |
How an AI Model Works
At its core, a model is a mathematical function: output = f(input, weights). Everything the model "knows" lives in the weights.
Inputs are first turned into numbers. Text is split into tokens and each token is mapped to a list of numbers; an image becomes a grid of pixel values; a spreadsheet row is already numbers. The model then multiplies and adds those numbers with its weights, often through many layers, and turns the result into an output: a probability, a category, a number or the next word in a sentence.
A tiny worked example
Imagine a model that estimates house prices, in thousands, from two inputs: floor area in square metres and number of bedrooms. A simple linear model has three weights:
price = (w₁ × area) + (w₂ × bedrooms) + b
Training on past sales might find w₁ = 3, w₂ = 10 and b = 50. For a 100 m² house with 3 bedrooms:
price = (3 × 100) + (10 × 3) + 50 = 380
| House | Area (m²) | Bedrooms | Predicted price | Actual sale price | Error |
|---|---|---|---|---|---|
| A | 100 | 3 | 380 | 390 | −10 |
| B | 70 | 2 | 280 | 270 | +10 |
| C | 140 | 4 | 510 | 505 | +5 |
That's a complete AI model with three parameters. A large language model works on the same principle, predicting the next token instead of a price, but with billions of weights arranged in many layers, and the ability to capture far subtler patterns.
How training finds the weights
Training starts with random weights. The model makes predictions on training examples, a loss function measures how wrong they are, and an optimisation method (usually gradient descent) nudges every weight slightly in the direction that reduces the error. Repeat this millions of times over the dataset, and the weights settle into values that work. Our guide on how to train an AI model walks through the process in practice.
Once trained, the weights are frozen and saved. Inference is just running the function with those saved weights on new inputs. That's why a model trained on enormous computing clusters can still answer a question in a second.
What Is an AI Model Weight?
What is an AI model weight? A weight is a single learned number in the model. In the house example, w₁ = 3 is a weight: it says each extra square metre adds 3 to the price. In a neural network, each weight controls how strongly one unit influences another. "Parameters" usually means the weights plus a few other learned values (such as biases), and the two terms are often used interchangeably.
The number of parameters is the usual measure of a model's size. More parameters let a model represent more complex patterns, but need more data, more compute to train and more memory to run. Our guide to model parameters explains them in more depth.
Because each weight is stored as a number, the size of a model file is roughly parameters × bytes per parameter. Common formats use 4 bytes (32-bit floats), 2 bytes (16-bit, the usual choice for large models), 1 byte (8-bit) or half a byte (4-bit quantised):
| Model | Parameters | 32-bit | 16-bit | 8-bit | 4-bit |
|---|---|---|---|---|---|
| ResNet-50 (image classifier) | about 25.6 million | about 102 MB | about 51 MB | about 26 MB | about 13 MB |
| BERT-base (language understanding) | 110 million | 440 MB | 220 MB | 110 MB | 55 MB |
| Llama 3.1 8B | 8 billion | 32 GB | 16 GB | 8 GB | 4 GB |
| Llama 3.1 70B | 70 billion | 280 GB | 140 GB | 70 GB | 35 GB |
| GPT-3 | 175 billion | 700 GB | 350 GB | 175 GB | 88 GB |
| Llama 3.1 405B | 405 billion | 1,620 GB | 810 GB | 405 GB | 203 GB |
These are weights only. Running a model also needs memory for the inputs, intermediate results and, for language models, the cache that grows with conversation length.
AI Models Types
There's no single official list, so it helps to group AI models types along four separate questions.
By how they learn
| Learning type | Learns from | Example task |
|---|---|---|
| Supervised | Labelled examples (input and correct answer) | Spam detection, price prediction, image classification |
| Unsupervised | Unlabelled data, finding structure | Customer segmentation, anomaly detection |
| Self-supervised | Raw data, creating its own labels (for example, hiding a word and predicting it) | Pre-training language and vision models |
| Reinforcement learning | Rewards and penalties from actions | Game playing, robotics, tuning chatbots with feedback |
By architecture
- Linear and logistic regression: simple, fast and explainable, like the house example.
- Decision trees and gradient-boosted trees: strong on tables of data such as sales or fraud records.
- Convolutional neural networks (CNNs): built for images, by scanning for local patterns.
- Recurrent neural networks (RNNs): process sequences step by step; largely replaced by transformers for language.
- Transformers: use attention to relate every part of an input to every other part. They power large language models and many vision and audio models.
- Diffusion models: generate images, audio or video by learning to remove noise step by step.
By what they output
- Classification: picks a category (fraud or not, which animal).
- Regression: predicts a number (price, demand).
- Generative: creates new content (text, images, code, audio).
- Embedding: turns inputs into lists of numbers that capture meaning, used for search and recommendations.
By modality
Language models work with text, vision models with images, speech models with audio, and multimodal models combine several, for example reading an image and answering questions about it.
What Is an AI Model Example You Already Use?
What is an AI model example from everyday life? You probably use dozens of models every day without noticing:
| Where you meet it | Model type | What it does |
|---|---|---|
| Email spam filter | Classification | Labels each message spam or not |
| Phone keyboard | Language model | Predicts your next word |
| Photo app search | Vision and embedding models | Finds "dog" or "beach" in your photos |
| Streaming recommendations | Recommendation and embedding models | Ranks what to show you next |
| Bank fraud alerts | Gradient-boosted trees or neural networks | Scores each transaction for risk |
| Maps arrival times | Regression on traffic data | Predicts travel time |
| Chatbots | Large language models | Generate answers one token at a time |
| Voice assistants | Speech recognition plus language models | Turn speech into text and reply |
Well-known named models include GPT and Claude (language), Llama (open-weight language), BERT (language understanding), ResNet (image classification) and Stable Diffusion (image generation).
AI Models vs ML Models
On AI models vs ML models: in everyday use the terms overlap almost completely. Artificial intelligence is the broad goal of machines doing tasks that seem to need intelligence. Machine learning is the main way to get there today: systems that learn from data instead of following hand-written rules. Almost every "AI model" in use now is a machine learning model.
The distinction that remains:
- Some AI isn't machine learning. Rule-based expert systems and classic search algorithms, such as a chess engine's hand-tuned evaluation, are AI without learned weights.
- "AI model" often implies something bigger. People tend to say "ML model" for a fraud classifier and "AI model" for a large language or image model, but that's habit, not a technical rule.
- Deep learning is the subset of machine learning that uses many-layered neural networks.
Our guide to AI vs machine learning covers the relationship in more detail.
Model vs Algorithm vs AI App
Three terms often get mixed up:
| Term | What it is | Example |
|---|---|---|
| Algorithm | The method used to learn or compute | Gradient descent; the transformer recipe |
| Model | The trained result: architecture plus learned weights | A specific trained language model |
| AI app or system | A product built around one or more models | A chatbot with a model, a search tool, safety filters and a chat interface |
When you use a chatbot, you're using an app. Behind it, the model does the core prediction, while other software handles your account, conversation history, file uploads, web search and safety checks.
Open-Weight vs Closed Models
- Open-weight models publish their weight files, so anyone can download and run them on their own hardware, subject to the licence. Examples include the Llama family and many smaller models.
- Closed models keep their weights private and are available only through an app or API.
Open weights give you control, privacy and the ability to fine-tune; closed models are often the most capable and need no hardware of your own. "Open weights" isn't the same as fully open source: the training data and code are often not released.
Foundation Models and Fine-Tuning
A foundation model is a large model trained on broad data, such as huge amounts of text or images, that can be adapted to many tasks. Rather than train from scratch, most teams start from a foundation model and:
- Prompt it, giving instructions and examples in the input.
- Fine-tune it, continuing training on a smaller, specific dataset so its weights adapt.
- Connect it to data, retrieving relevant documents at query time so it can answer about information it wasn't trained on.
How Models Are Evaluated
A model that scores well on its training data might simply have memorised it. To check that it generalises, data is split into three parts:
- Training set: used to adjust the weights.
- Validation set: used during development to compare versions and tune settings.
- Test set: held back until the end, for a final, honest score.
The right score depends on the task:
| Task | Common metrics | What they tell you |
|---|---|---|
| Classification | Accuracy, precision, recall, F1 | How often it's right, and which kinds of mistakes it makes |
| Regression | Mean absolute error, root mean squared error | How far predictions are from true values on average |
| Ranking and search | Precision at k, NDCG | Whether the best results come first |
| Language models | Perplexity, benchmark scores, human ratings | How well it predicts text and solves tasks people care about |
In the house example, the mean absolute error across the three houses is (10 + 10 + 5) ÷ 3 ≈ 8.3 thousand. For a real deployment you'd measure that on houses the model never saw during training.
Where Models Run
A trained model is a file, and it can run in three broad places:
- In the cloud, through an API. You send inputs over the internet and get outputs back. No hardware to manage; you pay per use.
- On your own servers. You download open weights and run them on GPUs you rent or own. More control and privacy, more work.
- On the device. Small models run directly on phones and laptops, for features such as keyboard prediction, photo search and offline transcription.
Model files come in a few common formats: safetensors (a safe, widely used format for weights), GGUF (popular for running quantised language models locally), ONNX (a cross-framework format for deployment) and framework-specific checkpoints such as PyTorch files.
Limits of AI Models
- They learn patterns, not facts. Language models can state false things confidently.
- They reflect their data. Gaps or biases in training data show up in outputs.
- They don't update themselves. A trained model's knowledge stops at its training data unless it's retrained or given fresh information.
- They can fail on unfamiliar inputs. Performance drops when real data differs from training data.
- They're hard to inspect. Billions of weights don't explain themselves.
FAQ
Is ChatGPT an AI model?
ChatGPT is an app. It runs on large language models (the GPT family), plus other software for conversation, tools and safety.
What is the difference between an AI model and an algorithm?
An algorithm is the method; a model is the trained result. Gradient descent is an algorithm; the weights it produces, in a given architecture, form the model.
How big is an AI model?
From a few parameters to hundreds of billions. A 16-bit model takes about 2 bytes per parameter, so an 8-billion-parameter model needs roughly 16 GB just for its weights.
Can I run an AI model on my own computer?
Yes, smaller open-weight models run on laptops and desktops, especially when quantised to 8 or 4 bits. Large models need powerful GPUs or servers.
How long does it take to train an AI model?
From seconds for a small model on a spreadsheet to months on thousands of GPUs for the largest language models.