Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
493643ff
Unverified
Commit
493643ff
authored
Sep 24, 2021
by
Patrick von Platen
Committed by
GitHub
Sep 24, 2021
Browse files
up (#13733)
parent
38580455
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
examples/pytorch/speech-recognition/README.md
examples/pytorch/speech-recognition/README.md
+1
-1
examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
.../pytorch/speech-recognition/run_speech_recognition_ctc.py
+1
-7
No files found.
examples/pytorch/speech-recognition/README.md
View file @
493643ff
...
...
@@ -81,7 +81,7 @@ of **0.35**.
The following command shows how to fine-tune
[
XLSR-Wav2Vec2
](
https://huggingface.co/transformers/master/model_doc/xlsr_wav2vec2.html
)
on
[
Common Voice
](
https://huggingface.co/datasets/common_voice
)
using 8 GPUs in half-precision.
```
bash
python
-m
torch.distributed.launch
\
OMP_NUM_THREADS
=
1
python
-m
torch.distributed.launch
\
--nproc_per_node
8 run_speech_recognition_ctc.py
\
--dataset_name
=
"common_voice"
\
--model_name_or_path
=
"facebook/wav2vec2-large-xlsr-53"
\
...
...
examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
View file @
493643ff
...
...
@@ -103,12 +103,6 @@ class ModelArguments:
"vectors will be masked along the time axis. This is only relevant if ``apply_spec_augment is True``."
},
)
gradient_checkpointing
:
Optional
[
bool
]
=
field
(
default
=
False
,
metadata
=
{
"help"
:
"If True, use gradient checkpointing to save memory at the expense of slower backward pass."
},
)
layerdrop
:
Optional
[
float
]
=
field
(
default
=
0.0
,
metadata
=
{
"help"
:
"The LayerDrop probability."
})
ctc_loss_reduction
:
Optional
[
str
]
=
field
(
default
=
"mean"
,
metadata
=
{
"help"
:
"The way the ctc loss should be reduced. Should be one of 'mean' or 'sum'."
}
...
...
@@ -438,7 +432,7 @@ def main():
"hidden_dropout"
:
model_args
.
hidden_dropout
,
"final_dropout"
:
model_args
.
final_dropout
,
"mask_time_prob"
:
model_args
.
mask_time_prob
,
"gradient_checkpointing"
:
model
_args
.
gradient_checkpointing
,
"gradient_checkpointing"
:
training
_args
.
gradient_checkpointing
,
"layerdrop"
:
model_args
.
layerdrop
,
"ctc_loss_reduction"
:
model_args
.
ctc_loss_reduction
,
"pad_token_id"
:
processor
.
tokenizer
.
pad_token_id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment