Exploring Large Language Models (LLMs) through interactive Python activities
Eugenio Tufino

TL;DR
This paper introduces an interactive, Python-based teaching method in Google Colab to help physics students understand Large Language Models like Word2Vec and GPT-2 through practical exercises and conceptual exploration.
Contribution
It presents a novel active learning approach combining theoretical LLM concepts with physics-related examples for educational purposes.
Findings
Students gain hands-on experience with LLMs in physics contexts.
The activities demonstrate how model parameters affect output.
Students understand the relationship between data, model size, and performance.
Abstract
This paper presents an approach to introduce physics students to the basic concepts of Large Language Models (LLMs) using Python-based activities in Google Colab. The teaching strategy integrates active learning strategies and combines theoretical ideas with practical, physics-related examples. Students engage with key technical concepts, such as word embeddings, through hands-on exploration of the Word2Vec neural network and GPT-2 - an LLM that gained a lot of attention in 2019 for its ability to generate coherent and plausible text from simple prompts. The activities highlight how words acquire meaning and how LLMs predict subsequent tokens by simulating simplified scenarios related to physics. By focusing on Word2Vec and GPT-2, the exercises illustrate fundamental principles underlying modern LLMs, such as semantic representation and contextual prediction. Through interactive…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques
