Aulafy
Courses/Claude Code + Local AI/Ollama from Scratch

Ollama from Scratch

Ollama is the most direct way to run open models on your computer. In this lesson you set up a real local AI, choose a sensible model for your hardware, and verify it responds before connecting it to larger projects.

  • Install Ollama on Windows, macOS, or Linux.
  • Choose a model based on memory, speed, and quality.
  • Test the local API so you can use it later with your apps.

Realistic minimum requirements

  • 8 GB of RAM: small 1B to 4B models for testing, summaries, and light chat.
  • 16 GB of RAM: 7B to 8B models, the best balance for learning.
  • 32 GB or more: 14B models and smoother workflows with long documents.
  • GPU: helps a lot, but is not required to get started.

Installation

Go to the official Ollama website, install the version for your system, and open a new terminal. On Linux you can also use the terminal installer:

TerminalCode
curl -fsSL https://ollama.com/install.sh | sh

Verify that the command exists:

TerminalCode
ollama --version

Your first model

To start, use a small, fast model. If your hardware handles it well, you can move up in size later.

TerminalCode
ollama run qwen3:4b

Recommended models for learning

  • qwen3:4b: a good first choice for modest hardware.
  • llama3.1:8b: the classic balance if you have 16 GB of RAM or more.
  • mistral: fast and practical for general testing.
  • codellama: useful for code examples, though it does not replace Claude Code.

Test the local API

Ollama listens at http://localhost:11434. Your applications will talk to that address.

TerminalCode
curl http://localhost:11434/api/generate -d '{
  "model": "qwen3:4b",
  "prompt": "Resume en una frase qué es la IA local.",
  "stream": false
}'

Commands you'll use every week

TerminalCode
ollama list
ollama run qwen3:4b
ollama pull llama3.1:8b
ollama rm modelo:tag
ollama ps