Skip to content

Clarification on Frequency Count for “s” in BPE Example (Page 91) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Friend09 opened this issue Jan 17, 2025 · 0 comments
Open

Comments

@Friend09
Copy link

image

Hi,

I was reading the Byte Pair Encoding (BPE) example on Page 91 of the book, and I have a question regarding the frequency calculation in Iteration 5.

Specifically, the frequency of the merged token “s” with is listed as 8, but the frequency of “s” is only 7 prior to the merge. Need some clarification on this
• How can “s” appear 8 times when “s” only occurs 7 times in the corpus?

Could you please clarify how this frequency was computed? Is there an additional detail about how token pairs are counted that might not be immediately apparent from the example?

Thank you for your time!
Raghu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant