Skip to content

Embed tiktoken vocab files in binary, drop reqwest dependency#7

Merged
bbrowning merged 1 commit into
oss-harmony:mainfrom
bbrowning:embed-tiktokens
May 13, 2026
Merged

Embed tiktoken vocab files in binary, drop reqwest dependency#7
bbrowning merged 1 commit into
oss-harmony:mainfrom
bbrowning:embed-tiktokens

Conversation

@bbrowning
Copy link
Copy Markdown

Bundle zstd-compressed cl100k_base and o200k_base vocab files via include_bytes! instead of downloading them at runtime. This removes the reqwest dependency (and ~100 transitive crates including hyper, tokio, rustls, ring) and the sha1 crate, replacing them with zstd for decompression. The TIKTOKEN_ENCODINGS_BASE env var override is retained for loading from a local directory.

Bundle zstd-compressed cl100k_base and o200k_base vocab files via
include_bytes! instead of downloading them at runtime. This removes
the reqwest dependency (and ~100 transitive crates including hyper,
tokio, rustls, ring) and the sha1 crate, replacing them with zstd
for decompression. The TIKTOKEN_ENCODINGS_BASE env var override is
retained for loading from a local directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bbrowning bbrowning merged commit 3026b84 into oss-harmony:main May 13, 2026
24 checks passed
@bbrowning bbrowning deleted the embed-tiktokens branch May 13, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant