Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DraftRetriever datastore read/write for large tokenizers and vocabulary sizes (i.e. llama3+) #23

Closed
wants to merge 2 commits into from

Conversation

scandukuri
Copy link

Here we make the necessary changes to read and write suffixes to memory and file for large tokenizers; the original implementation only supported token IDs up to Rust u16::MAX (65,535).

Crucially, using Rust i32 for reading and writing individual token IDs (instead of u16 originally) allows the tool to support token IDs of up to Rust i32::MAX (2,147,483,647), and still allows negative placeholder IDs for padding in the implementation like -2.

@zhenyuhe00
Copy link
Collaborator

Hi,
Thank you for the fix. Would you consider creating a new branch? The change from "u16" to "i32" isn't needed for models with small vocabulary size and would increase disk storage usage unnecessarily.

@scandukuri
Copy link
Author

scandukuri commented Nov 20, 2024 via email

@zhenyuhe00
Copy link
Collaborator

That sounds great! Appreciate your effort.

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