Skip to content

chore(post-process): remove polymorphism + encode_into - #2399

Draft
SBrandeis wants to merge 4 commits into
feat/train_encode_splitfrom
chore/no-const-bools
Draft

SBrandeis wants to merge 4 commits into
feat/train_encode_splitfrom
chore/no-const-bools

Conversation

@SBrandeis

Copy link
Copy Markdown
Contributor

No description provided.

SBrandeis and others added 4 commits September 10, 2026 12:05
Batches of sequences and of pairs, short lines and 4 KiB documents, with
and without special tokens, on llama-3 (prefix-only template, type ids in
the pair) and roberta (prefix, suffix and a two-token infix, no type ids).
Every row of a length encodes the same bytes, so the post-processor's share
shows up as the gap between rows; encode.rs cannot give it a stage row.

1 s warm-up, 2 s measurement, 50 samples: 16 rows in about 70 s. Two runs
of the same build drift by 5-7 % on a laptop with 5 s windows as well, so
the longer window bought nothing; the module doc says to alternate builds
and compare medians.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The micro-bench named a `post_process_no_specials` that only existed in a
scratch variant, so `cargo bench -p tk-encode` did not compile at HEAD.
Both rows now go through `post_process::<true>` and `::<false>`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SBrandeis
SBrandeis changed the base branch from main to feat/train_encode_split September 10, 2026 14:35

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit weird to have that single bench in tk-serialize, can you explain a bit the motivation?

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.

2 participants