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

Veröffentlicht am: 31 August 2024
auf dem Kanal: Shaw Talebi
16,954
643

🤝 Want your team maximizing Claude? I run 1:1 and team AI workshops for companies doing $1M+ 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-scien...
🎥 Training the Teacher Model:    • Fine-Tuning BERT for Text Classification (...  

💻 GitHub Repo: https://github.com/ShawhinT/YouTube-B...
👩‍🏫 Teacher Model: https://huggingface.co/shawhin/bert-p...
🧑‍🎓 Student Model: https://huggingface.co/shawhin/bert-p...
👾 4-bit Student Model: https://huggingface.co/shawhin/bert-p...
💿 Dataset: https://huggingface.co/datasets/shawh...

References:
[1] https://arxiv.org/abs/2001.08361
[2] https://arxiv.org/abs/1710.09282
[3] https://machinelearning.apple.com/res...
[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/...
[10] https://arxiv.org/abs/2305.14314
[11] https://www.researchgate.net/publicat...

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


Auf dieser Seite können Sie das Online-Video Compressing Large Language Models (LLMs) | w/ Python Code mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Shaw Talebi 31 August 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 16,954 Mal angesehen und es wurde von 643 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!