dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD

Author Topic: The Tokeniser and my suggestions ...  (Read 48 times)

Online Chip (OP)

  • Server Admin
  • Admin
  • Hero Member
  • ****
  • Administrator
  • *****
  • Restrictive
  • *
  • RC Discussion
  • **
  • Private
  • ***
  • Owner
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7449
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:26:28 AM
  • Deeply Confused Learner
  • Profession: IT Engineer now retired
The Tokeniser and my suggestions ...
« on: Yesterday at 08:24:28 AM »
📎 Click on me to view all my attachments
ListAttBBC  |  v6.12  |  2026-09-10  |  Andrew.human & Claude.ai
#FileSizeDownloadsInfoDL
00instagram-1792108940024.mp44 MB8ℹ️⬇️
01etymology_idea_transcript.md31.9 KB1ℹ️⬇️

Quote
Transcript:

Today in LLM concepts, let's see how a tokenizer is trained.

Before an LLM reads a single word, it needs a tokenizer. And here's the surprising part: the tokenizer isn't written by hand. It's trained on text before the model's own training even starts.

Step One: COLLECT THE TEXT

—A big sample of the same kind of text the model will read—web pages, books, code, many languages.

Step Two: START TINY

The first vocabulary is just single characters, or in GPT's case, the 256 possible bytes. So at the start, every word is cut into its smallest pieces.

Step Three: COUNT

Across the whole text, inside every word, the trainer counts every pair of neighboring pieces and how often each pair appears. Say "I" followed by "N" shows up millions of times.

Step Four: MERGE

The winning pair becomes one new token, "in," and the rule is saved: "I plus N becomes in." Then count again, merge again. "In plus G becomes aing." Round after round, common chunks like "aing" and "tion" and whole words like "the" each become
a single token.

Step Five: STOP AT THE TARGET SIZE

The vocabulary size is fixed before training, like 32,000 or 50,000 tokens. Once the vocabulary reaches that number, training is done.

Only two things come out: the vocabulary, every token with its ID, and the merge rules in order.

That's the whole tokenizer, and then it's frozen. The model learns one embedding row for every token ID.

So if you change the tokenizer later, the model reads nonsense.

One more effect: a tokenizer only learns what it saw. If the training text had little Hindi, Hindi words never got merged into big chunks, so the same sentence in Hindi turns into many more tokens. Count and merge.

That recipe is called BPE.

But BERT's tokenizer picks its merges differently, and sentence piece doesn't even split on spaces.

In today's LLM interview reel, BPE versus word piece versus sentence piece.

Which one does your model use ?

Comment and tell me.

Which model's tokenizer should we open up next ?
« Last Edit: Yesterday at 08:56:21 AM by Chip »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal