-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
SpeechLM Update #12430
base: main
Are you sure you want to change the base?
SpeechLM Update #12430
Conversation
Signed-off-by: stevehuang52 <[email protected]>
add type hint Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: artbataev <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
input_ids = [sample.input_ids for sample in samples] | ||
context_ids = [sample.context_ids for sample in samples] | ||
context_lengths = [sample.context_length for sample in samples] | ||
answer_ids = [sample.answer_ids for sample in samples] |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
if self.target_module is not None: | ||
model = get_nested_attr(asr_model, self.target_module) | ||
|
||
model = HFWrappedEncoder(model) |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
elif isinstance(inputs, tuple) and len(inputs) == 4: | ||
context_tokens_tensor, context_length_tensor, audio_signal, audio_signal_length = inputs | ||
elif isinstance(inputs, tuple) and len(inputs) == 6: # multi-audio | ||
has_multi_audios = True |
Check notice
Code scanning / CodeQL
Unused local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 2 days ago
The best way to fix the problem is to remove the unused variable has_multi_audios
. This will clean up the code and eliminate the unnecessary assignment. Specifically, we need to remove the line where has_multi_audios
is assigned a value and any related code that references it.
-
Copy modified line R196
@@ -195,3 +195,3 @@ | ||
context_start_idx = None | ||
if has_multi_audios: | ||
if num_audios is not None: | ||
num_audios = torch.empty(batch_size, dtype=torch.int64, device=torch.cuda.current_device()) | ||
@@ -367,3 +367,2 @@ | ||
tokenizer = model.tokenizer | ||
has_multi_audios = False | ||
num_audios = None | ||
@@ -377,3 +376,2 @@ | ||
elif isinstance(inputs, tuple) and len(inputs) == 6: # multi-audio | ||
has_multi_audios = True | ||
( |
Important
The
Update branch
button must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
A couple of important updates in SpeechLM
Collection: [speechlm]
Changelog