Claudeトークンカウンター、モデル比較機能を追加
本文の状態
日本語全文を表示中
詳細モードで約2分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Simon Willison Blog
シモン・ウィルソン氏はClaudeトークンカウンターを改良し、複数モデルのトークン数を比較する機能を追加した。Opus 4.7はトークナイザーを変更したため、主に同モデルと4.6の比較に利用可能である。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Claude Token Counter、モデル比較機能付き
私は、異なるモデルに対して同じカウントを実行して比較できる機能を追加するため、Claude Token Counterツールをアップグレードしました。
私の知る限り、Claude Opus 4.7はトークナイザー(tokenizer)を変更した初のモデルであり、そのため比較を行うのは4.7と4.6の間で意味があります。ただし、Claudeのtoken counting APIは任意のClaudeモデルIDを受け付けるため、主要な現在の4つのモデル(Opus 4.7および4.6、Sonnet 4.6、Haiku 4.5)のすべてのオプションを記載しました。
Opus 4.7の発表においてAnthropicは述べています:
Opus 4.7はテキストの処理方法を改善した更新版トークナイザー(tokenizer)を採用しています。その代償として、同じ入力でもより多くのトークンにマッピングされる可能性があり、コンテンツの種類によっては約1.0〜1.35倍になります。
私はOpus 4.7 system promptをtoken counting toolに貼り付けましたが、その結果、Opus 4.7のトークナイザー(tokenizer)はOpus 4.6の約1.46倍のトークン数を使用することがわかりました。

Opus 4.7はOpus 4.6と同じ価格体系を採用しています(入力トークン100万個あたり5ドル、出力トークン100万個あたり25ドル)ですが、このトークン膨張(token inflation)により、コストは約40%高くなると予想されます。
このtoken counterツールは画像も受け付けます。Opus 4.7は高解像度画像のビジョン処理(vision)が向上しており、長辺が最大2,576ピクセル(約3.75メガピクセル)の画像を受け付けることができます。これは以前のClaudeモデルの3倍以上です。
私は3456 × 2234ピクセル、3.7MBのPNG画像でトークンカウントを試したところ、さらに大きな増加を確認しました。4.7は4.6と比較してトークン数が3.01倍になりました:

タグ:ai, generative-ai, llms, anthropic, claude, llm-pricing, tokenization
原文を表示
Claude Token Counter, now with model comparisons
I upgraded my Claude Token Counter tool to add the ability to run the same count against different models in order to compare them.
As far as I can tell Claude Opus 4.7 is the first model to change the tokenizer, so it's only worth running comparisons between 4.7 and 4.6. The Claude token counting API accepts any Claude model ID though so I've included options for all four of the notable current models (Opus 4.7 and 4.6, Sonnet 4.6, and Haiku 4.5).
In the Opus 4.7 announcement Anthropic said:
Opus 4.7 uses an updated tokenizer that improves how the model processes text. The tradeoff is that the same input can map to more tokens—roughly 1.0–1.35× depending on the content type.
I pasted the Opus 4.7 system prompt into the token counting tool and found that the Opus 4.7 tokenizer used 1.46x the number of tokens as Opus 4.6.

Opus 4.7 uses the same pricing is Opus 4.6 - $5 per million input tokens and $25 per million output tokens - but this token inflation means we can expect it to be around 40% more expensive.
The token counter tool also accepts images. Opus 4.7 has improved image support, described like this:
Opus 4.7 has better vision for high-resolution images: it can accept images up to 2,576 pixels on the long edge (~3.75 megapixels), more than three times as many as prior Claude models.
I tried counting tokens for a 3456 × 2234 pixel 3.7MB PNG and got an even bigger increase in token counts - 3.01x times the number of tokens for 4.7 compared to 4.6:

Tags: ai, generative-ai, llms, anthropic, claude, llm-pricing, tokenization
News to Guide
ニュースの次に確認する
発表内容を、現在の料金や仕様と照らし合わせられる関連ガイドです。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み