# Design Doc: Prefetching Parameter From Parameter Server
# Design Doc: Lookup Remote Table while Distributed training
## Abstract
## Abstract
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.
We propose an approach to pre-fetch the parameters from a Parameter Server while distributed training so that Fluid can train a model with the very large parameter that cannot be stored in one trainer's memory.
## Background
## Background
For an embedding layer, the number of trainable parameters may be very large and it is likely that they may not be able to be stored in one trainer's memory. In Fluid distributed training,
For an embedding layer, the trainable parameter may be very large, and it is likely that it may not be able to be stored in one trainer's memory. In Fluid distributed training,
the [Distributed Transpiler](./parameter_server.md#distributed-transpiler) would split every parameter into a number of small parameters that are stored on the Parameter Server. Hence, we can pre-fetch the parameters from the specified Parameter Server using the input `Ids`.
the [Distributed Transpiler](./parameter_server.md#distributed-transpiler) would split every parameter into some small parameters that stored on the Parameter Server. Hence, we can pre-fetch the parameter from the specified Parameter Server using the input `Ids`.
## Design
## Design
Prior to reading this design, it would be useful for the reader to make themselves familiar with Fluid [Distributed Training Architecture](./distributed_architecture.md) and
Prior to reading this design, it would be useful for the reader to make themselves familiar with Fluid [Distributed Training Architecture](./distributed_architecture.md) and
[Parameter Server](./parameter_server.md).
[Parameter Server](./parameter_server.md).
### Partationed Parameter
The execution of `lookup local table` is as follows:
<imgsrc="src/split_parameter.png"width="400"/>
<imgsrc="src/lookup_local_table.png"width="400"/>
-**Distributed Transpiler** would split the large parameters
For some cases, the parameter(`weight`) may be very large, such as 10 billion features, the entire
(`weight`) into some partitioned parameters (`weight_0`, `weight_1`, `weight_2`) as shown in the
data could not be stored in one trainer's memory, so we need to partition this parameter and
figure above.
pre-fetch it at the beginning of each mini-batch, and we call it `lookup remote table`:
- We can use `round-robin` to distribute the partitioned parameter.