# A Search for More ChatGPT / GPT-3.5 / GPT-4 "Unspeakable" Glitch Tokens

Inspired by [the](https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp-plus-prompt-generation) [recent](https://www.lesswrong.com/posts/Ya9LzwEbfaAMY8ABo/solidgoldmagikarp-ii-technical-details-and-more-recent) [posts](https://www.lesswrong.com/posts/8viQEp8KBg2QSW4Yc/solidgoldmagikarp-iii-glitch-token-archaeology) by Jessica Rumbelow and mwatkins investigating GPT-3 glitch tokens, and the [post](https://www.lesswrong.com/posts/ChtGdxk9mwZ2Rxogt/smartyheadercode-anomalous-tokens-for-gpt3-5-and-gpt-4-1) by AdamYedidia demonstrating that these glitch tokens also exist for ChatGPT / GPT-3.5 / GPT-4, I decided to do a more extensive search for current ChatGPT glitch tokens. Quite a number of these tokens were found, which I've divided into four categories.

If you're interested in playing around with them, I'd suggest the "polysemantic" tokens listed below, which display the most variable behaviour. " ForCanBeConverted" is a good starter. Other good ones include " YYSTACK" and " JSBracketAccess". The "unspeakable" tokens can also elicit some unusual responses.

Also just to mention that although the search was conducted using the free research preview of ChatGPT, additional testing confirms that these tokens also produce unusual behaviour on gpt-3.5-turbo on the OpenAI Playground, and on Microsoft's Bing AI.

Method
------

GPT-3.5 and GPT-4 use a different tokenizer than GPT-3, called `cl100k_base`. This tokenizer has a vocabulary of just over 100,000 tokens, in contrast to the tokenizer used by GPT-3, `r50k_base`, with a vocabulary of just over 50,000 tokens. Additionally, while the weights for the `r50k_base` tokenizer are publicly available, this is not the case for `cl100k_base`. This is significant because the method used by Jessica Rumbelow and mwatkins to identify potential anomalous tokens required access to the weights, and as such the same technique cannot be used at present on `cl100k_base`.

Since this required a manual search, I decided early on to restrict the search to a smaller range of tokens, at least for this initial search. A comment by Slimepriestess on AdamYedidia's post noted that the " petertodd" token was about 3/4 of the way through the list of tokens on the 50k model, and given how interesting that token is, I decided to restrict the search to tokens 70,000 – 97,999 in the hope of finding an interesting selection within that range.

To get the full list of tokens for `cl100k_base`, I downloaded the "cl100k_base.tiktoken.txt" from [https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken](https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken) found on the [tiktoken](https://github.com/openai/tiktoken) GitHub repository, and wrote a short python script to generate prompts consisting of lists of tokens. To prevent the possibility of the tokenizer selecting the wrong token in the prompt, each token was preceded by and succeeded by a "newline" character. Prompts were of the form:

    Repeat after me: "
    TOKEN_1
    TOKEN_2
    ...
    TOKEN_N
    "

I tried prompt lengths N from 20 – 400 tokens, and eventually settled on N = 200 tokens, as longer prompt lengths seemed to increase the chance that ChatGPT would refuse to repeat the list or that it would "derail" partway through, either terminating the list or switching to listing unrelated words.

Tokens that consisted entirely of whitespace or punctuation were excluded, mainly due to ChatGPT's tendency to remove or modify these from the repeated lists. Additionally, it quickly became clear that "word suffix" tokens were very common. Due to their relatively simple behaviour, I excluded most of these from the results, although a few are included below.

The current (as of 9th May 2023) free research preview of ChatGPT was used for all prompts in the search. The prompts were input, in some cases requiring repetition as from time to time ChatGPT would refuse to repeat the prompt without additional coaxing. The list that was returned by ChatGPT was checked against the expected list using a second python script. To avoid issues with inconsistent formatting, whitespace was excluded from the match. Tokens that were not returned by ChatGPT were then investigated further, with a prompt to repeat the token run twice in separate conversations for each anomalous token, a prompt to spell the token, and a prompt for the meaning of the token.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/cda86ecddf2797d79702e09928bc8a31df11077c12395ed1.png)

An example of the prompts used on a token that had been identified as potentially anomalous.

Results
-------

I've used a similar categorization to that used in AdamYedidia's post:

*   "Word Suffix" tokens consist of a partial word suffix, which ChatGPT completes to the whole word, e.g. "oralType" is completed to "TemporalType".
*   "Glitched spelling" tokens are those where ChatGPT can repeat the token, but has a lot of trouble actually spelling the word. These were listed as "Programming" tokens in AdamYedidia's post.
*   "Unspeakable" tokens are those that ChatGPT has difficulty repeating, although in some cases can be prompted to do so with enough effort.
*   I have also included a different category for unspeakable tokens that display particularly variable behaviour. Although it's a bit of an overloaded term, I've called them "polysemantic" tokens.

Since the method for finding these tokens focused on the difficulty of repeating them – there was no second "spelling" prompt, unlike AdamYedidia's method – I found proportionally far fewer "glitched spelling" tokens, but I have included the ones I did find for interest. I added the additional "polysemantic" category as these tokens seemed to display behaviour that seemed interestingly different than the other "unspeakable" tokens, i.e. they seemed to be perceived as a different word every time, even when running the same prompt in the same context.

### Word Suffix / Partial Word Tokens

These tokens are quite common and their behaviour seems fairly simple, and as such were mostly excluded from the search. A few examples are given below:

79908 "动生成"

87474 "無しさん"

94648 "iphery"

97004 "oralType"

97113 "ederation"

97135 "ありがとうござ"

An example of the typical behaviour associated with a word suffix token:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/13a7f8fed4ae20d31485c53e8e33bf84170ec25786c1ad5e.png)

### Glitched Spelling Tokens

These tokens can be repeated normally, but show a wide variety of different spellings.

81325 ".bindingNavigatorMove"

81607 "etSocketAddress"

82000 ".scalablytyped"

85797 "andFilterWhere"

92103 "NavigatorMove"

93304 "VertexUvs"

94982 ".NotNil"

97558 "JSGlobalScope"  
 

An example of typical behaviour associated with "glitched spelling" tokens:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/46c13e2cf0a4e9fc41aeddf4eec563cd63dc50b1dc08ceb7.png)

### "Unspeakable" tokens

ChatGPT typically does not repeat these tokens when asked. Often, the result is a blank message or a message that terminates at the point where it appears that ChatGPT is attempting to repeat the token. This may be because ChatGPT is outputting a "beginning/end of sequence" token in place of the token that it's attempting to repeat.

These tokens are differentiated from the "polysemantic" tokens in that they don't tend to display the variable meanings that tokens in that category display.

Note: After the search was completed, I tested these tokens on the gpt-3.5-turbo on the OpenAI playground to check for nondeterministic behaviour at temperature 0 which was reported in the [SolidGoldMagikarp](https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp-plus-prompt-generation) post. Tokens that display this behaviour can produce responses that vary from run to run, even though the temperature 0 setting should make the responses (nearly) deterministic.

Each token was embedded in the usual 'Repeat after me: "TOKEN"' prompt, which was repeated 10 times. Any token which produced variation in any of the 10 attempts was flagged as a possible nondeterministic token.

Tokens highlighted in **bold** displayed this behaviour, though there were large differences from token-to-token. Additionally, tokens that are followed by an asterisk * were repeated successfully at temperature 0 by gpt-3.5-turbo, even though ChatGPT had trouble repeating them. These appear to be borderline members of this category.

70316 "erusform"

**70784 "Japgolly"**

71366 "drFc"

71390 " PodsDummy" *

**71664 " NdrFc"**

71819 "numerusform"

71927 " guiActive"

72740 " typingsJapgolly"

75127 "iationException"

75184 "rbrakk"

75261 "lbrakk" *

**75520 " NUITKA" ***

75572 "aincontri"

76271 " NdrFcShort"

76371 "LANGADM"

78593 "ISyntaxException"

79972 "CanBeConverted" *

80157 " SubLObject"

80612 "MethodBeat"

**81259 "artisanlib"**

**82929 "CppMethodIntialized"**

83315 "richTextPanel"

85071 "$PostalCodesNL"

85147 "Ubergraph"

85751 "ãeste"

**86393 " PropelException"**

86415 "BundleOrNil"

87551 "CppGuid"

88941 " invokingState"

**89471 "useRal"**

89472 "useRalative"

**89473 "useRalativeImagePath"**

90412 "selectorMethod"

90426 "ibNameOrNil"

90490 "ibBundleOrNil"

93905 " QtAws"

95117 " AssemblyCopyright"

96165 " HinderedRotor"

A typical example of unspeakable token behaviour:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/11c2ab6f720389e93037dc09f0ee8168fa879cd9bba8e329.png)

Strange responses are common with these tokens:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/aeeeeb48eabd72b1ebb417df5b030bb44233f00a542ad255.png)

And blank responses are also very common:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1f0b5555e4e444f3a7a3d9d890094fa7e1215394df8b3e4d.png)

These "blank" responses usually result in the message being cut off, suggesting that it's a beginning/end of sequence token that is being returned:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/bb2df115e3dda98442d09c2c3a17e385ffc3b6c32dcbaa60.png)

There are also instances when it gets stuck in a loop:

![](https://res.cloudinary.com/lesswrong-2-0/image/upload/f_auto,q_auto/v1/mirroredImages/X3YLLcKAu3ueM37MH/atmhrwecnxhqbuefob59)

### "Polysemantic" Tokens

These tokens are unspeakable, but in addition the meaning attached to these tokens appears to be quite variable – when asked to repeat these tokens, multiple different words are possible, multiple spellings are possible, and multiple meanings appear to be attached to them. The most interesting and variable of these are " ForCanBeConverted" and " ForCanBeConvertedToF", which can both be interpreted as a wide range of different words.

Note: After the search was completed, I tested these tokens on the gpt-3.5-turbo on the OpenAI playground to check for nondeterministic behaviour at temperature 0 which was reported in the [SolidGoldMagikarp](https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp-plus-prompt-generation) post. Tokens that display this behaviour can produce responses that vary from run to run, even though the temperature 0 setting should make the responses (nearly) deterministic.

Each token was embedded in the usual 'Repeat after me: "TOKEN"' prompt, which was repeated 10 times. Any token which produced variation in any of the 10 attempts was flagged as a possible nondeterministic token.

Tokens highlighted in **bold** displayed this behaviour, though there were large differences from token-to-token. " ForCanBeConverted" produced a different message every time, whereas "ablytyped" required multiple tries to get a slighly differently-worded message. Because a much larger portion of tokens in this category show nondeterministic behaviour when compared to tokens in the "unspeakable" category, it seems possible that this is related to their variable behaviour.

73018 " StreamLazy"

**73016 " EnumerableStream"**

**79260 "clarsimp"**

**79740 " Hexatrigesimal"**

**80369 " ForCanBeConverted"**

**80370 " ForCanBeConvertedToF"**

80371 " ForCanBeConvertedToForeach"

**81998 "ablytyped"**

**85069 "PostalCodesNL"**

87914 " YYSTACK"

97784 " JSBracketAccess"

The polysemantic glitch tokens seem to be taken as a different word every time:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/6ebcb1af4035e18d1c13df0c0a357cc97427fb2976074add.png)

Prompting with these tokens can be interesting, as some of the responses can be quite creative:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/3d610f9a7887f0ba2b884faf7af1801a8c590b733821a1e3.png)

And a later completion:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/56e5f59336e343884bfc2c4e3fa643f04fb90cd46b9b7655.png)

You can even get some spontaneous humour from ChatGPT:

![https://res.cloudinary.com/lesswrong-2-0/image/upload/f_auto,q_auto/v1/mirroredImages/X3YLLcKAu3ueM37MH/fgb9xmgqafwrnobcwkee](https://res.cloudinary.com/lesswrong-2-0/image/upload/f_auto,q_auto/v1/mirroredImages/X3YLLcKAu3ueM37MH/fgb9xmgqafwrnobcwkee)

Distribution of "Unspeakable" Tokens
------------------------------------

In case it's of any interest, here's a graph of the cumulative count of all unspeakable tokens by index (note that this includes the tokens categorized as "polysemantic"):

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/368f1845320dd82da76f56693679616a1588780a51e0601e.png)  
 And here is a similar graph but for "polysemantic" tokens only:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/87ac978d2d81f29d155f5a1296a04d87842d0a71cd777e62.png)

The graphs above suggest that there are many more of these anomalous tokens yet to be discovered, and if anything the rate of discovery increased as the search moved down the list to tokens of lower index.

One additional point of interest were the token triplets found, two such sets were found, the particularly interesting " ForCanBeConverted" triplet:

80369 " ForCanBeConverted"

80370 " ForCanBeConvertedToF"

80371 " ForCanBeConvertedToForeach"

and the "useRal" triplet:

89471 "useRal"

89472 "useRalative"

89473 "useRalativeImagePath"

I'm not sure why these triplets would be created but there may be something interesting going on, especially given that the two most anomalous tokens found were part of one of these triplets.

Final Words
-----------

Although this search took a large amount of work, many interesting "glitch" tokens were discovered, and if anything the distribution of the tokens found makes it look like there are plenty more to be discovered. Additionally, for practical reasons, the search focused on "unspeakable" tokens that the language model has difficulty repeating, and as such other types of anomalous tokens will have been missed by the search. It seems likely that there are plenty of paths for further investigation in this area.

If you've read this far, thank you, and I hope that this list is of some interest or use to the community. This is my first post on this site, so I hope I haven't missed anything / made any obvious errors / etc.