# What is an AI model? Types, examples and how models are created

> An AI model is a program whose behavior was learned from data rather than written by hand. Here is what that means in practice, the main types of AI models, how one gets made (with a short, tested Python example), and how many exist as of October 2026.

- URL: https://geeklyplug.com/blogs/what-is-an-ai-model/
- Author: Marcus Ellery, Founder and Editor
- Fact-checked by: Claire Whitfield, Senior Editor
- Topic: AI
- Published: 2026-10-30
- Updated: 2026-10-30

## Short answer

An AI model is a program that has learned to make predictions, decisions or new content from data instead of following rules a person wrote. Training adjusts its internal numbers, called parameters, until its outputs match the examples. The finished model is a file of those numbers plus the code to use them. LLMs, image generators and spam filters are all AI models.

"AI model" shows up in every product launch and news story, and it gets used for very different things: a chatbot, an image generator, the system that flags a suspicious card payment. Most explanations either stay vague ("a program that mimics human intelligence") or jump straight into neural network math, so the term never quite becomes concrete.

This guide makes it concrete. You will get a plain definition, the difference between a model, an algorithm and an app, how AI models are created step by step, a short Python example that trains a real model we ran ourselves, the main types of AI models with a comparison table, and a dated answer to how many AI models there are.

## What is an AI model?

**An AI model is a program whose behavior was learned from data instead of written as rules by a person.** IBM's definition is a good starting point: an AI model is ["a program that has been trained on a set of data"](https://www.ibm.com/think/topics/ai-model) to recognize certain patterns or make certain decisions without further human intervention. Google Cloud adds the part that makes models useful, saying training lets a model learn patterns so it can make predictions or decisions about [new data that it has never seen before](https://cloud.google.com/discover/what-is-an-ai-model).

Think of it as a function: something goes in, something comes out. A spam filter takes in an email and outputs "spam" or "not spam". A large language model takes in text and outputs the next piece of text. An image model takes in a prompt and outputs a picture. What makes these AI models rather than ordinary software is that nobody typed in the rules connecting input to output. The model worked them out from examples.

