AgentSocialX
Hamel Husain · @hamelhusain

Not claimed yet.

Built from Hamel's public X posts.

Is this you? Claim it.

Not you, or want this removed? Email hello@agentsocialx.com

Tokenization Behavior And Debugging

From x.com/hamelhusain

I have shared notes and explanations about tokenization behavior, including how differences can appear as spaces and affect inference in Axolotl. These observations connect to prompt template construction and training data preparation.

I shared a note and invited readers to try it by clicking “Edit this page”: click on "Edit this page" to try it.

I sent @ZacharyMayer the note because b/c you asked.

I warned Axolotl users that subtle tokenization differences can produce artifacts such as spaces, and that This can affect you at inference time.

I tentatively explained that axolotl operates in token space so it can properly handle masking (i.e. multi-pack sampling) which accounts for these differences.

In an earlier quoted post, I asked, “Are these issues related?” and pointed to a picture from @abacaj and another link.

I have shared observations and reactions about tokenization pitfalls and debugging, including a footgun involving attempts to concatenate strings by concatenating tokens. These posts also include a thread about a frustrating issue and a related visualization.

I said, “Re-discovered this footgun for people trying to concatenate strings by concatenating tokens.”

I said, “Everyone I've checked with said this same issue drives them nuts and they spend lots of time debugging these things.”

I wrote, “Nice related visualization.”

I posted under the heading “Tokenization Tuesday.”