🎯 Загружено автоматически через бота:
🚫 Оригинал видео:
📺 Данное видео принадлежит каналу «Andrej Karpathy» (@AndrejKarpathy). Оно представлено в нашем сообществе исключительно в информационных, научных, образовательных или культурных целях. Наше сообщество не утверждает никаких прав на данное видео. Пожалуйста, поддержите автора, посетив его оригинальный канал.
✉️ Если у вас есть претензии к авторским правам на данное видео, пожалуйста, свяжитесь с нами по почте support@, и мы немедленно удалим его.
📃 Оригинальное описание:
The Tokenizer is a necessary and pervasive component of Large Language Models (LLMs), where it translates between strings and tokens (text chunks). Tokenizers are a completely separate stage of the LLM pipeline: they have their own training sets, training algorithms (Byte Pair Encoding), and after training implement two fundamental functions: encode() from strings to tokens, and decode() back from tokens to strings. In this lecture we build from scratch the Tokenizer used in the GPT series from OpenAI. In the process, we will see that a lot of weird behaviors and problems of LLMs actually trace back to tokenization. We’ll go through a number of these issues, discuss why tokenization is at fault, and why someone out there ideally finds a way to delete this stage entirely.
Chapters:
intro: Tokenization, GPT-2 paper, tokenization-related issues
tokenization by example in a Web UI (tiktokenizer)
strings in Python, Unicode code points
Unicode byte encodings, ASCII, UTF-8, UTF-16, UTF-32
daydreaming: deleting tokenization
Byte Pair Encoding (BPE) algorithm walkthrough
starting the implementation
counting consecutive pairs, finding most common pair
merging the most common pair
training the tokenizer: adding the while loop, compression ratio
tokenizer/LLM diagram: it is a completely separate stage
decoding tokens to strings
encoding strings to tokens
regex patterns to force splits across categories
tiktoken library intro, differences between GPT-2/GPT-4 regex
GPT-2 released by OpenAI walkthrough
special tokens, tiktoken handling of, GPT-2/GPT-4 differences
minbpe exercise time! write your own GPT-4 tokenizer
sentencepiece library intro, used to train Llama 2 vocabulary
how to set vocabulary set? revisiting transformer
training new tokens, example of prompt compression
multimodal [image, video, audio] tokenization with vector quantization
revisiting and explaining the quirks of LLM tokenization
final recommendations
??? :)
Exercises:
Advised flow: reference this document and try to implement the steps before I give away the partial solutions in the video. The full solutions if you’re getting stuck are in the minbpe code
Links:
Google colab for the video:
GitHub repo for the video: minBPE
Playlist of the whole Zero to Hero series so far:
our Discord channel:
my Twitter:
Supplementary links:
tiktokenizer
tiktoken from OpenAI:
sentencepiece from Google
2 views
0
0
1 month ago 01:55:57 5
[Andrej Karpathy] Building makemore Part 3: Activations & Gradients, BatchNorm
1 month ago 01:55:23 12
[Andrej Karpathy] Building makemore Part 4: Becoming a Backprop Ninja
1 month ago 00:56:21 4
[Andrej Karpathy] Building makemore Part 5: Building a WaveNet
1 month ago 01:56:19 72
[Andrej Karpathy] Let’s build GPT: from scratch, in code, spelled out.
1 month ago 00:59:47 11
[Andrej Karpathy] [1hr Talk] Intro to Large Language Models
1 month ago 04:01:25 13
[Andrej Karpathy] Let’s reproduce GPT-2 (124M)
1 month ago 02:13:34 2
[Andrej Karpathy] Let’s build the GPT Tokenizer
1 month ago 00:03:19 1
How To Study Hard - Richard Feynman
1 month ago 00:27:14 1
How large language models work, a visual intro to transformers | Chapter 5, Deep Learning
1 month ago 00:26:10 1
Attention in transformers, visually explained | Chapter 6, Deep Learning
2 months ago 00:27:13 10
But what is a GPT? Visual intro to transformers | Chapter 5, Deep Learning
2 months ago 00:44:17 1
No Priors Ep. 80 | With Andrej Karpathy from OpenAI and Tesla
3 months ago 00:18:11 67
НОВОСТИ ИИ: Подписка на ChatGPT за 2000$
3 months ago 00:06:53 1
Elon Musk says losers use LiDAR. [Explanation video]
4 months ago 00:47:27 1
Projeto Secreto da OpenAI: Descubra as Últimas Inovações da IA e Fique Super Atualizado no IA News#6
4 months ago 00:07:41 1
Educação 100% com IA, FBI invade celular, Hype das IA no fim, e muito mais
7 months ago 00:40:08 1
The Most Important Algorithm in Machine Learning
7 months ago 00:08:29 1
CATL’s sodium hybrid battery will be 30% cheaper & revolutionise the world
7 months ago 00:08:55 1
Tesla reveals timelline for massive electric Semi production at $ factory
9 months ago 00:26:53 1
Vedal & Neuro Build A Language Model From Scratch
9 months ago 00:16:39 1
Phi-1: A ’Textbook’ Model
10 months ago 00:20:13 1
GPT-5: Everything You Need to Know So Far
12 months ago 00:14:07 1
“Что в имени тебе моем?“ Учимся генерировать новые имена у звездного разработчика Tesla и OpenAI.
1 year ago 00:59:48 22
Введение в большие языковые модели от Andrej Karpathy