BYOLM Workshop Switzerland

Teacher Training Workshop: Build Your Own Language Model

USI, Lugano
Sat, May 30, 2026


Luca ran this workshop for 35 high school informatics teachers from all across Switzerland.

Build Your Own Language Model

Motivation

Language models are one of the hottest topics within the broader field of “artificial intelligence” . Products based on large language models (LLMs) have become ubiquitous; they are already having, and will continue to have, a significant impact on the entire society.

Contents

A sequence of programming activities, ready to be used in the classroom, designed to allow students to experience first-hand the essential concepts of a language model (without diving into the complexities of the modern ones) and to explore the key ethical issues that arise. The activities are suitable for gymnasium students and also serve as further practice for the Python programming part already covered.

Date and Place

May 30, 2026 @ USI, East Campus, Lugano.

Mandatory Registration

Register online by April 30, 2026.

Hosts

Dr. Luca Chiodini (luca.chiodini@usi.ch), Prof. Matthias Hauswirth

Materials

It is recommended to bring a laptop or tablet.

Cost

Entirely free for registered participants. Thanks to funding by the Swiss Informatics Foundation, included in the registration are also coffee breaks, lunch, and a 75 CHF voucher for SBB-CFF-FFS to help cover travel costs.

Detailed Program

From 9:15:

Welcome & Registration. Doors open, Coffee & Pastries.

10:15 – 10:45:

Beginning of the workshop. Introduction to the pedagogical choices underpinning the activities.

10:45 – 12:45:

Activity 1: Random text generation character by character (concept of a language model, generating text one “token” at a time).

Activity 2: Generation by estimating the distribution of characters in a text (legitimacy of using potentially copyright-protected material, bias depending on the corpus used during model training).

Activity 3: Generation by estimating the conditional probability given the previous character (distinction between training and inference, number of parameters in a model).

Activity 4: Generation by estimating the probability of a prefix (problem of parameter explosion, multilingual generation by varying only the training data).

12:45 – 14:00:

Social Lunch (catering provided).

14:00 – 16:00:

Activity 5: Generation based on a prompt (the meaning of “context” , using a prompt to initiate generation, “autonomy” of the model to stop the generation).

Group discussion on the pedagogical choices connected to the implementation of the activities in the classroom.

16:00 – 16:15:

Coffee break

16:15 – 17:15:

Activity 6: Generation of non-natural language (artificial languages as an example of “intelligence” for tackling simple problems, such as the next move in tic-tac-toe).