Skip to content

How AI Models Work: Cloud vs. Local (Free Ollama Setup)

How an AI Assistant Answers Questions

When you ask a question like, "What is machine learning?", your AI assistant completes four simple steps:

  1. Receives your question (e.g., "What is machine learning?")
  2. Sends that question to an AI model
  3. The AI model understands the request and generates an answer
  4. The answer is returned to your Python program and displayed to the user

For example, the model might return: "Machine learning is a branch of artificial intelligence..."

What is an AI Model?

An AI model is the brain of your assistant. It has already learned from massive amounts of text, books, articles, websites, and publicly available information. When you ask a question, the model predicts the most appropriate response based on its training. To understand how this ability to reason and act compares to more advanced systems, explore our guide on Understanding Generative AI, AI Agents, and Agentic AI: Key Differences Explained.

Key insight: You don't need to know how a model was trained to build useful AI applications. Your focus is on using existing models effectively, not training them from scratch. For a practical, step-by-step implementation, you can follow our guide to Build Your Own ChatGPT: Python AI Assistant Explained.

Where Does the AI Model Run?

There are two common options:

1. Cloud Models

  • The model runs on someone else's server
  • Your program sends requests and receives responses over the internet
  • Examples: OpenAI, Google (Gemini), Anthropic (Claude), Grok
  • Disadvantage: Cost - you pay API charges for usage

2. Local Models (Our Choice)

  • You download the model onto your own laptop or computer
  • Your Python program uses the model directly
  • Name: Ollama
  • Advantages:
    • Free – no ongoing costs
    • Private – data stays on your machine
    • Easy to install – minimal setup
    • Great for learning – safe sandbox
    • No API charges – all processing is local

Why We Use Ollama in This Course

Ollama is an open-source, downloadable model that lets you practice every project without worrying about cost. It's the ideal tool for learners who want to build AI agents without incurring expenses. Once you're ready to work with cloud-based options, you can also learn how to Build AI Agents with Microsoft Copilot Studio – No Code Guide to expand your skills.

Summary: Cloud vs. Local at a Glance

| Feature | Cloud Model | Local Model (Ollama) | |---|---|---| | Cost | API charges per request | Free | | Privacy | Data sent to server | Data stays on your machine | | Setup | Requires internet connection | Download once, run offline | | Learning curve | Understanding API keys | Simple local execution | | Best for | Production deployments | Learning and experimentation |

By using a local model, you gain complete control over your workflow and can focus on mastering AI integration without financial barriers. To see how other AI tools can enhance your workflow, check out our list of Top AI Tools to Boost Productivity and Transform Business Operations.

Keep this summary

Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.

Save to LunaNotes

Or summarise for another video.

32K+ people have turned 65K+ videos into notes

“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
Bhai Chrome Web Store review

This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.

Related summaries

Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide

Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide

Learn how to install the Ollama AI framework on your computer, download the lightweight Qwen3 4B model, and run it locally via terminal. This step-by-step tutorial lets you chat with an open-source LLM right on your own laptop—no cloud or GPU required.

Free AI Development Setup: Install Python, VS Code & Ollama Tools

Free AI Development Setup: Install Python, VS Code & Ollama Tools

Learn how to set up a complete local AI development environment using three free tools. This guide covers Python installation, Visual Studio Code setup, and Ollama for running AI models on your own computer — no GPU or cloud costs required.

How to Write Your First AI Program in Python with Ollama

How to Write Your First AI Program in Python with Ollama

Learn to write a simple AI-powered Python program that communicates with a local AI model (Ollama). This step-by-step tutorial covers importing libraries, loading environment variables, connecting to the AI, sending a question, and displaying the response.

How to Configure AI Model Settings for Your First Python Program

How to Configure AI Model Settings for Your First Python Program

Learn to set up a configuration file (.env) for your AI program, including base URL, API key, and model name. This tutorial shows how to configure Ollama locally so your Python code can communicate with an AI model without hardcoding settings.

Install Python, VS Code, and Ollama for AI Agent Development

Install Python, VS Code, and Ollama for AI Agent Development

This video provides a step-by-step guide to setting up your development environment for building AI agents. Learn how to install Python, download and configure Visual Studio Code, and set up Ollama with large language models.

Found this summary useful?

Take it with you. One click puts it in your own LunaNotes library.

Save to LunaNotes

Start taking better notes today with LunaNotes