Add support for wav2vec2bert Models#2
Open
Korla-tech wants to merge 5 commits intoengineerchuan:mainfrom
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces support for wav2vec2-bert models, adding new conversion scripts, quantization tools, and C++ library targets. The changes include new build targets and scripts for handling wav2vec2-bert models, updates to documentation, and improvements to quantization logic for better compatibility and precision. Additionally, there are enhancements to token handling and rendering in the C++ inference code.
Support for wav2vec2-bert models:
models/convert-wav2vec2bert-to-ggml.pyto convert HuggingFace wav2vec2-bert models.wav2vec2-bertand associated build logic insrc/CMakeLists.txtfor handling wav2vec2-bert architectures.Quantization improvements:
quantize-wav2vec2bert.cppfor quantizing wav2vec2-bert models.common-ggml.cppto only quantize 2D tensors with row sizes compatible with the quantizer block size.Documentation updates:
README.mdwith instructions for converting, running, and quantizing wav2vec2-bert models, including new script and binary names.Token handling and rendering enhancements:
wav2vec2.cppfor identifying and rendering special tokens (such as space, pad, blank, unk), and improved token rendering for output.wav2vec2.cpp, without this the code crashed on some systems.