Skip to content

LLM + Control Tutorial

An applied tutorial covering LLM fundamentals, API usage, and agentic workflows, with a control-systems angle.

The tutorial uses the openai Python SDK to reach OpenAI, DeepSeek, and Qwen through one client — code that differs per provider is shown in three tabs, so you can pick whichever you have a key for.

What this site covers

Running the code

Code samples are shown inline with their expected output. To run them yourself, follow Setup to create the llm-tutorial conda env, then execute the snippets locally.

Start here

New to all of this? Go to Setup first, then LLM Basics.

Learning resources

Further reading and lectures to go deeper on how LLMs work under the hood.

Books

  • Build a Large Language Model From Scratch — Sebastian Raschka. End-to-end, code-first walk-through of training a transformer LLM from the ground up. Repo hosts the companion code.
  • Happy LLM — Datawhale. Open-source tutorial (Chinese) on LLM principles and hands-on implementation.

Courses