-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
convert.py: Hot Fix with VocabFactory Integration #4818
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b69021e
Update Imports and Add Notes for Future Reference
teleprint-me acf8f4b
Merge branch 'master' into convert-py
teleprint-me 15e1897
Refine Model Hyperparameters and Params Class
teleprint-me 3ca2b10
Restore BpeVocab and SentencePieceVocab classes
teleprint-me db4b8ac
refactor: Standardize vocabulary handling with HfVocab
teleprint-me 7e4a4eb
refactor: Enhance readability, functionality, and code quality
teleprint-me 5fa1a08
refactor: Update OutputFile class for enhanced model vocabulary manag…
teleprint-me 8aa5818
feat: Introduce VocabFactory for flexible vocabulary management in mo…
teleprint-me 226cea2
refactor: Improve code organization, argument parsing, and user inter…
teleprint-me 0614c33
refactor: Further refine functionality, improve user interaction, and…
teleprint-me c6af89e
chore: Apply ruff formatting to convert.py
teleprint-me 29abd8d
Revert to commit 0614c33
teleprint-me dd1c100
chore: Apply flake8 formatting rules
teleprint-me 787860a
refactor: Revise `check_vocab_size` for Enhanced Clarity and Correctness
teleprint-me 90582b7
py : fix outfile and outtype
ggerganov 7cfcee4
py : suggest hint for missing vocab size
ggerganov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: Introduce VocabFactory for flexible vocabulary management in mo…
…del conversion - The VocabFactory class is added to facilitate modular vocabulary handling. - The constructor initializes a directory path and detects vocabulary-related files. - The _select_file method provides file paths based on vocabulary type (e.g., BPE, SentencePiece). - _create_special_vocab generates special vocabularies, accommodating different types. - The load_vocab method loads vocabularies, handling BPE, SentencePiece, and Hugging Face Fast Tokenizer. - Error handling and logging enhance debugging and user feedback. - The modular and flexible design simplifies vocabulary management and supports future extensions. The VocabFactory class enhances code modularity and maintainability, allowing versatile vocabulary handling in the model conversion process.
- Loading branch information
commit 8aa5818a20af134173ffe5daad7e529bd22d46f9
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several examples of else-after-return here, which is an anti-pattern.