Skip to content

Integrate HuggingFace tokenizer for BPE tokenization - #23

Merged
mizzy merged 1 commit into
mainfrom
issue-11-tokenizer
Jun 28, 2026
Merged

Integrate HuggingFace tokenizer for BPE tokenization#23
mizzy merged 1 commit into
mainfrom
issue-11-tokenizer

Conversation

@mizzy

@mizzy mizzy commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Closes #11

Summary

  • Add PyxisTokenizer wrapper around the HuggingFace tokenizers crate
  • load(path) loads a tokenizer.json file
  • encode(text) converts text to token IDs
  • decode(token_ids) converts token IDs back to text
  • Integration tests using the real Qwen3-1.7B tokenizer.json (skipped if file not present)

Note: This PR covers the tokenizer integration part of Issue #11. The autoregressive generation loop requires Issue #10 (output head) first and will be implemented separately.

Test plan

  • 44 tests pass (4 new tokenizer tests + 40 existing)
  • cargo clippy -- -D warnings clean
  • cargo check clean

🤖 Generated with Claude Code

Add PyxisTokenizer wrapper around the tokenizers crate, providing
encode (text → token IDs) and decode (token IDs → text). This is
the input side of the inference pipeline — converting text to the
token ID sequence that Embedding can look up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mizzy
mizzy merged commit 3417ee7 into main Jun 28, 2026
@mizzy
mizzy deleted the issue-11-tokenizer branch June 28, 2026 12:18
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.

Integrate tokenizer and autoregressive generation loop

1 participant