Skip to content

Preserve embedded NULs in native tokenizer input - #6157

Merged
joelteply merged 1 commit into
canaryfrom
codex/bigmama-tokenizer-bytes
Nov 19, 2026
Merged

joelteply merged 1 commit into
canaryfrom
codex/bigmama-tokenizer-bytes

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

BigMama recorded six failed embeddings in each of two 15-minute windows. Rust rejected an interior NUL at byte 7,135 while preparing a CString. llama_tokenize accepts a pointer and an explicit byte length. Pass the borrowed UTF-8 slice, check input and output bounds, and preserve the suffix.

The real Qwen embedding GGUF reproduced the offset, round-tripped all 7,152 bytes through 896 tokens, and produced a finite pooled embedding. The normal-vs-pooled vector comparison also passed. This change was deployed on BigMama before check-in. The 15-minute resident comparison ends at 05:49:11 UTC.

Stacked on #6156 for its feature-gated real-model test and pooled constructor. Retarget to canary after #6156 merges.

Base automatically changed from codex/bigmama-pooled-embedding to canary November 19, 2026 06:02
@joelteply
joelteply force-pushed the codex/bigmama-tokenizer-bytes branch from b99fba2 to a659530 Compare November 19, 2026 06:03
@joelteply
joelteply merged commit 4367949 into canary Nov 19, 2026
33 checks passed
@joelteply
joelteply deleted the codex/bigmama-tokenizer-bytes branch November 19, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant