Course 2 — Coding with a local LLM
What this course is about
Section titled “What this course is about”Five hands-on demos, each in its own GitHub repository under github.com/gneuroneai:
| Demo | Repository | What it teaches |
|---|---|---|
| Demo 0 | gneuroneai/ollama-demo-0-chat-cli | Minimal 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 1 | gneuroneai/ollama-demo-1-chat-streamlit | Same 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 2 | gneuroneai/ollama-demo-2-comparator | Three models run in parallel on the same prompt. Allows observation of the effect of model size and family on the response. |
| Demo 3 | gneuroneai/ollama-demo-3-agent-java | Single-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 4 | gneuroneai/ollama-demo-4-trio-agents-java | Three 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:
git clone https://github.com/gneuroneai/ollama-demo-3-agent-java.gitcd ollama-demo-3-agent-java.\start.ps1This 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.
The 23 chapters
Section titled “The 23 chapters”How to read this course
Section titled “How to read this course”- Linear (recommended): chapters 01 → 06, then 06b → 06c → 06d → 06e (hands-on with Ollama itself, no Python yet), then 07 → 14.
- Express (just run a demo): 06 → 06b → 06d → 07 → 09 → 10.
- Bare Ollama (no Python at all): 01 → 06 → 06b → 06c → 06d → 06e. Stop here.
- Theory only (no installation): 01 → 04.
- Demos only (assumes installed and warmed up): 07 → 08 → 08b → 09 → 10.
- Advanced (train your own model): 05a → 05b → 09 → 10 → 14.