{"adoption": {"forks": 1598, "observed_at": "2026-08-28T04:11:27.409242+00:00", "stars": 19102}, "canonical_url": "https://ross.abutalabs.com/products/tiktoken", "card": {"archived": false, "artifact_type": "library", "description": "tiktoken is a fast BPE tokeniser for use with OpenAI's models.", "domain": ["large-language-models", "artificial-intelligence", "developer-tools"], "enriched": true, "function": ["nlp"], "health_score": 99, "homepage": null, "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["openai/tiktoken"], "name": "openai/tiktoken", "platform": ["python"], "pushed_at": "2026-08-17T05:25:57+00:00", "repo": "openai/tiktoken", "stars": 19102, "tags": ["tokenizer", "bpe", "byte-pair-encoding", "token-counting", "openai", "gpt", "llm", "text-encoding", "context-window", "encoding-decoding", "natural-language-processing"], "topics": [], "urls": [], "use_cases": ["count tokens for an OpenAI API request to fit the context window", "tokenize text the same way GPT-4 or GPT-4o does", "estimate OpenAI API costs by counting tokens in prompts", "encode and decode text reversibly with byte pair encoding", "split documents into token-sized chunks for LLM processing", "learn and visualise how BPE tokenization works", "look up the tokenizer corresponding to a specific OpenAI model"], "what_it_is": "tiktoken is a fast byte pair encoding (BPE) tokenizer library for Python built for OpenAI's language models, converting text into reversible, lossless token sequences and supporting encodings like o200k_base and cl100k_base. It includes an educational submodule for training simple BPE encodings and visualising how models like GPT-4 tokenize text.", "when_to_avoid": ["Your stack is not Python, since it is distributed as a pip package", "You need to train production-grade BPE vocabularies from scratch on your own corpus", "You only target non-OpenAI models and don't want to define or load custom encodings for their vocabularies"], "when_to_choose": ["You need token counts that exactly match how OpenAI models see text, e.g. for context limits or cost estimation", "You need a fast tokenizer that outpaces comparable open-source tokenizers by 3-6x on large text volumes", "You want a reversible, lossless encoder that works on arbitrary text and can be extended with custom encodings", "You want an educational tool to understand and visualise the BPE procedure"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/tiktoken", "repo": "openai/tiktoken", "role": "main", "score": 89}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:11:27.409242+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T17:00:31.874545+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0f4c9d7a61043f6a4d0797ae264b326db6b521a457f50799b755b48d44a8f84f", "fetched_at": "2026-08-28T04:11:27.409242+00:00", "kind": "readme", "missing": false, "url": "https://github.com/openai/tiktoken"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 98, "longevity": 97, "rhythm": 74}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1371, "days_push": 16, "days_rel": 16, "gap_med": 133, "n_releases_24m": 6}, "score": 89, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}