From AI Dungeon Wiki
Revision as of 16:07, 8 March 2021 by Luihum (talk | contribs) (Categorizing)
Jump to navigation Jump to search

A token is a the smallest unit of text a neural net processes on. The text inputted to the AI is first tokenized, so it is a list of tokens then sent to the AI.


Because the neural network takes in text as a sequence of tokens in order for text to be processed, it first needs to be tokenized. This can be as simple as using characters or words as tokens, but more complex tokenizations lead to better results. The one used by AI Dungeon and GPT in general works with common character clusters. For instance, try would be converted to [try] and trying would be converted to [try][ing]. That way, the neural net can see the relations between words while not having to bother with individual characters.