Skip to content

Respect BPE cache_capacity when reading JSON - #2420

Open
LysandreJik wants to merge 1 commit into
mainfrom
train_encode_split_fix_cache
Open

LysandreJik wants to merge 1 commit into
mainfrom
train_encode_split_fix_cache

Conversation

@LysandreJik

Copy link
Copy Markdown
Member

tk-serialize currently ignores the cache_capacity field when reading a BPE model from tokenizer.json.

This means that setting cache_capacity: 0 doesn't work as it's replaced by the default BPE cache capacity of 65,536.

This fix reads cache_capacity from the BPE JSON configuration when present.

PS: not an expert in the codebase so there is very likely a more elegant solution 馃槆 I can confirm that with this I manage to set the cache correctly, though.

Base automatically changed from feat/train_encode_split to main September 18, 2026 11:22
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