1 bit SGD and not scaling on more GPUs
I am using the binary with 1 bit SGD. SHA1: 2f9a48c71dc0a6097498cb7e90ac3b151ab536dd
- Is their any flag or variable that I can use to use the other binary (not with 1 bit SGD) with 1 bit SGD? I have tried to play with different variables in the section. I have changed the gradientBits to 1, but no luck.
ParallelTrain=[
parallelizationMethod="DataParallelSGD"
distributedMBReading="true"
parallelizationStartEpoch=1
DataParallelSGD=[
gradientBits=32
]
- Also the same code (Sample Alexnet code) runs on 2 GPUs (mpiexec -n 2 parallelTrain=true) but not with 4 GPUs. Any insights why it is not scaling on more GPUs?
A lot of things may affect the scaling up with multiple GPUs or computers, e.g., hardware configuration and mini-batch size. You can first validate on CNTK's benchmark https://github.com/Alexey-Kamenev/Benchmarks. If you couldn't observe scaling up on this benchmark, you need to upgrade hardware. Otherwise, you may need to tune training parameters.
There is no way to make binary not build with 1-bit quantization support support 1-bit. The reason is the fact that 1-bit library is a header file provided during build of CNTK. If it wasn't there during build, it cannot be retrofitted. What you are asking for is binary (loadlib) dependency on 1-bit, which is currently not supported.
As the other comment says, many things affect scale of 1-bit, and we have seen it scale very well on a large number of GPUs, so 4 should be no problem.
BTW, in order to enable 1-bit SGD, you must say
gradientBits=1
instead of 32, which will use 32-bit floats for data exchange, which will not scale well in many scenarios.
Note also that 1-bit SGD often requires a warm-start period. This means that at the beginning of the training, you should not enable 1-bit SGD. Only once the model is over the initial shake-out, you should enable it.
Where that point is depends on the task and model size. In our typical speech scenarios, we run about 8M samples, which is about 0.7% of our the total number of samples (so that although we cannot parallelize for the first 8M samples, we still get a very nice end-to-end speedup).
This issue has been dormant for a while. The original question seems answer; please open a new issue if necessary. Thanks, Mark