huggingface / huggingface/course

Correction in Section 1.5: Tokenization and Embeddings

Open
#1,105 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
4.2k
Forks
1.4k
Avg merge
13m
Merged PRs (30d)
1

Description

Hi,

In [Chapter 1, Section 5](https://github.com/huggingface/course/blob/main/chapters/en/chapter1/5.mdx)
, the text currently says:

“GPT-2 uses byte pair encoding (BPE) to tokenize words and generate a token embedding.”

This phrasing is a bit misleading.

BPE is used to tokenize text into tokens (subwords).

After tokenization, each token is mapped to an ID.

The model’s embedding layer then converts these IDs into token embeddings.

So the embedding is not generated directly by BPE, but rather by the embedding lookup.

I suggest rephrasing it to something like:

“GPT-2 uses byte pair encoding (BPE) to tokenize words into tokens. Each token is mapped to an ID, which is then converted into a token embedding by the embedding layer.”

This should make it clearer for learners who are just getting started.

Thanks for the great course! 🙌

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.