Skip to content

BitEmbedding from utf8-tokenizer instead of WeLT's own copy - #79

Merged
AmitMY merged 2 commits into
mainfrom
simplify/bit-embedding
Oct 11, 2026
Merged

AmitMY merged 2 commits into
mainfrom
simplify/bit-embedding

Conversation

@AmitMY

@AmitMY AmitMY commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #78.

BitEmbedding from utf8-tokenizer

WeLT's ByteEmbedding (a byte table plus a zero-initialized projection of each byte's bits, folded into a plain table for export) moved to utf8-tokenizer as BitEmbedding (sign/utf8-tokenizer#14, released in 0.8.4). WeLT now imports it.

The parameter names are the same (weight, bit_proj), so existing checkpoints load unchanged.

The dependency is utf8-tokenizer[fast]>=0.8.5 with words-segmentation>=0.0.7: 0.8.5 renamed the control-tokens pattern words-segmentation uses (sign/utf8-tokenizer#16, sign/words-segmentation#9).

Tests

With 0.8.4 installed, test_model.py, test_model_overfitting.py, test_processor.py and test_train.py pass (train → export → vLLM generation): 40 passed, 1 skipped. The Docker image needs a rebuild to pick up 0.8.4.

🤖 Generated with Claude Code

https://claude.ai/code/session_015Xm62qoeaTunFSU5GYCQ1f


Note

Low Risk
Localized embedding swap with compatible parameter names; main risk is version skew if environments don’t pick up the bumped tokenizer/segmentation deps.

Overview
Removes WeLT’s in-repo ByteEmbedding and wires byte embeddings through BitEmbedding from utf8-tokenizer for the bytes encoder and decoder.

Dependency floors move to words-segmentation>=0.0.7 and utf8-tokenizer[fast]>=0.8.5 (aligned control-token naming). weight and bit_proj are unchanged, so existing checkpoints should load without migration.

Reviewed by Cursor Bugbot for commit bef353f. Bugbot is set up for automated code reviews on this repo. Configure here.

autoresearch and others added 2 commits October 11, 2026 05:39
The same module (a byte table plus a projection of each byte's bits, folded for export), with the same parameter
names, so checkpoints load unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Xm62qoeaTunFSU5GYCQ1f
…TERN renamed in both)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Xm62qoeaTunFSU5GYCQ1f
@AmitMY
AmitMY changed the base branch from simplify/cleanup to main October 11, 2026 09:39
@AmitMY
AmitMY force-pushed the simplify/bit-embedding branch from fb5beef to bef353f Compare October 11, 2026 09:39
@AmitMY
AmitMY merged commit 704a8b8 into main Oct 11, 2026
1 check passed
@AmitMY
AmitMY deleted the simplify/bit-embedding branch October 13, 2026 06:45
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