By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: The Nuts and Bolts of Token Testing: Prompt Variations and Decoding in Practice | HackerNoon
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > The Nuts and Bolts of Token Testing: Prompt Variations and Decoding in Practice | HackerNoon
Computing

The Nuts and Bolts of Token Testing: Prompt Variations and Decoding in Practice | HackerNoon

News Room
Last updated: 2025/05/13 at 2:36 PM
News Room Published 13 May 2025
Share
SHARE

Table of Links

Abstract and 1. Introduction

  1. Methods

    2.1 Tokenizer analysis

    2.2 Indicators for detecting under-trained tokens and 2.3 Verification of candidate tokens

  2. Results

    3.1 Effectiveness of indicators and verification

    3.2 Common observations

    3.3 Model-specific observations

  3. Closed-source models

  4. Discussion, Acknowledgments, and References

A. Verification details

B. A short primer on UTF-8 encoding

C. Outputs for API-based verification

A Verification details

We use three repetitive prompts to induce models to output the candidate token we are testing:

These prompts are all designed to be suitable for base models and not require specialized instruction tuning or prompt templating. For each prompt we generate three tokens and check the maximal probability of our target token being predicted, and then take the maximum of this again over all three prompts. Variation in quoting and spacing helps to ensure we do not detect false positives based on models producing similar tokens without spaces, or tokens which start with punctuation partially merging with quotes.

B A short primer on UTF-8 encoding

UTF-8 is the most prevalent encoding scheme used to represent text in computers and communication protocols worldwide. It efficiently encodes Unicode characters, which encompass a vast range of characters from various writing systems and symbols [32]. Encoding to UTF-8 is often the first step in tokenization.

UTF-8 encoding can be summarized as follows:

• ASCII (Unicode below 128): Single byte, binary 0xxxxxxx representing up to 7 bits.

• 2-byte sequences: 110xxxxx 10xxxxxx representing up to 11 bits.

• 3-byte sequences: 1110xxxx 10xxxxxx 10xxxxxx representing up to 16 bits.

• 4-byte sequences: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx representing up to 21 bits.

Where the bits indicated by ‘x’ are concatenated to form the Unicode codepoint.

• 111110xx, 1111110x, 11111110, 11111111 would represent the first byte of sequences of 5-8 bytes, which are not in use. This corresponds to decimal 245-255 or hexadecimal F5-FF.

• 11000000, 11000001 are not in use, as the possible two-byte encodings that start with this fit in 7 bits due to the five leading zeros. These are 192/193 in decimal and C0/C1 in hexadecimal.

• Additionally, other starting bytes can be covered entirely by other tokens, and also turn out to be unused. A common example of this is C2/C3 which are only used for Unicode points 128-255. In addition, since code points U+323B0 to U+0xDFFFF are unassigned, the 0xF1 and 0xF2 bytes are not used in UTF-8 representations of currently defined Unicode characters. Similarly, 0xF4 is only used through the “Supplementary Private Use Area”. However, even if not defined in the current Unicode standard, such characters can be easily inserted in text and are found on web pages.

C Outputs for API-based verification

We use the following prompt for API based testing of under-trained tokens.

Where the strings consist of the problematic token, occasionally prefixed to help identify their source, and to avoid leading spaces, as we noticed that models often fail to correctly repeat such tokens for other reasons. Although many other prompt formats are effective, we have found this code-based approach to more clearly avoid false positives.

Figure 4 shows the result for Mistral, Anthropic and OpenAI models.

(a) Mistral API prompting results. (a) Mistral API prompting results.

(b) Claude API prompting results.(b) Claude API prompting results.

(c) GPT-3.5 API prompting results.(c) GPT-3.5 API prompting results.

(d) GPT-4 API prompting results.(d) GPT-4 API prompting results.

Figure 4: API prompting results.


Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Gemini AI Is coming to Android Auto, making in-car assistants smarter than ever
Next Article Sony Xperia 1 VII vs Samsung Galaxy S25 Ultra: Comparing the premium Androids
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Microsoft Is Laying Off 3% of Its Workforce
News
Scientists turn lead into gold for 1st time, but only for a split second
News
How to Insert a Calendar in Google Sheets |
Computing
Valve is making it easier to tell if a game will run on your Steam OS handheld
News

You Might also Like

Computing

How to Insert a Calendar in Google Sheets |

14 Min Read
Computing

Which Feature Selection Method Performs Best with Changing Data Sizes? | HackerNoon

8 Min Read
Computing

China’s SAIC says it has ‘fully cooperated’ with EU regulators · TechNode

1 Min Read
Computing

My AI Blogging Process: How I Create Content 3x Faster

12 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?