Infrastructure for Deep Learning
openai.com
openai.com
We'll release in coming weeks.
If the data and models were small and training was quick (on the order of compilation time), I'd just keep the training data in git and train the model from scratch every time I run make. But the data is huge, training requires clusters of machines and can take days, so you need a pipeline.
An industrial strength system looks like this: https://code.facebook.com/posts/1072626246134461/introducing...
I'd be curious to see if there's a legit speed up there with the "real tensorflow".
For "on prem" stuff I think "deployment" is going to depend on the actual end use case.
Eg:no one in industry will keep their "training data" in git. They'd have an actual database with other systems surrounding it.
If it's just "run the model locally to view a web page running in a docker container I wouldn't see the problem here though.
The infra will also be different for training vs inference. For training you'll want gpus, but it's not realistic to run gpus with inference yet.
I'd love someone to comment on: https://developer.nvidia.com/gpu-inference-engine
though.
There's going to be a lot of non deep learning "stuff" involved here.
Much of it will be connected to the use case. Eg: deep learning for log analytics in production will be different than a computer vision pipeline.
Warning: highly biased player in the space.
It would be interesting to compare notes since we have deployed a number of models in production, and seem to focus on a related but different set of challenges. kenny at company dot com.
Thus, this post seems immensely useful to someone like me (a PhD student, also primarily concerned with exploring new ideas and getting my next conference paper), but I can see how others doing machine learning in-the-wild or in production might see a lot of questions left unanswered. I, for one, work primarily with health care data from hospital EHRs, and I spent a lot more time with data prep pipelines than folks working with, say, MNIST.
<0.1 = Too technical for even HN audience 0.1-1.0 = At the right level for the HN audience >1 = The topic is similar to painting the bike shed.
But actually all Deep Learning stuff, tutorials, videos are upvoted pretty quickly those times.
It's not a problem that HN has topics which are frequently upvoted; topics such as employment and Rust are popular memes.
It is a problem, however, if the upvote-for-the-title crowd upvote articles which are bad and would not get upvotes if they were about another topic. That's a legit hard problem to solve (what makes a good submission?), unfortunately, but one I've been looking into.
(For clarity, this submission is a good submission, but I've seen quite a few top-ranking HN submissions that are just a bar chart on a controversial topic that is poorly sourced. And linkbait about deep leaning tends to get upvotes, but flagged too.)
Maybe HN just needs to separate bookmarking and upvoting?
Jokes aside, I agree with your comment.
It has the effect of stifling a lot of interesting and important discussions and topics. I make an effort to up vote posts with too many comments to help them.
One area where we've had trouble with other orchestration tools (e.g. Docker Swarm) was in managing resources at anything beyond whole boxes. They are all good at managing CPU/RAM/Disk but we've had trouble with give this task GPU2. We had planned to try Mesos (given that we already run it for other things) but it sounds like maybe we should take a harder look at Kubernetes first.
It's unfortunate that so much effort has been spent on bringing tools up to speed with Python 3, but some groups still insist on dragging their feet. I understand the motivation when we're talking about an established company with a huge legacy code base, but within the research community it's kind of embarrassing.
Edit: it's not just the quickness of a single statement. It's that the print statements are about 30-50% of the code when you are working this way.
For Java/Scala people, Deeplearning4j has a pretty sophisticated Spark + GPUs setup:
http://deeplearning4j.org/spark
http://deeplearning4j.org/spark-gpus
[Disclosure: I help create DL4J, and it's supported by my startup, Skymind.]
TF was explicitly designed with distributed training in mind (their initial whitepaper and the DistBelief paper that came before it make this clear) -- I don't know how you came to this conclusion.
Usually when people say TF is slow, it turns out they've introduced a serious bottleneck somewhere.
What are these mythical problems you speak of? I'd hear to hear some specifics, because I haven't hit them yet.
* Disclosure: I work with Skymind and contribute to DL4J, and I also use TensorFlow/Theano/keras heavily in my PhD research. I am an equal opportunity framework guy. ;)
Spoiler: Tensorflow wins.
BTW I do not have any connection with DL4J, nor do I use it.
Training data is easy to duplicate and share nothing.
Large models with shared weights get tricky but less frequent asynchronous updates with schemes like hogwild seem to work with SGD. I believe TF has support for this too. It won't scale linearly but might be good enough.
There's some excitement about synthetic gradients to allow less communication and further parallelism.
The hpc community has certainly leveraged 400 GPU clusters.
It seems like a fun problem, and if you want to focus the resources, there isn't anything insurmountable about utilizing 400 GPUs :)
Also really hope there will be more options for GPU hardware on public clouds.
Eventually the pieces will come together and it will be trivial to deploy cloud 400gpus for an hour to run the load your local 4gpu workstation would spend 100 hours on, but we are definitely not there yet.
We are working on a packaging format called snappy (http://www.snapcraft.io) and starting to talk to TF guys about packaging TF with it (kubernetes is already packaged as a snap) - hopefully this will take some pain away once it's working
For data parallelism, we have a simple wrapper that covers as many GPUs as you want in one box. For more than one box, we use Spark, and the integration is explained here:
http://deeplearning4j.org/spark
The description for multi-GPUs is through this link: http://deeplearning4j.org/gpu under the subhead "Multi-GPU data parallelism".
The code is here: https://github.com/deeplearning4j/deeplearning4j/blob/77b836...
We're almost done testing on DGX's now, like the one you have at OpenAI, and once we work a bit more with RDMA-enabled hardware, we'll go Sparkless for that.
That's how we're hoping to get academic HW acceleration into production environments.
In September, we plan to come out with a Scala API inspired by Keras/Torch, which will also share a neural net config file with Keras and allow model imports into DL4J.
We actually are going to be doing some stuff with IBM/NVLink as well as some other neat things I can't announce. We'll be able to benchmark on this front similar to you guys though :).
We'll be doing RDMA for this and plan on writing the code to match that using spark for orchestration and data storage/loading.
Right now the main thing we do is data parallelism on partitions of data with intermittent averaging with data being trained on various spark partitions.
Other than that, we have multi gpu settings.
We've made it pretty configurable though: http://deeplearning4j.org/gpu
Admittedly, we'll continue to do more work in this area though.
So far fp16 has been pretty nice though :).
Training TF on a cluster is hard because you need to write your model to be cluster-aware. Apart from that it works pretty well.
From my understanding, DL4J can use Spark to coordinate training multiple models in parallel. This is interesting, but not the same thing at all.
Also TF on a cluster is much simpler to get running than Spark+DL4J.
Also no - we use data paralellism. I'd maybe check out our new spark page we put up that explains how parameter averaging works: http://deeplearning4j.org/spark
Basically we train on raw spark partitions. Basically because of the data parallelism we can also use hardware accel for our spark jobs, which means for training we'll train on gpus when present.
We use a spark master for the "parameter server" to handle communication of the parameter updates with multiple ways of controlling the averaging threshold per iteration among other things to minimize communication.
This allows us to do neat things like using cudnn on a spark cluster. I'll assume you're not interested in too many details there but happy to expand if needed.
Edit: When you "played" with us - I'm assuming you just cloned our examples and ran us on the desktop? Likely more than a year ago before our c++ rewrite? I'd be curious to see if you ran us on spark as well.
Running jvm based stuff is completely different than running a python job. I know jvm based stuff is a bit harder to get up and running because of the dependency clashes (with spark being jvm based etc)
If you're ever in scala land I encourage you to take a look at our keras port to scala when its out. We'll also be running reinforcement learning workloads on spark as well.
If it was from my last part - I'm actually asking for clarification because we've
often discovered this when people say they've tried us.
A lot of folks don't spend too much time on a framework and I don't blame them.
They are looking for a tool to get the job done and move on 99% of the time. That's more than fair.
The bulk of these folks also tend to be people who are mildly curious coming from python,
where most deep learning practitioners are.
That being said:
I was serious about each node being independent for spark.
Our linear algebra library runs as a spark job on each executor/slave node.
We've built in our own resource management via
javacpp that handles memory allocation for the cuda buffers
as well as cudnn.
The driver for spark then tracks the coefficients across spark rdd partitions which allows us to synchronize updates.
Look out for a blog post from us on parallelforall (nvidia's blog) here soon that explains how this works.
To quote your page:
Data parallelism shards large datasets and hands those pieces to separate neural networks, say, each on its own core. Deeplearning4j relies on Spark for this, training models in parallel
This isn't the same thing as the TensorFlow distributed training model at all.
You are thinking of grid search and the like. We implement grid search and bayesian on spark (the latter being closed source)
I didnt say it was the exactly the same as tf either. We have been doing this for close to 2 years now. Actually..Im not sure why it has to be? Its closer to hogwild and co.
You also never answered my question ;). Not sure what to assume here.
But it isn't the same as what TensorFlow does, and I'd argue it is much closer to my initial characterisation ("can use Spark to coordinate training multiple models in parallel")
Not entirely sure about which question I missed, or what you want to assume. If it is this:
When you "played" with us - I'm assuming you just cloned our examples and ran us on the desktop? Likely more than a year ago before our c++ rewrite? I'd be curious to see if you ran us on spark as well.
Then no. It was around November, and I got the demos working, and attempted to build a custom network.
Edit: Was it the pyspark question? Then yes, but we also use Scala, Java and R (and SQL of course).
Would be curious to see the data around the economics of the different options.
But ... your own box would not be scalable. You'd still need AWS to speed up training.