Local AI in Minutes: Pull Llama Like Docker, Chat From Python

EKB Dev AI · Intermediate ·🧠 Large Language Models ·2mo ago

About this lesson

Run Llama 3.2 entirely on your computer—no OpenAI account, no API keys, no credit card, and no data leaving your machine. In this video we install Ollama, pull a model with one command, then call it from Python using the official OpenAI SDK pointed at localhost (OpenAI-compatible API). We also intentionally break the script with a wrong model name so you know how to fix it, and we show streaming responses in a few lines of code. Code from this video GitHub repo: https://github.com/ekb-dev-ai/local-llm What we create together • Install & verify Ollama (ollama --version) • Pull llama3.2 (ollama pull llama3.2) and quick-test in the terminal (ollama run) • Minimal chat.py using OpenAI(base_url="http://localhost:11434/v1", ...) • Match model names with ollama list when something breaks • Bonus: stream=True for token-by-token output Useful links • Ollama: https://ollama.com • Model library: https://ollama.com/library speed depends on your CPU/GPU/RAM; Apple Silicon often feels snappy on llama3.2; smaller machines can try tags like llama3.2:1b. If this helped, subscribe—next up we’re building a local conversational agent with memory

Original Description

Run Llama 3.2 entirely on your computer—no OpenAI account, no API keys, no credit card, and no data leaving your machine. In this video we install Ollama, pull a model with one command, then call it from Python using the official OpenAI SDK pointed at localhost (OpenAI-compatible API). We also intentionally break the script with a wrong model name so you know how to fix it, and we show streaming responses in a few lines of code. Code from this video GitHub repo: https://github.com/ekb-dev-ai/local-llm What we create together • Install & verify Ollama (ollama --version) • Pull llama3.2 (ollama pull llama3.2) and quick-test in the terminal (ollama run) • Minimal chat.py using OpenAI(base_url="http://localhost:11434/v1", ...) • Match model names with ollama list when something breaks • Bonus: stream=True for token-by-token output Useful links • Ollama: https://ollama.com • Model library: https://ollama.com/library speed depends on your CPU/GPU/RAM; Apple Silicon often feels snappy on llama3.2; smaller machines can try tags like llama3.2:1b. If this helped, subscribe—next up we’re building a local conversational agent with memory
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
How to Use Le Chat for Original Research Summaries in 2026
Use Le Chat to turn raw academic PDFs into structured, citable content for original research summaries in 2026
Dev.to AI
📰
Is GPT-5.6 Sol Max Worth It? High fixes. Max builds.
Learn when GPT-5.6 Sol Max is worth it for high fixes and max builds, and how it can aid in search, revision, and agent rounds
Dev.to AI
📰
Beyond Basic RAG: The Ultimate Guide to Vector, Vectorless, and Hybrid AI Architectures
Learn to build advanced RAG architectures to improve LLM performance with external data, beyond basic retrieval and generation capabilities
Dev.to AI
📰
Building Production-Grade LLM Evaluation Pipelines: From Vibes to Metrics
Learn to build production-grade LLM evaluation pipelines to catch hallucinations before deployment
Dev.to AI
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →