Skip to content

Course 2 — Coding with a local LLM

Level · IntermediateDuration · ~3 hoursChapters · 19Stack · Ollama + Python + Java + qwen2.5-coder

Five hands-on demos, each in its own GitHub repository under github.com/gneuroneai:

DemoRepositoryWhat it teaches
Demo 0gneuroneai/ollama-demo-0-chat-cliMinimal CLI chat (~50 lines). Used to study the structure of a chat with an LLM at the API level: a list of role/content messages sent to ollama.Client.chat().
Demo 1gneuroneai/ollama-demo-1-chat-streamlitSame chat loop served behind a Streamlit web UI. Introduces a graphical interface without changing the underlying mechanics; includes an expander that exposes the raw message list sent to the model.
Demo 2gneuroneai/ollama-demo-2-comparatorThree models run in parallel on the same prompt. Allows observation of the effect of model size and family on the response.
Demo 3gneuroneai/ollama-demo-3-agent-javaSingle-file CLI agent (~30 useful lines of agent loop). Step-by-step illustration of tool calling: how a Python function is exposed to the model as an action it can invoke.
Demo 4gneuroneai/ollama-demo-4-trio-agents-javaThree specialised agents (Generate / Verify / Tests) collaborating in a Streamlit UI, with editable system prompts and JUnit 5 verification. Illustrates how the simple agent loop scales to a complete multi-agent project.

Clone any of them individually — they’re self-contained:

Terminal window
git clone https://github.com/gneuroneai/ollama-demo-3-agent-java.git
cd ollama-demo-3-agent-java
.\start.ps1

This course (its own repo: gneuroneai/ollama-course-llm-local) explains everything between those demos and you. No LangChain. No hidden abstractions. Just Ollama + Python + the official ollama-python SDK.

If, by the end, you can edit a system prompt and watch the behaviour change, the course has done its job.

#ChapterDurationType
01What is an LLM?8 minTheory
02What an LLM cannot do6 minTheory
03Tool calling: the bridge10 minTheory + code
04Ollama vs LangChain7 minTheory
04bOpen-source LLM landscape10 minSurvey
05aLocal vs commercial models8 minTheory
05bChoosing a local model8 minPractice
05cAnnex — Local LLM catalogue20 minReference annex
05dAnnex — Quantization, from scratch20 minReference annex
05eAnnex — CPU, GPU, RAM, VRAM: the simple version20 minReference annex
06Installing the environment10 minPractice
07Demo 0: minimal CLI chat10 minGuided practice
08Demo 1: Streamlit chat10 minGuided practice
08bDemo 2: 3-way comparator10 minGuided practice
09Demo 3: a simple agent15 minGuided practice
10Demo 4: three agents20 minGuided practice
11Prompt engineering live12 minGuided practice
12Security: workspace & tools8 minTheory
13Going further5 minClosing
13bAnnex — LangChain & LangGraph in depth25 minReference annex
13cAnnex — The agentic AI landscape20 minReference annex
14Fine-tuning a code model15 minAdvanced
  • Linear (recommended): chapters 01 → 06, then 07 → 14.
  • Express (just run a demo): 06 → 07 → 09 → 10.
  • Theory only (no installation): 01 → 04.
  • Demos only (assumes installed): 07 → 08 → 08b → 09 → 10.
  • Advanced (train your own model): 05a → 05b → 09 → 10 → 14.

Start with chapter 01 →