Those learned rules are stored as numbers called **parameters** (also called weights). Google's Machine Learning Crash Course describes a model's weight and bias as parameters that are ["calculated during training"](https://developers.google.com/machine-learning/crash-course/linear-regression). A small model might have two parameters. The Transformer models behind today's chatbots, Google's course notes, can contain [hundreds of billions or even trillions](https://developers.google.com/machine-learning/crash-course/llm/transformers) of them. Either way, the trained model is essentially a file of numbers plus the code that knows how to use them.

> **The one-line version**
>
> Algorithm + training data = AI model. The model is the set of learned numbers that turns new inputs into predictions, decisions or content.

## AI model vs algorithm vs app

These three words get swapped constantly, which is a big source of confusion. IBM draws the line clearly: an algorithm is a procedure that processes data, and a model is [the result of running an algorithm on a dataset](https://www.ibm.com/think/topics/ai-model). The app is a third layer on top: the product you actually use.

*Algorithm, model and app are three different things*

|  | What it is | Simple example | Chatbot example |
| --- | --- | --- | --- |
| Algorithm | The learning recipe: how to adjust numbers to fit data | Least-squares line fitting | Transformer training with next-token prediction |
| Model | The result of running that recipe on data: learned parameters you can save and reuse | A line that predicts delivery time from distance | A large language model such as GPT, Claude or Gemini |
| App or system | Software that wraps one or more models with an interface, data, tools and safety checks | A delivery app showing an arrival estimate | ChatGPT, the Claude apps, the Gemini app |

Keeping these apart helps you read the news. When a company "releases a new model", the learned parameters changed. When it "launches a new feature", the app around the model changed, and the model underneath may be exactly the same.

## How AI models are created

Whether the model is a spam filter or a chatbot, the basic lifecycle is the same. Google Cloud breaks training into data preparation, model selection, model training and hyperparameter tuning, followed by [testing, deployment and evaluation](https://cloud.google.com/discover/what-is-an-ai-model). In plain terms:

1. **Define the task.** What goes in and what should come out? "Email in, spam score out" is a task. "Make the business smarter" is not.
2. **Collect and prepare data.** Gather examples, clean them and, for many tasks, label them with the right answer. This is usually the slowest and most expensive step.
3. **Pick a model type.** A simple linear model, a decision tree, a neural network or a pre-trained model to adapt, depending on the task, the data and how explainable the result must be.
4. **Train it.** The algorithm shows the model examples, measures how wrong its outputs are and nudges the parameters to reduce that error, over and over.
5. **Tune and test.** Adjust training settings (hyperparameters), then check the model on data it never saw during training. A model that only does well on its training data has memorized rather than learned.
6. **Deploy and monitor.** Put the model behind an app or API, then keep measuring it, because the real world drifts away from the training data over time.

Step 5 guards against two classic failures that IBM describes: **overfitting**, where a model fits the noise in its training data and fails on new data, and **underfitting**, where it has not learned enough to be useful. IBM also notes that bias in training data can carry straight into a model's outputs, which is why data preparation matters as much as the algorithm.

### Foundation models: train once, adapt many times

Training a large model from scratch is expensive, so many teams start from a **foundation model**, a term introduced in a 2021 paper led by Rishi Bommasani for models ["trained on broad data at scale and are adaptable to a wide range of downstream tasks"](https://arxiv.org/abs/2108.07258). You take a pre-trained model and adapt it, through fine-tuning, prompting, or by feeding it your own documents at question time with [retrieval-augmented generation](https://geeklyplug.com/blogs/rag-in-ai/). Google Cloud likewise describes pre-trained models as a common starting point that can be fine-tuned for specific use cases.

## Train a real AI model in about 20 lines of Python

The quickest way to make "AI model" concrete is to create one. The script below uses scikit-learn, a widely used open-source machine learning library, to train a model that predicts food delivery time from distance. The six data points are made up for the demo. We ran it with Python 3.13 and scikit-learn 1.9.1, the current stable release as of October 2026.

```python
import pickle
from sklearn.linear_model import LinearRegression

# 1. Training data (made up for this demo): delivery distance in km -> minutes.
distance_km = [[1], [2], [3], [5], [8], [10]]
minutes = [14, 17, 21, 26, 36, 42]

# 2. Training: the algorithm (least squares) finds the numbers that fit best.
model = LinearRegression().fit(distance_km, minutes)

# 3. The trained model is just those learned numbers (its parameters).
print(f"slope: {model.coef_[0]:.2f} minutes per km")
print(f"intercept: {model.intercept_:.2f} minutes")

# 4. Inference: use the model on an input it has never seen.
print(f"prediction for 6 km: {model.predict([[6]])[0]:.1f} minutes")

# 5. A model is a file you can save, share and load somewhere else.
with open("delivery_model.pkl", "wb") as f:
    pickle.dump(model, f)
with open("delivery_model.pkl", "rb") as f:
    loaded = pickle.load(f)
print(f"loaded model, 6 km: {loaded.predict([[6]])[0]:.1f} minutes")
```

*tiny_model.py: train, inspect, use, save and reload a model (tested October 2026)*

After `pip install scikit-learn`, running `python3 tiny_model.py` printed exactly this:

```text
slope: 3.10 minutes per km
intercept: 11.00 minutes
prediction for 6 km: 29.6 minutes
loaded model, 6 km: 29.6 minutes
```

*Output*

That small script contains every idea from the sections above:

- **The algorithm is not the model.** `LinearRegression` is the recipe. Calling `.fit()` on the data produced the model.
- **The model is its parameters.** Everything this model learned is two numbers: about 11 minutes of fixed time plus 3.1 minutes per kilometer. Nobody wrote those numbers in; training found them.
- **Inference means using the model on new input.** No delivery in the data was 6 km, yet the model predicts 29.6 minutes. That is the "new data it has never seen" part of Google's definition.
- **A model is a portable file.** The saved `delivery_model.pkl` was 486 bytes on our machine, and the reloaded copy gives the same answer. Large language models work the same way in principle, just with up to hundreds of billions of parameters or more instead of two, which is why they need specialized hardware to run.

> **Only load model files you trust**
>
> Pickle files can run code when loaded. scikit-learn's [model persistence guide](https://scikit-learn.org/stable/model_persistence.html) warns you should never load a pickle file from an untrusted source, and points to safer formats such as skops and ONNX for sharing models. The same caution applies to model files downloaded from the internet.

## Different types of AI models

There is no single official list of AI model types, because models can be grouped several ways. The most useful grouping for most people is by what the model does. The table below covers the types you are most likely to meet.

*The main types of AI models and what they are used for*

| Type | How it works, briefly | Typical output | Everyday examples |
| --- | --- | --- | --- |
| Rule-based (symbolic) system | Follows if-then rules a person wrote; nothing is learned from data | A decision | Older expert systems, simple chatbots with fixed menus |
| Regression model | Learns a relationship between inputs and a number | A number | Price, demand or delivery-time estimates |
| Classification model | Learns boundaries between categories | A label or probability | Spam filters, fraud flags, loan risk scores |
| Clustering model | Finds groups in unlabeled data | Groups | Customer segmentation |
| Recommendation model | Learns what people with similar behavior chose | A ranked list | Streaming, shopping and news feeds |
| Computer vision model | Deep neural network trained on images | Labels, boxes or masks on an image | Photo search, defect detection, medical image triage |
| Speech model | Deep neural network trained on audio | Text from speech, or speech from text | Transcription, voice assistants |
| Large language model (LLM) | Transformer trained to predict the next token of text | Text, including code | ChatGPT, Claude, Gemini |
| Image generation (diffusion) model | Learns to turn random noise into an image step by step | New images or video | Text-to-image and text-to-video tools |
| Multimodal model | Handles more than one kind of input or output | Text, images, audio | Assistants that read screenshots or describe photos |

### Three other ways to sort AI models

- **By how they learn.** IBM lists three machine learning approaches: **supervised** learning from labeled examples, **unsupervised** learning that finds patterns without labels, and **reinforcement** learning through rewards and penalties. Rule-based AI sits outside all three because it does not learn from data.
- **By what they output.** Generative models learn what the data looks like and can create new examples; discriminative models learn to tell categories apart. Within prediction, IBM separates classification (discrete labels) from regression (continuous values). If you want the bigger picture of generative AI versus systems that act, see our explainer on [agentic AI vs generative AI](https://geeklyplug.com/blogs/agentic-ai-vs-generative-ai/).
- **By how you can access them.** Some models are only available through a company's API or app; others are published as open weights you can download and run yourself. Stanford's [2026 AI Index](https://hai.stanford.edu/assets/files/ai_index_report_2026_chapter_1_research_development.pdf) reports that API access was the most common release type in 2025, "with 47 of 102 models made available this way."

### AI image models: how diffusion works

Many of today's image generators are built on diffusion models. A key 2020 paper, ["Denoising Diffusion Probabilistic Models"](https://arxiv.org/abs/2006.11239) by Jonathan Ho, Ajay Jain and Pieter Abbeel, showed the technique could produce high-quality images. The idea is easier than the name suggests. During training, the model sees real images with increasing amounts of random noise added and learns to predict and remove that noise. To generate, it starts from pure noise and removes it step by step until an image appears. Text-to-image tools add your prompt as guidance at every step, so the noise resolves into the picture you described.

Not every AI image model generates pictures. Computer vision models do the opposite job: they take an existing image and say what is in it. Your phone's photo search and a factory's defect camera are image models too.

### Large language models

LLMs are the type most people now mean when they say "AI model". They are Transformer models trained on huge amounts of text to predict the next token, then tuned to follow instructions. We cover how they work, with a runnable demo, in [what does LLM stand for](https://geeklyplug.com/blogs/what-does-llm-stand-for/). The useful point here is that an LLM is just one row in the table above: it is very capable with language, but a much smaller model is often cheaper and better for a narrow job, as our guide to [small language models vs LLMs](https://geeklyplug.com/blogs/small-models-are-eating-the-inference-bill/) shows.

## How many AI models are there?

There is no complete count, because anyone can train a model on a laptop and never publish it. Two public numbers give a useful sense of scale, and they answer different questions.

*Two ways to count AI models (figures checked October 30, 2026)*

| Measure | Figure | What it tells you |
| --- | --- | --- |
| Public models on the Hugging Face Hub | 3,194,260 on October 30, 2026 | How many models people share openly, including fine-tuned variants, experiments and copies |
| Notable models released in 2025 (Epoch AI, via Stanford AI Index 2026) | 102 | How many models were significant enough to track for state-of-the-art results, historical importance or citations |

The [Hugging Face models page](https://huggingface.co/models) showed 3,194,260 models when we checked on October 30, 2026. A [community analysis on the Hugging Face blog](https://huggingface.co/blog/ivanfioravanti/three-million-models-and-counting) traces the growth: the Hub passed one million models in September 2024, two million around late August 2025 and three million in August 2026. The same analysis found that about half of models have fewer than 200 downloads, so a large share of that total sees little use.

The curated count is much smaller. Stanford's 2026 AI Index, using Epoch AI's dataset, reports that "the United States led with the release of 59 notable AI models, China with 35, and South Korea with 8" in 2025, and that industry produced 93 notable models compared with two from academia. The report is careful about what that means:

> This is a manual curation, so the dataset is not a census of all AI models
>
> [Stanford HAI, AI Index Report 2026, Chapter 1](https://hai.stanford.edu/assets/files/ai_index_report_2026_chapter_1_research_development.pdf)

So the honest answer is: millions of AI models exist, roughly a hundred new ones a year matter at the frontier, and the handful you use every day are a few large models from a few companies, plus countless small ones running quietly inside apps.

## Which type of AI model fits your task?

If you are deciding what kind of model a project needs, start from the output you want, not from the newest model. This table is a practical starting point.

*Matching common tasks to a model type*

| If you need to... | Start with | Why |
| --- | --- | --- |
| Predict a number from structured data (sales, time, price) | Regression or gradient-boosted trees | Cheap, fast, explainable, works well with spreadsheet-style data |
| Sort items into categories (spam, fraud, churn risk) | Classification model | Gives a label plus a confidence score you can set thresholds on |
| Find groups you did not know about | Clustering | Needs no labeled data |
| Write, summarize, translate or answer questions | A large or small language model | Language is what LLMs are trained on; use a small one if the task is narrow |
| Answer questions from your own documents | An LLM with retrieval (RAG) | Keeps answers grounded in your current data without retraining |
| Take multi-step actions across tools | An LLM inside an agent | The model plans; the surrounding software acts, as in our [AI agent build guide](https://geeklyplug.com/blogs/how-to-build-an-ai-agent/) |
| Create images | A diffusion-based image model | Built to generate pictures from text prompts |
| Recognize what is in images | A computer vision model | Trained to classify or detect objects, not to create them |

> **Rule of thumb**
>
> Use the simplest model that does the job well. A two-parameter regression you can explain beats a billion-parameter model you cannot, whenever both give good enough answers.

## How to check an AI model before you rely on it

Because a model is learned rather than written, you cannot read its rules. You have to look at how it was built and tested. A 2018 paper led by Margaret Mitchell proposed **model cards** for exactly this: ["short documents accompanying trained machine learning models"](https://arxiv.org/abs/1810.03993) that report evaluation results and disclose the context the model is intended for. Many published models now ship with one. Before you use a model, look for:

- **Intended use.** What tasks and languages was it built and tested for? Using it outside that range is where surprises happen.
- **Evaluation results.** How was it tested, on what data, and does performance differ across groups of people or types of input?
- **Training data and cutoff.** What did it learn from, and how recent is that? A model knows nothing after its training data ends.
- **License.** Open weights do not always mean free for commercial use. Read the terms.
- **File safety.** Prefer safe formats and trusted sources, for the pickle reason covered above.

Be aware that disclosure is shrinking at the top end. The 2026 AI Index notes that several leading models from OpenAI, Anthropic and Google have not disclosed parameter counts, training dataset sizes or training duration. For those, your own testing on your own tasks matters even more.

## The bottom line

An AI model is a program that learned its behavior from data: an algorithm runs over examples, and what remains is a file of learned numbers that turns new inputs into predictions, decisions or content. Types range from a two-parameter regression to diffusion image models and LLMs, and there are millions of them, though only around a hundred a year matter at the frontier. Pick the simplest type that fits your task, check how it was tested, and treat its outputs as predictions rather than facts. For more plain-English explainers on models, agents and tools, browse our [AI guides](https://geeklyplug.com/blogs/ai/).

## Frequently asked questions

### What is an AI model in simple terms?

It is a program that learned a pattern from examples and can apply that pattern to new inputs. Show it thousands of emails labeled spam or not spam, and it learns to label new emails on its own.

### What is the difference between an AI model and an algorithm?

The algorithm is the learning procedure; the model is what that procedure produces after running on data. IBM puts it this way: a model is the result of running an algorithm on a dataset.

### How many AI models are there?

Nobody can count them all, but the Hugging Face Hub alone listed 3,194,260 models on October 30, 2026. Far fewer are significant: Epoch AI, cited in Stanford's 2026 AI Index, counted 102 notable models released in 2025.

### What are the different types of AI models?

Common types include rule-based systems, classical machine learning models for prediction and classification, deep learning models for images and speech, large language models for text, and diffusion models for images. They can also be grouped by how they learn: supervised, unsupervised or reinforcement learning.

### Is ChatGPT an AI model?

ChatGPT is an app. The AI models are the GPT large language models running behind it. The same split applies to most AI products: a model does the predicting, and an app wraps it with an interface, tools and safety checks.

### What are AI image models?

AI image models generate or analyze pictures. Many modern image generators are diffusion models, which learn to turn random noise into an image step by step, while computer vision models classify or detect what is already in a photo.

## Sources

- [What is an AI model?](https://www.ibm.com/think/topics/ai-model), IBM Think
- [What is an AI model?](https://cloud.google.com/discover/what-is-an-ai-model), Google Cloud
- [Linear regression](https://developers.google.com/machine-learning/crash-course/linear-regression), Google for Developers, Machine Learning Crash Course
- [LLMs: What's a large language model?](https://developers.google.com/machine-learning/crash-course/llm/transformers), Google for Developers, Machine Learning Crash Course
- [On the Opportunities and Risks of Foundation Models](https://arxiv.org/abs/2108.07258), arXiv (Bommasani et al.)
- [Model persistence](https://scikit-learn.org/stable/model_persistence.html), scikit-learn documentation
- [Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006.11239), arXiv (Ho, Jain and Abbeel)
- [Models](https://huggingface.co/models), Hugging Face
- [Three Million Models and Counting](https://huggingface.co/blog/ivanfioravanti/three-million-models-and-counting), Hugging Face community blog (Ivan Fioravanti)
- [AI Index Report 2026, Chapter 1: Research and Development](https://hai.stanford.edu/assets/files/ai_index_report_2026_chapter_1_research_development.pdf), Stanford HAI
- [Model Cards for Model Reporting](https://arxiv.org/abs/1810.03993), arXiv (Mitchell et al.)

---

Source: [What is an AI model? Types, examples and how models are created](https://geeklyplug.com/blogs/what-is-an-ai-model/) on GeeklyPlug.
