mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

how to accelerate training process of lstm model?

Open littleDing opened this issue 10 years ago • 3 comments

I am playing with the example/rnn/lstm.py char-rnn codes. When I use 4 gpus to run, it only use 10-30% on each of them and cpu is around 200%. I've tried kvstore = local, all_reduce_cpu, all_reduce_device etc, nothing better, some may be even worse then the default option local_update_cpu.

Any tricks to accelerate this ?

More details: data set : 132w Chinese sentences, with Jieba to cut words, 4.5w words. params : batch_size = 128, buckets = [40], num_hidden = 64, num_embed = 16, num_lstm_layer = 3 devices : Tesla K40c * 4, mxnet building with USE_CUDA=1 and USE_CUDNN=0

some speed logs : 02:48:47 INFO:Auto-select kvstore type = local_update_cpu 02:48:47 INFO:Start training with [gpu(0), gpu(1), gpu(2), gpu(3)] 02:57:50 INFO:Epoch[0] Batch [1000] Speed: 235.90 samples/sec Train-Perplexity=129.630862 03:06:47 INFO:Epoch[0] Batch [2000] Speed: 238.64 samples/sec Train-Perplexity=15.946662 03:15:47 INFO:Epoch[0] Batch [3000] Speed: 237.14 samples/sec Train-Perplexity=14.958449

littleDing avatar Aug 27 '16 07:08 littleDing

having the same issue.

magic282 avatar Aug 28 '16 13:08 magic282

Increasing the batch size?

pluskid avatar Sep 01 '16 20:09 pluskid

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

phunterlau avatar Sep 28 '17 06:09 phunterlau