[BCI] QVAC-17071 feat: add BCI neural signal support (variable conv1 kernel + windowed attention)#9
Closed
sharmaraju352 wants to merge 2 commits into
Closed
[BCI] QVAC-17071 feat: add BCI neural signal support (variable conv1 kernel + windowed attention)#9sharmaraju352 wants to merge 2 commits into
sharmaraju352 wants to merge 2 commits into
Conversation
Read n_audio_conv1_kernel from model hparams to allow BCI models to use a non-standard first convolution kernel size. Standard whisper models default to kernel size 3. Made-with: Cursor
bc4aeaa to
7cf098d
Compare
Add windowed attention mask support controlled by two new model hparams: n_audio_window_size and n_audio_last_window_layer. When present in the model, encoder self-attention is restricted to a local window for layers up to last_window_layer, improving BCI neural signal transcription quality. Also adds proper SOS token (language + transcribe) initialization when the model uses windowed attention, matching the behavior expected by BCI-trained models. Made-with: Cursor
7cf098d to
1e91c27
Compare
Author
|
Closing in favor of a new PR based on v1.8.4.1 with flash attention fix. |
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.
Summary
Adds two changes to whisper.cpp to support brain-computer interface (BCI) neural signal transcription:
1. Variable conv1 kernel size
n_audio_conv1_kernelfrom model hparams (defaults to 3 for standard whisper models)2. Windowed self-attention for encoder layers
n_audio_window_sizeandn_audio_last_window_layerhparamslast_window_layerBackward compatibility
Both changes are backward-compatible:
n_audio_conv1_kerneldefaults to3(standard whisper behavior)n_audio_window_sizedefaults to0andn_audio_last_window_layerdefaults to-1, which disables windowed attention entirelyContext
These changes are required by the new
@qvac/bci-whispercppaddon: tetherto/qvac#1583Test plan
Made with Cursor