mirror of
https://github.com/huggingface/transformers.git
synced 2025-11-05 21:04:37 +08:00
Compare commits
5 Commits
v4.51.2
...
fix-Parame
| Author | SHA1 | Date | |
|---|---|---|---|
| 04dd2e6cfa | |||
| dcbf4404a5 | |||
| b00809a417 | |||
| a5520be6bd | |||
| 71bc2f7229 |
2
.github/workflows/doctests.yml
vendored
2
.github/workflows/doctests.yml
vendored
@ -3,7 +3,7 @@ name: Doctests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- run_doctest*
|
||||
- fix-Parameter-init
|
||||
repository_dispatch:
|
||||
schedule:
|
||||
- cron: "17 2 * * *"
|
||||
|
||||
34
.github/workflows/self-scheduled-caller.yml
vendored
34
.github/workflows/self-scheduled-caller.yml
vendored
@ -7,17 +7,9 @@ on:
|
||||
- cron: "17 2 * * *"
|
||||
push:
|
||||
branches:
|
||||
- run_scheduled_ci*
|
||||
- fix-Parameter-init
|
||||
|
||||
jobs:
|
||||
model-ci:
|
||||
name: Model CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
with:
|
||||
job: run_tests_gpu
|
||||
slack_report_channel: "#transformers-ci-daily-models"
|
||||
secrets: inherit
|
||||
|
||||
torch-pipeline:
|
||||
name: Torch pipeline CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
@ -26,14 +18,6 @@ jobs:
|
||||
slack_report_channel: "#transformers-ci-daily-pipeline-torch"
|
||||
secrets: inherit
|
||||
|
||||
tf-pipeline:
|
||||
name: TF pipeline CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
with:
|
||||
job: run_pipelines_tf_gpu
|
||||
slack_report_channel: "#transformers-ci-daily-pipeline-tf"
|
||||
secrets: inherit
|
||||
|
||||
example-ci:
|
||||
name: Example CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
@ -41,19 +25,3 @@ jobs:
|
||||
job: run_examples_gpu
|
||||
slack_report_channel: "#transformers-ci-daily-examples"
|
||||
secrets: inherit
|
||||
|
||||
deepspeed-ci:
|
||||
name: DeepSpeed CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
with:
|
||||
job: run_all_tests_torch_cuda_extensions_gpu
|
||||
slack_report_channel: "#transformers-ci-daily-deepspeed"
|
||||
secrets: inherit
|
||||
|
||||
quantization-ci:
|
||||
name: Quantization CI
|
||||
uses: ./.github/workflows/self-scheduled.yml
|
||||
with:
|
||||
job: run_tests_quantization_torch_gpu
|
||||
slack_report_channel: "#transformers-ci-daily-quantization"
|
||||
secrets: inherit
|
||||
|
||||
@ -858,7 +858,7 @@ class Data2VecAudioModel(Data2VecAudioPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -868,7 +868,7 @@ class Data2VecAudioModel(Data2VecAudioPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1005,7 +1005,7 @@ class HubertModel(HubertPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1015,7 +1015,7 @@ class HubertModel(HubertPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -862,7 +862,7 @@ class SEWModel(SEWPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -872,7 +872,7 @@ class SEWModel(SEWPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1388,7 +1388,7 @@ class SEWDModel(SEWDPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1398,7 +1398,7 @@ class SEWDModel(SEWDPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -616,7 +616,7 @@ class SpeechT5SpeechEncoderPrenet(nn.Module):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -626,7 +626,7 @@ class SpeechT5SpeechEncoderPrenet(nn.Module):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1121,7 +1121,7 @@ class UniSpeechModel(UniSpeechPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1131,7 +1131,7 @@ class UniSpeechModel(UniSpeechPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1139,7 +1139,7 @@ class UniSpeechSatModel(UniSpeechSatPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1149,7 +1149,7 @@ class UniSpeechSatModel(UniSpeechSatPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1496,7 +1496,7 @@ class Wav2Vec2Model(Wav2Vec2PreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1506,7 +1506,7 @@ class Wav2Vec2Model(Wav2Vec2PreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1087,7 +1087,7 @@ class Wav2Vec2BertModel(Wav2Vec2BertPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1097,7 +1097,7 @@ class Wav2Vec2BertModel(Wav2Vec2BertPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1273,7 +1273,7 @@ class Wav2Vec2ConformerModel(Wav2Vec2ConformerPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1283,7 +1283,7 @@ class Wav2Vec2ConformerModel(Wav2Vec2ConformerPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
@ -1158,7 +1158,7 @@ class WavLMModel(WavLMPreTrainedModel):
|
||||
|
||||
if mask_time_indices is not None:
|
||||
# apply SpecAugment along time axis with given mask_time_indices
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
elif self.config.mask_time_prob > 0 and self.training:
|
||||
mask_time_indices = _compute_mask_indices(
|
||||
(batch_size, sequence_length),
|
||||
@ -1168,7 +1168,7 @@ class WavLMModel(WavLMPreTrainedModel):
|
||||
min_masks=self.config.mask_time_min_masks,
|
||||
)
|
||||
mask_time_indices = torch.tensor(mask_time_indices, device=hidden_states.device, dtype=torch.bool)
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed
|
||||
hidden_states[mask_time_indices] = self.masked_spec_embed.to(hidden_states.dtype)
|
||||
|
||||
if self.config.mask_feature_prob > 0 and self.training:
|
||||
# generate indices & apply SpecAugment along feature axis
|
||||
|
||||
Reference in New Issue
Block a user