Your tokenizer does not respect your bondaries.
See how LLM tokenizers split SMILES, atom by atom.
01 Start with a molecule
Type, choose, or drawCanonical and rooted variants replace the text above. Editing it returns to “As typed / drawn”. Atom indices follow the source SMILES before choosing a variant, starting at 0. Shared URLs preserve that source.
Draw a molecule JSME sketcher
Loading sketcher…
Text before the SMILES changes the first token.
02 Compare the boundaries
Each color is a token. Hover a token or atom to see the connection.
Loading molecule tools and tokenizer list…
What counts as a tokenization crime?
- Split atom
- One atom’s SMILES text crosses token boundaries.
- Detached ring closure
- A ring label belongs to a different token than the preceding atom.
- Context merge
- A token spans both the prefix and the SMILES.
- Dropped character
- A SMILES character has no token owner and cannot be reconstructed.
Split atoms use their first character’s token color. Hovering shows every contributing token. Colors repeat every eight tokens.