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
79712e7e
Unverified
Commit
79712e7e
authored
Jun 01, 2021
by
Stas Bekman
Committed by
GitHub
Jun 01, 2021
Browse files
[deepspeed] docs (#11940)
* deepspeed docs * cleanup * cleanup
parent
985d7088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
docs/source/main_classes/trainer.rst
docs/source/main_classes/trainer.rst
+28
-0
No files found.
docs/source/main_classes/trainer.rst
View file @
79712e7e
...
...
@@ -1627,6 +1627,34 @@ Here is the `documentation
<
https
://
www
.
deepspeed
.
ai
/
docs
/
config
-
json
/#
automatic
-
mixed
-
precision
-
amp
-
training
-
options
>`
__
.
Batch
Size
=======================================================================================================================
To
configure
batch
size
,
use
:
..
code
-
block
::
json
{
"train_batch_size"
:
"auto"
,
"train_micro_batch_size_per_gpu"
:
"auto"
}
and
the
:
class
:`~
transformers
.
Trainer
`
will
automatically
set
``
train_micro_batch_size_per_gpu
``
to
the
value
of
``
args
.
per_device_train_batch_size
``
and
``
train_batch_size
``
to
``
args
.
world_size
*
args
.
per_device_train_batch_size
*
args
.
gradient_accumulation_steps
``.
You
can
also
set
the
values
explicitly
:
..
code
-
block
::
json
{
"train_batch_size"
:
12
,
"train_micro_batch_size_per_gpu"
:
4
}
But
then
you
're on your own synchronizing the :class:`~transformers.Trainer` command line arguments and the DeepSpeed
configuration.
Gradient Accumulation
=======================================================================================================================
...
...
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