Compressing Large Language Models (LLMs) | w/ Python Code

From the creator

🀝 Your team not maximizing Claude? I run 1:1 and team AI workshops for companies doing $10M+ per year: https://aibuilder.academy/yt/FLkUOkeMd5M Here, I discuss 3 ways to do model compression on LLMs (i.e. Quantization, Pruning, and Knowledge Distillation/Model Distillation) with example Python code. Resources: πŸ“° Blog: https://medium.com/towards-data-science/compressing-large-language-models-llms-9f406eea5b5e?sk=2e8a9606c78e60eab725c9a5d4170299 πŸŽ₯ Training the Teacher Model: https://youtu.be/4QHg8Ix8WWQ πŸ’» GitHub Repo: https://github.com/ShawhinT/YouTube-Blog/tree/main/LLMs/model-compression πŸ‘©β€πŸ« Teacher Model: https://huggingface.co/shawhin/bert-phishing-classifier_teacher πŸ§‘β€πŸŽ“ Student Model: https://huggingface.co/shawhin/bert-phishing-classifier_student πŸ‘Ύ 4-bit Student Model: https://huggingface.co/shawhin/bert-phishing-classifier_student_4bit πŸ’Ώ Dataset: https://huggingface.co/datasets/shawhin/phishing-site-classification References: [1] https://arxiv.org/abs/2001.08361 [2] https://arxiv.org/abs/1710.09282 [3] https://machinelearning.apple.com/research/model-compression-in-practice [4] https://arxiv.org/abs/1710.09282 [5] https://arxiv.org/abs/2308.07633 [6] https://arxiv.org/abs/2402.17764 [7] https://arxiv.org/abs/1710.01878 [8] https://arxiv.org/abs/1503.02531 [9] https://crfm.stanford.edu/2023/03/13/alpaca.html [10] https://arxiv.org/abs/2305.14314 [11] https://www.researchgate.net/publication/372248458_ChatGPT_in_the_Age_of_Generative_AI_and_Large_Language_Models_A_Concise_Survey Intro - 0:00 "Bigger is Better" - 0:40 The Problem - 1:35 Model Compression - 2:14 1) Quantization - 3:11 2) Pruning - 5:44 3) Knowledge Distillation - 8:04 Example: Compressing a model with KD + Quantization - 11:10

Stop watching Β· start building
Matched to Synthetic Data

Makers residency 4th edition

Your idea can be anything. At our last workshops, people built plant-based nutrition businesses, a way to measure planetary resilience, crochet headwear and a way to connect lonely people living in the same building. An asset manager went on to raise an additional Β£25M on their fund within nine months. The fourth workshop is a full day at KOKO with Nick Sarafa, learning to build with Claude Code. Bring the thing you keep meaning to start. We’ll bring the pizza.

β—† Fri 13 Nov 2026 β—† KOKO, London
Makers residency 4th edition
Live event
Makers residency 4th edition
Fri 13 Nov 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.