Live data from Hacker News

Show HN: Token price calculator for 400+ LLMs

github.com

11–20 of 79 posts

Re: Show HN: Token price calculator for 400+ LLMs

#11
With all the options there seems like an opportunity for a single point API that can take a series of prompts, a budget and a quality hint to distribute batches for most bang for buck.

Maybe a small triage AI to decide how effectively models handle certain prompts to preserve spending for the difficult tasks.

Does anything like this exist yet?

Re: Show HN: Token price calculator for 400+ LLMs

#12
post #2

I don't understand how the Claude functionality works. As far as I know Anthropic haven't released the tokenizer for Claude - unlike OpenAI's tiktoken - but your tool lists the Claude 3 models as supported. How are you counting tokens for those?

Anthropic actually has a Claude 3 tokenizer tucked away in one of their repos: https://github.com/anthropics/anthropic-tokenizer-typescript

At this moment, Tokencost uses the OpenAI tokenizer as a default tokenizer, but this would be a welcome PR!

Re: Show HN: Token price calculator for 400+ LLMs

#15
post #2

I don't understand how the Claude functionality works. As far as I know Anthropic haven't released the tokenizer for Claude - unlike OpenAI's tiktoken - but your tool lists the Claude 3 models as supported. How are you counting tokens for those?

Anthropic actually has a Claude 3 tokenizer tucked away in one of their repos: https://github.com/anthropics/anthropic-tokenizer-typescript At this moment, Tokencost uses the OpenAI tokenizer as a default tokenizer, but this would be a welcome PR!

"This package can be used to count tokens for Anthropic's older models. As of the Claude 3 models, this algorithm is no longer accurate [...]"

I've been bugging Anthropic about this for a while, they said that releasing a new tokenizer is not on their current roadmap.

Re: Show HN: Token price calculator for 400+ LLMs

#16
post #15

Earlier quoted context omitted.

Anthropic actually has a Claude 3 tokenizer tucked away in one of their repos: https://github.com/anthropics/anthropic-tokenizer-typescript At this moment, Tokencost uses the OpenAI tokenizer as a default tokenizer, but this would be a welcome PR!

"This package can be used to count tokens for Anthropic's older models. As of the Claude 3 models, this algorithm is no longer accurate [...]" I've been bugging Anthropic about this for a while, they said that releasing a new tokenizer is not on their current roadmap.

Imagine a coffee shop refusing to have a price list until after the coffee's been made.

Re: Show HN: Token price calculator for 400+ LLMs

#18
post #15

Earlier quoted context omitted.

"This package can be used to count tokens for Anthropic's older models. As of the Claude 3 models, this algorithm is no longer accurate [...]" I've been bugging Anthropic about this for a while, they said that releasing a new tokenizer is not on their current roadmap.

Imagine a coffee shop refusing to have a price list until after the coffee's been made.

In many countries a taxi won't tell you how much the ride will cost. The first time I traveled to somewhere that negotiated the cost up front it blew my mind.

Frequently, contracts will have room for additional charges if circumstances change even a little, or products will have a market rate (fish, equity, etc.).

It might seem absurd but variable cost things are not uncommon.

Re: Show HN: Token price calculator for 400+ LLMs

#20

Earlier quoted context omitted.

Imagine a coffee shop refusing to have a price list until after the coffee's been made.

In many countries a taxi won't tell you how much the ride will cost. The first time I traveled to somewhere that negotiated the cost up front it blew my mind. Frequently, contracts will have room for additional charges if circumstances change even a little, or products will have a market rate (fish, equity, etc.). It might seem absurd but variable cost things are not uncommon.

In Oman, every tax fare was basically just of the bills. So 5 rials, 10 rials, or 20 rials. So many different ways people price things around the world.
Post reply on HN