-
Notifications
You must be signed in to change notification settings - Fork 3.1k
add longform chunk inference #14864
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
base: salm-with-transcript-input-sharegpt
Are you sure you want to change the base?
add longform chunk inference #14864
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,11 @@ def _from_pretrained( | |
# this setting skips loading the original pretrained ASR and LLM weights, and loads the | ||
# final trained model weights directly. | ||
model_kwargs['cfg']['pretrained_weights'] = False | ||
# When loading from HF checkpoint, set init_from_path to the HF checkpoint directory | ||
# so it can load the model weights from the correct location. | ||
if 'init_from_path' in model_kwargs['cfg']: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
model_kwargs['cfg']['init_from_path'] = model_id | ||
|
||
return super()._from_pretrained( | ||
model_id=model_id, | ||
revision=revision, | ||
|
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.
">>" and "<<" are applied at the very beginning and end of the ASR transcript.
For short audio, the final "audio" embedding looks like:
I guess we can do the same for long audio:
But here it seems ">>" and "<<" are added for each chunk instead