-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add design doc for lookup remote table in Fluid #9068
Merged
Yancey1989
merged 12 commits into
PaddlePaddle:develop
from
Yancey1989:large_model_design_doc
Jul 5, 2018
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cb7891a
Add large model design doc
Yancey1989 af8c728
update png
Yancey1989 b382747
add note message
Yancey1989 f839e91
update by comment
Yancey1989 302136e
update by comment
Yancey1989 5948fd2
Refine the prefetch parameter document
1b4db80
update by lookup remote table
Yancey1989 282aa96
modify the picture size
Yancey1989 cc1e949
update figure
Yancey1989 1c5616b
Merge branch 'develop' of github.com:PaddlePaddle/Paddle into large_m…
Yancey1989 285e7ac
merge fluid lookup table into abacus one
Yancey1989 e343afb
polish sentense
Yancey1989 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Design Doc: Prefetching Parameter From Parameter Server | ||
|
||
## Abstract | ||
|
||
We propose an approach to prefetch parameter from Parameter | ||
Server while distributed training so that Fluid would training | ||
a model including the large parameter which could not be stored in one | ||
trainer's memory. | ||
|
||
## Background | ||
|
||
For an embedding layer, the trainable parameter may be very large and could | ||
not be stored in one trainer's memory. In Fluid distributed training, | ||
[Distributed Transpiler](./parameter_server.md#distributed-transpiler) would split every parameter into a number of small | ||
parameters and stored in Parameter Server, so we could prefetch the parameter | ||
from the specified Parameter Server according to the input `Ids`. | ||
|
||
## Design | ||
|
||
This is a feature of Fluid distributed training, maybe you want | ||
to know [Distributed Architecture](./distributed_architecture.md) and | ||
[Parameter Server](./parameter_server.md) before reading the following content. | ||
|
||
### Partationed Parameter | ||
|
||
<img src="src/split_parameter.png" width="400" /> | ||
|
||
- **Distributed Transpiler** would split the large parameter | ||
(weight) into some partitioned parameters (weight_0, weight_1, weight_2) as the | ||
figure above. | ||
- We could use `round-robin` to distribute the partitioned parameter. | ||
|
||
### Prefetching Parameter | ||
|
||
<img src="src/prefetch_parameters.png" width="400" /> | ||
|
||
- `prefetch_rpc` operator would prefetch the parameter from different Parameter | ||
Server according with the input `Ids`, we use [SelectedRows](../../../design/selected_rows.md) | ||
as the received variable type. | ||
- `merge_selected_rows` operator would merge the received parameters into one | ||
`SelectedRows` variable. | ||
|
||
## TODO | ||
|
||
- `prefetch_rpc` operator to send rows index and receive SelectedRows variables. | ||
- `lookup_table` need to support `SelectedRows` variable type as input `Weight`. | ||
- Async Update, To avoid slow-node, Async update is important for distributed training, | ||
we need a design doc and implement it in future. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
pre-fetch
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.
It should be:
We propose an approach to pre-fetch the parameters from a Parameter Server while distributed training so that Fluid is able to train a model with a large number of parameters that cannot be stored in one trainer's memory.