Introduction to LLMs#
Course description#
This course is designed to enhance your understanding of modern Large Language Models (LLMs) and how they work. Taking a hands-on approach, it combines conceptual slides with interactive Jupyter notebooks to guide you from the fundamentals of machine learning and neural networks through to the architecture underlying today’s state-of-the-art models. You will finish the session equipped with practical skills for working with LLMs effectively, including how to interpret tokenization, understand semantic embeddings, and craft effective prompts.
Course objectives#
Describe what an LLM does at a high level and explain the concept of next-token prediction.
Trace the key developments in machine learning and neural networks that led to modern LLMs.
Explain the core components of a transformer-based LLM: tokenization, embeddings, and attention.
Understand important practical concepts such as statelessness, context windows, and model parameters.
Explore how text is tokenized and why token counts matter for cost and context limits.
Visualise and interpret text embeddings as representations of semantic meaning.
Apply prompt engineering techniques — including few-shot learning and chain-of-thought reasoning — to improve model outputs.
Control LLM output behaviour by tuning temperature and sampling parameters.
Pre-requisite knowledge#
Participants should have completed Introduction to Machine Learning, or have equivalent prior experience, before attending this course.
Participants should also have access to a Python environment for the interactive notebook activities.
The interactive network visualisation below displays the prerequisite structure for this course within the training program. Each node represents a course that you may need to complete beforehand, and the arrows show the recommended order in which to take them, leading up to your selected course. You can click on any course node to view more information about that course. This interactive tool helps you clearly see the learning path required to access this course, making it easier to plan your progress with the Coding for Reproducible Research Training (CfRR) initiative.
Pre-Reqs Subnetwork
Sign-up#
To check for upcoming course dates and to register, please visit the Workshop Schedule and Sign-up page.
Installation guide#
All CfRR courses require attendees to use their own computer or laptop to follow workshop activities and take effective notes.
Instructions on configuring a Python environment with Jupyter Notebooks can be found on the course landing page. Alternatively, the interactive sessions can be completed in a Google Colab session. If using Colab, participants should ensure they can log in and upload and run the example notebook.
Running the interactive LLM notebooks
The website build does not execute the interactive LLM notebooks, and the standard CfRR build environment does not need to install the LLM-specific model and API packages.
If you are running these notebooks locally with Poetry, install the optional LLM dependency group first:
poetry install --with llm
If you are running the notebooks in a separate Jupyter or Colab environment, install the notebook-specific packages there instead:
%pip install tiktoken transformers sentence-transformers huggingface-hub python-dotenv
The practical prompting notebook can send prompts to Hugging Face Inference Providers when hosted inference is enabled. Set a Hugging Face token as HF_TOKEN only in your local environment, and do not submit personal, confidential, unpublished, sensitive, or institutionally restricted data to hosted inference services unless you have explicit approval.
Self study materials#
This course will be delivered through a mixture of slides and interactive Jupyter notebooks. All materials for this course can be found and downloaded from the course landing page Self-study notes: Introduction to Large Language Models.
Developers#
The developer of this course is Finley Gibson.
License info#
Most materials are licensed under the Creative Commons Attribution 4.0 International licence. Software is made available under the MIT licence.
Instructional Material
The instructional material in this course is copyright © 2026 University of Exeter and is made available under the Creative Commons Attribution 4.0 International license (https://creativecommons.org/licenses/by/4.0/). Instructional material consists of material that is contained within the “individual_modules/introduction_to_LLMs” directory, and images folders in this directory, with the exception of code snippets and example programs found in files within these folders. Such code snippets and example programs are considered software for the purposes of this license.
Software
Except where otherwise noted, software provided in this repository is made available under the MIT license (https://opensource.org/licenses/MIT).
Third-party Python packages and model resources referenced by the notebooks are not distributed as part of this course and remain under their respective licenses. See resources.md for attribution and license links.
Copyright © 2026 University of Exeter
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.