TIL what a computer is

Vooban
6 min readFeb 18, 2019

--

We just received the best late Christmas gift of all time, a Lambda Quad computer (and a t-shirt… Neon yellow… 2XL… Thxs Lambda Labs! It doesn’t fit, but it sure is comfortable!), which Vooban AI team members will use for its machine learning / deep learning algorithms / models.

Have you ever looked at a computer and got a fuzzy feeling in your stomach? Me neither. But not anymore! Looking at it makes me feel the way I should feel when I’m in a walk-in closet full of shoes (because I’m a lady. A real lady.). It has the look of a gaming computer (white case with a sleek design, large window on the side, fans everywhere…), and the power to do all the math problems you’ve ever seen in a matter of seconds.

For quite some time now, we’ve been using our computers and an external GPU cloud to do machine learning but we’ve quickly reached a point where our CPUs couldn’t handle the complexity of our code and the memory weight of our datasets. Running on GPU clouds for long periods of time would have been too costly for us so a Lambda computer was a much better option.

To give you an idea of what it represents, we recently trained models that required 13 hours of training on the Lambda computer. Running the same algorithms on a GPU cloud would have meant waiting more than double the amount of time. Truthfully, even if a Lambda is almost 20K, it clearly, really, undoubtedly is a good short and long-term investment.

What makes the Lambda so awesome

Lambda is an AI infrastructure company, providing computations to accelerate human progress.

Lambda has been around since 2012. They provide workstations, servers, and cloud services for people working with artificial intelligence. Their clients include Apple, Intel, Microsoft, Amazon Research and other big names as such. So, yeah… It should be pretty powerful. It sure sounds like it.

https://lambdalabs.com/products/quad

OS: Ubuntu 18.04

GPUs: 4x NVIDIA RTX 2080 Ti

CPU: Intel Core i9–7920X — 12 cores

RAM: 128GB

SSD: 4TB

HDD: 8 TB

If reading specs don’t ring any bells for you, you can consider the fact that it can reach 53 teraflops (a trillion floating point operations per second) vs a regular computer which can reach 22 teraflops (if you buy the latest MAC computer for a minimum of 6,000$…).

Fun fact, our Lambda Computer is the equivalent of the Earth Simulator 2 (ES2), a supercomputer from 2002.

By GenGen (げんげん) — http://photozou.jp/photo/show/185918/28925871, CC BY 2.1 jp, https://commons.wikimedia.org/w/index.php?curid=10049587

Machine learning and Deep learning

Artificial Intelligence (AI) is “the science and engineering of making intelligent machines that have the ability to achieve goals like humans do (John McCarthy, 1955)”. In other words, making systems that simulate human intelligence. Machine learning is a subfield of AI dealing with the learning part of our programs, and deep learning is a subset of machine learning.

A broad way of defining machine learning would be “algorithms that parse data, learn from that data, and then apply what they’ve learned to make informed decisions”, meaning that we build programs or models able to learn through data processing, just as a kid would do when we give it a bunch of pictures. It learns to recognize colors, forms, objects, etc.

Deep learning is doing just as such but in a much more complex manner. It uses a structure of algorithms in layers (artificial neural networks) capable of drawing conclusions and coming up with decisions. We’ve seen what deep learning could do when the AlphaGo AI defeated Lee Sedol (18-time world champion) back in 2016. For those who don’t know, AlphaGo is a computer program developed by Alphabet (Google) to play the game Go, well-known for being a real challenge in the field of AI. As of 2015, programs could only reach amateur level. https://deepmind.com/research/alphago/

The difference between a CPU and a GPU

A CPU (central processing unit) is the main computational module of your computer, designed for general computing workloads and running the majority of your engineering or office hardware. It is what we call “latency optimized”, meaning that it can do computation rapidly on small amounts of data (AKA: fetch small amounts of memory in your RAM quickly) but struggles when operating on a large amount of data.

A GPU (graphics processing unit) is a type of microprocessor, developed for quick image rendering and computing in parallel the same instructions (thread parallelism), which is what we call “bandwidth optimized”. It can fetch more memory in your RAM at once but has a much higher latency. Because it’s designed for thread parallelism, a GPU can handle lots of parallel computations using thousands of cores (vs 48 cores max for a server CPU or 8 cores for a typical consumer CPU) and deep learning needs A LOT of computations.

So, what a CPU does is it fetches memory from its RAM to the local memory on its chip (L1 and registers). All computations happen there and are directly attached to its execution unit (CPU: core, GPU: stream processor). Usually, the local memory is close to the execution engine and the smaller the L1 memory and the register's memory, the faster it can be accessed. A larger amount of memory would mean a greater distance to travel, thus, a reduction in memory speed access. AND, the great thing about a GPU is that it can have a bunch of small pack of registers for every processing unit. So, the more memory computational operations require, the more significant the advantages of GPUs over CPUs.

In other words, let’s say we want to take a lot of pictures of our food to show our friends how pretty and appetizing it is. We have a Polaroid camera (CPU) that takes pictures and prints them out instantly, and a big regular camera (GPU) that takes a lot of pictures but we must develop the films ourselves. If we want at least a thousand pictures, using the Polaroid camera would take us a lot of time as it prints out each picture one at a time. Using a regular camera would be much more efficient, but what if we have a bunch of regular cameras and we develop each film at the same time? That’s what is happening with our CPU and our GPU.

Or as a more visual way to explain things…

Why do we need GPUs in deep learning

The main reason why we use GPUs is because a Deep neural network structure is layers upon layers of thousands of identical artificial neurons performing vector and matrix multiplication operations. We can run our operations in parallel, meaning they can be calculated independently, then aggregated later. In some applications where we process images (convolutional neural networks) GPU graphics also speed up calculations (lighting effects, 3D effects…).

And in Deep learning, we experiment a lot. We experiment with multiple architectures and parameters where every small change in our code requires running our program again. It might not look like it but using a GPU can save you weeks of training.

Overall, we can say that machine learning and a powerful computer are a match made in heaven. Vooban acquired a Lambda Quad (undoubtedly a dream come true for every geek out there) in order for us to have fast results and work efficiently. We’ll use this opportunity to explore every project we build upon our creativity and our progressiveness (another match made in heaven).

But, in the end, the real question is, can you run Minecraft?

Yes.

Yes we can.

~(ツ)~

Written by Annie Deshaies, AI Developer at Vooban.

If you need help with an AI project, contact us at info@vooban.com

--

--