23.9 C
New York
Friday, May 2, 2025

Hidden prices in AI deployment: Why Claude fashions could also be 20-30% dearer than GPT in enterprise settings


It’s a well-known proven fact that totally different mannequin households can use totally different tokenizers. Nevertheless, there was restricted evaluation on how the method of tokenization itself varies throughout these tokenizers. Do all tokenizers end in the identical variety of tokens for a given enter textual content? If not, how totally different are the generated tokens? How vital are the variations?

On this article, we discover these questions and look at the sensible implications of tokenization variability. We current a comparative story of two frontier mannequin households: OpenAI’s ChatGPT vs Anthropic’s Claude. Though their marketed “cost-per-token” figures are extremely aggressive, experiments reveal that Anthropic fashions could be 20–30% dearer than GPT fashions.

API Pricing — Claude 3.5 Sonnet vs GPT-4o

As of June 2024, the pricing construction for these two superior frontier fashions is very aggressive. Each Anthropic’s Claude 3.5 Sonnet and OpenAI’s GPT-4o have an identical prices for output tokens, whereas Claude 3.5 Sonnet presents a 40% decrease price for enter tokens.

Supply: Vantage

The hidden “tokenizer inefficiency”

Regardless of decrease enter token charges of the Anthropic mannequin, we noticed that the full prices of working experiments (on a given set of mounted prompts) with GPT-4o is less expensive when in comparison with Claude Sonnet-3.5.

Why?

The Anthropic tokenizer tends to interrupt down the identical enter into extra tokens in comparison with OpenAI’s tokenizer. Which means, for an identical prompts, Anthropic fashions produce significantly extra tokens than their OpenAI counterparts. Because of this, whereas the per-token price for Claude 3.5 Sonnet’s enter could also be decrease, the elevated tokenization can offset these financial savings, resulting in larger total prices in sensible use circumstances. 

This hidden price stems from the best way Anthropic’s tokenizer encodes info, typically utilizing extra tokens to characterize the identical content material. The token rely inflation has a big influence on prices and context window utilization.

Area-dependent tokenization inefficiency

Various kinds of area content material are tokenized otherwise by Anthropic’s tokenizer, resulting in various ranges of elevated token counts in comparison with OpenAI’s fashions. The AI analysis neighborhood has famous related tokenization variations right here. We examined our findings on three common domains, specifically: English articles, code (Python) and math.

AreaMannequin EnterGPT TokensClaude Tokens% Token Overhead
English articles7789~16%
Code (Python)6078~30%
Math114138~21%

% Token Overhead of Claude 3.5 Sonnet Tokenizer (relative to GPT-4o) Supply: Lavanya Gupta

When evaluating Claude 3.5 Sonnet to GPT-4o, the diploma of tokenizer inefficiency varies considerably throughout content material domains. For English articles, Claude’s tokenizer produces roughly 16% extra tokens than GPT-4o for a similar enter textual content. This overhead will increase sharply with extra structured or technical content material: for mathematical equations, the overhead stands at 21%, and for Python code, Claude generates 30% extra tokens.

This variation arises as a result of some content material sorts, resembling technical paperwork and code, typically comprise patterns and symbols that Anthropic’s tokenizer fragments into smaller items, resulting in the next token rely. In distinction, extra pure language content material tends to exhibit a decrease token overhead.

Different sensible implications of tokenizer inefficiency

Past the direct implication on prices, there may be additionally an oblique influence on the context window utilization.  Whereas Anthropic fashions declare a bigger context window of 200K tokens, versus OpenAI’s 128K tokens, as a consequence of verbosity, the efficient usable token area could also be smaller for Anthropic fashions. Therefore, there may doubtlessly be a small or giant distinction within the “marketed” context window sizes vs the “efficient” context window sizes.

Implementation of tokenizers

GPT fashions use Byte Pair Encoding (BPE), which merges regularly co-occurring character pairs to kind tokens. Particularly, the most recent GPT fashions use the open-source o200k_base tokenizer. The precise tokens utilized by GPT-4o (within the tiktoken tokenizer) could be considered right here.

JSON
 
{
    #reasoning
    "o1-xxx": "o200k_base",
    "o3-xxx": "o200k_base",

    # chat
    "chatgpt-4o-": "o200k_base",
    "gpt-4o-xxx": "o200k_base",  # e.g., gpt-4o-2024-05-13
    "gpt-4-xxx": "cl100k_base",  # e.g., gpt-4-0314, and so on., plus gpt-4-32k
    "gpt-3.5-turbo-xxx": "cl100k_base",  # e.g, gpt-3.5-turbo-0301, -0401, and so on.
}

Sadly, not a lot could be stated about Anthropic tokenizers as their tokenizer just isn’t as straight and simply accessible as GPT. Anthropic launched their Token Counting API in Dec 2024. Nevertheless, it was quickly demised in later 2025 variations.

Latenode studies that “Anthropic makes use of a singular tokenizer with solely 65,000 token variations, in comparison with OpenAI’s 100,261 token variations for GPT-4.” This Colab pocket book accommodates Python code to research the tokenization variations between GPT and Claude fashions. One other device that permits interfacing with some frequent, publicly accessible tokenizers validates our findings.

The power to proactively estimate token counts (with out invoking the precise mannequin API) and funds prices is essential for AI enterprises. 

Key Takeaways

  • Anthropic’s aggressive pricing comes with hidden prices:
    Whereas Anthropic’s Claude 3.5 Sonnet presents 40% decrease enter token prices in comparison with OpenAI’s GPT-4o, this obvious price benefit could be deceptive as a consequence of variations in how enter textual content is tokenized.
  • Hidden “tokenizer inefficiency”:
    Anthropic fashions are inherently extra verbose. For companies that course of giant volumes of textual content, understanding this discrepancy is essential when evaluating the true price of deploying fashions.
  • Area-dependent tokenizer inefficiency:
    When selecting between OpenAI and Anthropic fashions, consider the character of your enter textual content. For pure language duties, the fee distinction could also be minimal, however technical or structured domains could result in considerably larger prices with Anthropic fashions.
  • Efficient context window:
    As a result of verbosity of Anthropic’s tokenizer, its bigger marketed 200K context window could provide much less efficient usable area than OpenAI’s 128K, resulting in a potential hole between marketed and precise context window.

Anthropic didn’t reply to VentureBeat’s requests for remark by press time. We’ll replace the story in the event that they reply.


Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles