Elsewhere
https://simonwillison.net/elsewhere/📌 Simon Willison 更新 ttok:確認 GPT-6 與 GPT-5 共用同一套 Tokenizer
TL;DR:ttok 升級到 1.0 並預設改用 GPT-5/6 的 tokenizer,同時作者也動手做了一個對應 OpenAI 新 Decisions API 的外掛工具。
OpenAI 到目前都沒正式公告 GPT-6 是否沿用 GPT-5 家族的 tokenizer,社群甚至為此開了一張「生氣的 issue」。開發者工具作者 Simon Willison 沒有等官方回應,而是直接用升級自己的 CLI 工具來驗證答案。
🧩 ttok 0.4 → 1.0:一個小 bug 換來的版本躍進
ttok 是 Simon Willison 維護的 token 計算 CLI 工具,底層用 OpenAI 開源的 tiktoken 函式庫。這個工具已經兩年沒更新,這次重啟是因為他跑 uv tool upgrade ttok 後發現新版本預設竟然還在用 GPT-4 的 tokenizer——對一個早該預設 GPT-5/6 的工具來說明顯不合理。他把「切換預設 tokenizer」當作出 1.0 正式版的理由,順手修掉一個 Click 警告、更新了 CI,還加上 --list-models 指令列出可用模型。透過 uvx 執行,任何人都能直接對一份檔案算 token 數,不需要額外安裝環境。
📊 證據:七個 GPT-6 模型,31 組測資,結果一致
至於 GPT-6 是否真的沿用 GPT-5 的 tokenizer,Simon 引用了開發者 William Liu 的一份 commit 實驗結果作為佐證:全部七個 GPT 模型(5.5、5.6 的 Sol/Terra/Luna,以及 6 的 Astra/Sol/Luna)在 31 個測試樣本上,都回報出完全一致的 44,794 個 token,彼此沒有任何落差。換句話說,GPT-6 在這份語料上並未帶來輸入計數上的變化,這也是 Simon 決定把 ttok 預設 tokenizer 切過去的依據。
🧩 順手做了一個 OpenAI Decisions API 外掛
OpenAI 在上週 DevDay 發布了「Jev 風格」的新 Decisions API。由於 Simon 已經有一個對接 Jev 的 llm-typesafe 外掛,他讓 GPT-6 Astra 讀完 OpenAI 的新文件後,仿照同樣模式建出 llm-openai-decisions 外掛。兩者在 API 設計上相當接近:都支援是非題、選項題、評分題三種問題類型,計價方式也都只對輸入收費、輸出免費——OpenAI 是每百萬 input token 收 10 美分,Jev 則是 4.2 美分。差異在於 OpenAI 新推出的 gpt-6-luna 決策模型除了文字外,還支援圖片輸入。
💡 順帶一提:為什麼 embedding 模型該保持開放權重
這份筆記也收錄了 Simon 對 Google EmbeddingGemma 2 採用 Apache 2.0 授權的肯定。他的論點很直接:embedding 模型的使用場景通常是一次性算出成千上萬、甚至百萬筆向量後長期儲存比對,如果模型是封閉、僅限託管的版本,一旦供應商停止提供該模型,使用者仍得花錢把所有舊向量重新算一次。他並不要求自己得親自 host 模型,而是希望「即使付費用託管服務,也能確保供應商停止服務時自己或其他業者能接手跑開放權重版本」。
🎯 對工程師的實務啟示
Token 計算、tokenizer 版本切換聽起來是小事,但直接牽動計費、上下文長度估算與遷移成本——這正是 ttok 這類小工具存在的價值。而 embedding 模型的授權選擇,則提醒工程團隊在導入第三方向量服務前,務必評估「供應商抽梯子」的長期風險。
🔗 來源
- 標題:Elsewhere
- 作者/機構:Simon Willison
- 連結:https://simonwillison.net/elsewhere/
#OpenAI #GPT6 #Tokenizer #LLM #DeveloperTools #EmbeddingGemma #OpenSource #AITooling #tiktoken #APIDesign
原始資料 Simon Willison · 收集於 2026-10-10
摘要原文
Release TIL Research Tool Museum Sighting Comment I released ttok 0.4 , ran uv tool upgrade ttok , piped a file into the new version... and realized that it was defaulting to the GPT-4 tokenizer when it should very clearly default to GPT-5/GPT-6 instead! I figured switching the default was a reasonable excuse to finally ship a 1.0. OpenAI haven't actually confirmed that GPT-6 uses the same tokenizer as the GPT-5 family yet - there's an angry issue about it - but I found this commit by William Liu which reports on an experiment he ran confirming that the tokenizers are likely the same: All seven GPT models (5.5, 5.6 Sol/Terra/Luna, 6 Astra/Sol/Luna) report 44,794 tokens and match each other on every one of the 31 fixtures. GPT-6 introduces no input-count change on this corpus. ttok is my CLI tool for counting tokens, using OpenAI's open source tiktoken library. It hasn't been in updated in a couple of years, but I finally fixed a Click warning, updated CI, and added a --list-models command to list available models. It works with uvx , so you can count tokens in anything like this: OpenAI released their new Jev-style Decisions API , as previously announced at last week's DevDay. Since I already have an llm-typesafe plugin for talking to Jev, I had GPT-6 Astra read the new OpenAI API documentation and build an llm-openai-decisions plugin inspired by llm-typesafe . Unlike Jev, the new gpt-6-luna decision model supports image input in addition to text. Both models charge for input it and not for output: OpenAI's is 10 cents per million input tokens, Jev's is 4.2 cents per million. Otherwise the API shape is very similar to Jev, at least conceptually. Jev supports three question types for yes/no, choices, or scores. OpenAI Decisions supports the same three types. Here's an example query against an image attachment: Consult the README for full details of how to run the other types of questions. Adds support for reasoning models, such as the newly released Mistral Large 4 . Comment My comment on EmbeddingGemma 2 — Hacker News I really appreciate that EmbeddingGemma 2 is under the Apache 2.0 license. For embedding models in particular, I don't think it makes sense to use a closed, proprietary, hosted-only model. Most applications of embedding models involve calculating thousands or even millions of embedding vectors and storing them for later comparison. If your model is proprietary, the vendor is likely someday going to decide to stop offering that model. They'll have a better model to replace it, but you still need to pay to re-calculate those millions of stored existing vectors. (In April 2024 OpenAI offered to "cover the financial cost of users re-embedding content with these new models" - https://openai.com/index/gpt-4-api-general-availability/ - but I don't think that's something we can rely on from every provider.) Notably, I don't want to host the model myself . I'd much rather pay a provider for a hosted model while knowing that if they ever stop hosting it I can run the open weights version myself - or find another vendor who can do that for me. # 6th October 2026 , 8:37 pm / google , ai , generative-ai , embeddings , gemma I saw Parseable in a Show HN today - it's a new observability platform with both an open source (AGPL) Rust implementation (a single ~180MB binary), an "Enterprise" version with extra features and a cloud hosted option. Since Datasette 1.0a41 added OpenTelemetry support (thanks, Alex Garcia), I decided to fire up Codex and have it figure out how to run Parseable and feed it traces from Datasette. Here's my (human-written) TIL showing the patterns that worked, and here's a screenshot of a Datasette trace displayed within the Parseable localhost web application: Comment My comment on Mistral Large 4 — Hacker News wren6991 : The benchmark is saturated. Frontier models are tested with an armadillo in fishnet tights jaywalking on Mars. OK well I couldn't resist this one: Default reasoning levels for each: https://tools.simonwillison.net/markdown-svg-renderer?url=ht... A minor fix for compatibility with the latest Datasette alphas. This meant we could upgrade the datasette.io site to Datasette 1.0a41. I wanted to see if Claude Opus 5.5 could compose music, so I tried this : I want you to write some computer game music for me. First design simple text based format for the music and build an artifact that can play it out loud - include some example tracks in that artifact I am looking for music of the quality of the original secret of Monkey Island It leaned a lot harder into the Monkey Island theme than I had intended, but the results are surprisingly good. I wonder if the ability to compose competent music is similar to the 3D graphics thing - a new capability for text models that emerged in the past few months? Would need some careful experiments with other recent and not-so-recent models to confirm if this is new or if they've been able to do this for a while. Colin Frasier posted on Bluesky about an experiment he ran over two years ago using GPT-4o to see how well it could "compute the sum but return the answer in words" across increasingly large numbers. Here's the chart he shared of those results: I'm confident GPT-4o didn't cheat and use a calculator, especially since it got so many of the calculations wrong, but I was inspired to run the experiment again on local hardware (a DGX Spark) to explore the effect in a fully controlled environment. I pasted his image into a Codex Remote session (GPT-6 Astra) and had it run the same experiment using Qwen3.8-27B-Q4_K_M.gguf . Here's the result for a run of 30 attempts per combination with reasoning disabled: Then I ran it again with reasoning enabled. This took a lot longer per pair, so instead of running 30 samples per square I ran just one - which results in a much less visually appealing heatmap since each square is either 100% or 0%: It got the right answer in 167 out of 169 attempts, and since these were one-shot I'm confident a second run would produce different results here. Here's a version of the report that includes the reasoning traces from some of those larger calculations, which include text like this: Located just before the turnstiles in the Grand Army Plaza subway station at the north end of Brooklyn's Prospect Park is this former newsstand which is now operated by a dinosaur. The density of dinosaur puns is exceptional . pwasm is one of my folly projects - an entirely vibe-coded pure Python WebAssembly engine that I built in January during my first bout of AI mania . I hadn't touched it since January, so I decided to let Claude Opus 5.5 loose on it and see if it could make any significant improvements: Evaluate current state of pwasm - then consider what it would take to get the MicroPython and micro JavaScript experiments from the research repo working under it - and what it would take to speed it up 42 commits later (with minimal follow-up prompting) it now handles almost all of the WASM specification, and the wheel from PyPI bundles working WASM builds of MicroPython , QuickJS and Micro QuickJS . I wouldn't trust this thing at all - hence the alpha version tag - but it's interesting seeing how today's models can improve on the work of models from 10 months ago. Comment My comment on GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price — Hacker News I'm a bit late with the pelicans because I was live-blogging the keynote: https://simonwillison.net/2026/Sep/29/openai-devday-2026-liv... Here they are for GPT-6.1-Sol: https://tools.simonwillison.net/markdown-svg-renderer?url=ht... They're not notably different from the GPT-6 family pelicans: https://static.simonwillison.net/static/2026/gpt-pelicans-gr... # 29th September 2026 , 6:27 pm / ai , openai , generative-ai , llms , pelican-riding-a-bicycle , gpt I took a photograph of some protesters, then thought about how I don't like sharing photographs of strangers with identifiable faces.
由 claude-code/sonnet 自動生成