You will be able to
- Install Ollama and run open-source models such as Llama 3.2 and Gemma locally from the command line
- Compare model sizes, parameters, and quantization to choose a model that fits your hardware
- Create a custom model with a Modelfile by setting a system prompt and temperature
- Call the Ollama REST API and the Python library to generate text and chat with a model
- Build a RAG pipeline that loads a PDF, splits and embeds it, and answers questions with LangChain
- Assemble a multi-agent application that processes resumes and generates recommendations using a local model
Good to know first
- Basic Python programming, including functions, dictionaries, and file handling
- Comfort using a terminal or command line
- Ability to install Python and a code editor such as VS Code
- Basic familiarity with HTTP requests and JSON
Syllabus
14 lessons and a final project
- 1
Why run LLMs locally with Ollama
Ollama is a free, open-source tool that lets you download and run large language models on your own computer instead of paying for cloud services. This lesson explains what Ollama is, the problems it solves (privacy, ease of use, cost, latency) and what system you need to start.
3 build steps3 exercises3 questions - 2
Install Ollama and run your first model
You will install Ollama on your computer, download and run the Llama 3.2 model from the terminal, and chat with it. You will also learn the built-in slash commands such as /help, /show, /clear and /bye.
2 code6 build steps3 exercises3 questions - 3
Model sizes, parameters, and quantization
You learn how to read the model information Ollama shows (architecture, parameters, context length, embedding length, quantization) and what each number means. You also learn how to pick a model size by balancing performance against the memory and computing power it needs.
3 code4 build steps4 exercises4 questions - 4
Managing models from the CLI: pull, list, delete
This lesson shows how to check a model's size before you download it, then manage models with the Ollama command line: list, pull, run, and rm. You will download codegemma:2b, try it, and delete it again.
1 code6 build steps4 exercises4 questions - 5
Multimodal chat with LLaVA and conversation history
You will pull a vision-capable model (LLaVA) with Ollama, ask it to describe a local image, and see how the chat keeps history so follow-up questions work. You will also see how a prompt can change the style of a model's answers.
2 code6 build steps2 exercises3 questions - 6
Customizing a model with a Modelfile
You will learn how to write a Modelfile that starts from a base model and sets its temperature and system prompt. You will also learn how to build your own named model from it with ollama create and chat with it.
1 code6 build steps3 exercises4 questions - 7
Calling the Ollama REST API: generate, chat, and JSON output
You learn that Ollama runs a local REST server at localhost:11434 and how to call its generate and chat endpoints with curl. You also learn how the stream setting and the JSON format option change the response.
3 code5 build steps4 exercises4 questions - 8
Using the Ollama desktop app and attaching documents
This lesson shows how to chat with Ollama models through the Msty desktop app, switch between text and multimodal models, and attach a document as a knowledge stack so the model can answer questions about it. It also recaps the three ways to use Ollama: CLI, REST API and a UI.
6 build steps3 exercises3 questions - 9
Calling Ollama from Python with requests and streaming
You will learn how to send a prompt to a local Ollama model from Python by posting JSON to the REST generate endpoint (http://localhost:11434/api/generate) with the requests library. You will also see how streaming prints the answer as it arrives, and how the Ollama Python library gives a shorter way to do the same job.
2 code6 build steps3 exercises4 questions - 10
Using the official Ollama Python library
You learn how to use the official Ollama Python library to list models, chat with a model (with and without streaming), generate text, show model details, and create and delete custom models from code. The library wraps the Ollama REST API, so each call is just a friendlier way of hitting an endpoint.
1 code5 build steps3 exercises3 questions - 11
Project: Grocery List Categorizer
You will build a small Python script that reads a plain grocery list, asks a local Llama 3.2 model to group and sort the items, and saves the result to a new text file. You will also see how a clear prompt steers the model's output.
1 code5 build steps3 exercises3 questions - 12
RAG concepts: embeddings and vector stores
This lesson explains how Retrieval Augmented Generation (RAG) lets a language model answer questions from your own documents. You will learn how documents become embeddings stored in a vector store, and how a question is matched against them before the model answers.
3 exercises4 questions - 13
Building a PDF RAG System with LangChain and Ollama
You will build a complete Retrieval-Augmented Generation (RAG) pipeline that loads a PDF, splits it into chunks, stores embeddings in a Chroma vector database, and answers questions with a local Llama 3.2 model. The chapter shows how each piece (loader, splitter, embeddings, retriever, prompt, LLM) plugs into the next using LangChain.
4 code7 build steps2 exercises4 questions - 14
Multi-agent recruitment app with Swarm and Ollama
You will see how a recruitment app is split into several AI agents, each with one job, all built on one shared base class that talks to a local Ollama model. You will also see how an orchestrator passes a candidate's information from agent to agent and how the Streamlit interface runs it.
2 code4 build steps3 exercises3 questions
Final project
Private Document Assistant with a Custom Local Model
Build a fully local assistant that answers questions about your own PDF. It uses a custom Ollama model, a LangChain RAG pipeline and a small Python interface. Nothing leaves your machine, so you can use it on private documents.
Free preview · Lesson 1 in full
Why run LLMs locally with Ollama
Ollama is a free, open-source tool that lets you download and run large language models on your own computer instead of paying for cloud services. This lesson explains what Ollama is, the problems it solves (privacy, ease of use, cost, latency) and what system you need to start.
Draw and write next to the video.
The idea
Ollama is an open-source tool that simplifies running large language models (LLMs) locally, on your own hardware. Instead of sending every question to a paid cloud service such as a hosted chatbot API, you download a model once and run it yourself, for free. Ollama manages the hard parts in the background: installing and running the models, so you can focus on using them.
Under the hood, Ollama uses a command line interface (CLI). You type simple commands in a terminal, and Ollama handles downloading the model files and starting them. This hides much of the technical complexity that normally comes with setting up machine learning frameworks and hardware configuration, so developers, researchers and hobbyists can use advanced language models without deep setup work.
The video names four problems Ollama solves. Privacy: your data stays on your machine instead of being sent to external servers you do not control, which matters for sensitive information. Ease of use: setting up LLMs is normally challenging, and Ollama makes it straightforward. Cost efficiency: there are no ongoing cloud or API fees once everything is set up. Latency reduction: because the model runs locally, there is no network round trip, so interactive applications respond faster.
Ollama also gives you model management in one place: you can easily download, switch between and test different models. It offers a unified interface, so you use one consistent set of commands for different models; it is extensible, so you can add custom models; and it can use your hardware effectively, including GPU acceleration when available. Local models can also be customized or fine-tuned to fit your needs without limits imposed by third-party services.
Typical uses include development and testing (compare several models for your app), education and experimentation (no barriers of entry or cloud accounts), and secure applications in areas such as healthcare or finance, where data privacy is critical.
Before installing, check the system requirements. Ollama runs on Mac, Linux and Windows. Make sure you have about 10 GB of free storage, because some models are large. The course is Python-based, so you also need Python and a code editor such as VS Code installed.
Key points
- Ollama is free and open source; it runs large language models on your own computer, not in the cloud. 0:45
- Local models keep your data on your machine, which protects privacy and sensitive information. 7:00
- Ollama solves four problems: privacy, ease of use, cost (no API bills) and latency (no network delay). 10:20
- One place to manage many models, with one consistent set of commands, makes switching and testing models easy. 13:00
- Before installing, check you have about 10 GB of free storage and a supported OS: Mac, Linux or Windows. 17:20
Words to know
- LLM (large language model)
- An AI model trained on huge amounts of text that can understand and generate language.
- Open source
- Software whose code is publicly available for anyone to use, study and change, usually for free.
- CLI (command line interface)
- A way to control a program by typing text commands in a terminal instead of clicking buttons.
- Latency
- The delay between sending a request and receiving the response.
- GPU
- A graphics chip in your computer that can run AI models much faster than the normal processor alone.
Build along in the practice terminal
- Check your operating system. Ollama supports Mac, Linux and Windows. You should see: You know which OS you are using.
- Check that you have about 10 GB of free disk space, since models are large. You should see: Enough free storage is available.
- Install Python and a code editor such as VS Code, as the course is Python-based (the video links a Python install guide). You should see: Python runs from your terminal.
Practice
In your own words, explain why a developer might choose a local model over a cloud API. Give two reasons from the lesson.
Hint
Think about where your data goes, and about the bill at the end of the month.
Solution
- Name a reason such as privacy: data stays on your own machine instead of external servers.
- Name a second reason such as cost: no ongoing API or cloud fees, or latency: no network delay.
- Keep the answer short and concrete.
Privacy (data never leaves your machine) and cost (no ongoing API bills), or latency (faster responses without network delay).
A hospital wants an app that summarizes patient notes with an LLM. Should it use a local model or a cloud API? Explain with one reason from the lesson.
Hint
Which of the four problems matters most for patient data?
Solution
- Patient notes are sensitive information.
- With a local model run by Ollama, the data stays on the hospital's own machines and is not sent to external servers.
- So a local model is the better fit because of privacy.
A local model, because privacy: sensitive patient data stays on the hospital's own machine.
Check your computer for the course: write down your operating system, how much free disk space you have (you need about 10 GB), and run python --version in a terminal to see if Python is installed.
Hint
Your file manager or system settings show free disk space. If python --version fails, try python3 --version.
Solution
- Note your OS: Mac, Linux or Windows.
- Look up your free disk space and check it is about 10 GB or more.
- Open a terminal and run python --version; a version number means Python is installed.
- Make sure you also have a code editor such as VS Code.
You have a supported OS (Mac, Linux or Windows), about 10 GB free, and Python prints a version number.
On your scratchpad
Draw two boxes: "Cloud LLM" and "Local LLM (Ollama)". In each, draw an arrow showing where your question goes (to an outside server, or staying on your own computer). Under each, write one thing it affects: privacy, cost or latency.
Quiz
What is the main reason Ollama lets you avoid ongoing costs?
- It compresses models so they cost less to call
- It runs models on your own computer, so no cloud or API fees are needed
- It gives free cloud credits every month
- It only works with paid models
Show the answer
B. It runs models on your own computer, so no cloud or API fees are needed · Because the models run locally, you avoid the recurring costs of cloud services and API calls.
11:40 watch the momentWhich problem does running models locally help with most directly?
- Storage size of the model
- Speed of typing commands
- Privacy: your data is not sent to external servers
- Internet speed in general
Show the answer
C. Privacy: your data is not sent to external servers · Local execution means sensitive data stays on your machine rather than being sent to outside servers.
10:20 watch the momentWhat is the CLI that Ollama uses at its core?
- A graphical website for chatting
- A cloud dashboard
- A database for storing models
- A command line interface you control by typing commands
Show the answer
D. A command line interface you control by typing commands · Ollama uses a command line interface to manage downloading and running models in the background.
8:00 watch the moment
Made by Beyond from the video “Ollama Course – Build AI Apps Locally” by freeCodeCamp.org. The video plays in YouTube's own player. Watch it on YouTube · All lessons
