Skip to content

Make Encoding class Countable#6

Merged
CodeWithKyrian merged 1 commit intomainfrom
feat/make-encoding-countable
Feb 6, 2026
Merged

Make Encoding class Countable#6
CodeWithKyrian merged 1 commit intomainfrom
feat/make-encoding-countable

Conversation

@CodeWithKyrian
Copy link
Owner

This PR makes the Encoding class implement the Countable interface. This allows consumers to directly assume the size of the encoding (based on the number of token IDs) using the count() function, improving the ergonomics of the class when checking sequence lengths.

@CodeWithKyrian CodeWithKyrian merged commit 5be81e0 into main Feb 6, 2026
5 checks passed
@CodeWithKyrian CodeWithKyrian deleted the feat/make-encoding-countable branch February 6, 2026 10:30
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