<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Neuro Ai - Medium]]></title>
        <description><![CDATA[Stories and insights from the Neuro Ai team. - Medium]]></description>
        <link>https://medium.com/neuro-ai?source=rss----3a6e90a095a4---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Neuro Ai - Medium</title>
            <link>https://medium.com/neuro-ai?source=rss----3a6e90a095a4---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:58:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/neuro-ai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A comparison of enterprise GPU training times in common ML vision models (V100/T4/M60)]]></title>
            <link>https://medium.com/neuro-ai/a-comparison-of-enterprise-gpu-training-times-in-common-ml-vision-models-v100-t4-m60-84e864982d46?source=rss----3a6e90a095a4---4</link>
            <guid isPermaLink="false">https://medium.com/p/84e864982d46</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[neuro-ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Paul Hetherington]]></dc:creator>
            <pubDate>Mon, 21 Sep 2020 11:53:25 GMT</pubDate>
            <atom:updated>2020-09-21T09:42:20.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>A comparison of enterprise GPU training performance in common ML vision models (V100/T4/M60)</h3><p>This study was initially started when surprising variations in compute speed between GPUs were observed on the server infrastructure at <a href="https://neuro-ai.co.uk/">Neuro Ai</a>. Our core product is an API for general-purpose ML computing. Models, along with datasets, are sent via a python library and are then allocated a server in our Virtual Private Cloud (VPC) network. We offer industry-standard models &amp; datasets natively so that you don’t have to construct or maintain them yourself, as is common practice. It was observed that the T4 and M60 GPUs can provide comparable performance to the V100 in many instances, and the T4 can often outperform the V100. Networks that have been specifically designed to minimize data logistics show better performance on the T4 suggesting that the larger compute space on the V100 causes bottlenecks to arise that decrease its performance.</p><p>Our goal with this study was to observe speeds that a typical AI/ML developer would observe when using standard enterprise GPUs, instead of trying to emulate sterile optimal lab results that are produced by the designer/manufacturer. We will be repeating this study for common NLP models in the future.</p><h3>GPUs &amp; servers used</h3><p>The aim of this study was to explore the GPU compute time variations between typical enterprise GPUs and how this corresponds to the pricing of each GPU. This study used typical On-Demand ML servers from AWS (Ubuntu 18.04). Relevant information about the servers is provided below:</p><ul><li>T4, g4dn.xLarge (4 vCPU, 16GiB RAM, 125GB NVMe) Europe (London), $0.615 p/h</li><li>M60, g3s.xLarge (4 vCPU, 30.5GiB RAM) Europe (London), $0.94 p/h</li><li>V100, p3.2xLarge (8 vCPU, 61GiB RAM) Europe (London), $3.589 p/h</li></ul><p>All servers were created using the same AMI which automatically installs the latest drivers for present hardware.</p><h3>Models and Datasets used</h3><p>All models used are available through the <a href="https://docs.neuro-ai.co.uk/models.html">Neuro API</a> global models library, and the equivalent for all <a href="https://docs.neuro-ai.co.uk/datasets.html">datasets</a>. The models used are given below, and are all in PyTorch (and are float 32):</p><ul><li>Densenet161</li><li>Googlenet</li><li>Mnasnet1_0</li><li>Mobilenet V2</li><li>Resnet</li><li>Resnext</li><li>Shufflenetv2x1_0</li><li>VGG</li><li>Wide Resnet</li></ul><p>In this study, the same dataset was used for all training: <a href="https://docs.neuro-ai.co.uk/datasets.html#cifar10">CIFAR10</a>. The training and validation split used was 80%-20%. The total dataset has a shape of [60000, 3, 32, 32].</p><h3>Loss and optimizer</h3><p>All tests used the same <a href="https://docs.neuro-ai.co.uk/loss.html#sparse-cross-entropy-loss">Sparse Cross-Entropy Loss</a> for categorical classification. This expects the output of the model to be logits, for the combination of Softmax and NLL loss. The optimizer used was <a href="https://docs.neuro-ai.co.uk/optimisers.html#sgd-optimiser">SGD</a> with a learning rate of 0.01, and a momentum of 0.</p><p>In the future, we will be exploring the effects of various optimizer and loss functions, but they are not explored here.</p><p>There are two primary areas that affect the total time taken for a given ‘task’ (inference/prediction and training): data transfer to and from a GPU, and then actual compute ability. Data transfer speeds both to internal and external sources can have a surprising impact on overall performance, this will be discussed later.</p><p>As the focus of this study is to compare the GPU compute time, a given test start time is noted at the start of memory transfer from RAM. The finish time is taken when the results are offloaded from the card. For training, this means that the new parameters (weights) are loaded back into RAM, and for predictions/inference, the time is taken to receive the output of the network. Each test was run approximately 3 times and the shortest time is taken.</p><h3>Results</h3><p>All following tests were carried out using the previously mentioned conditions over 5 epochs. Each graph on the left shows the comparison of times to compute the final result, and graphs on the right show the % time difference between the M60/T4 compared to the V100.</p><h4>ResNet series</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*hhxzH7_gtJjeOKji1c4xQg.png" /><figcaption>ResNet-18</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*vKN5MX3q8eGiuJI2UvWtrg.png" /><figcaption>ResNet-34</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*5JwTDQjgDrnv-x6JWkpqZQ.png" /><figcaption>ResNet-50</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*ai31szTrqIp1Q9jd_2tYiw.png" /><figcaption>ResNet-101</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*eKTfhuvkbu6CgYkwndOkwQ.png" /><figcaption>ResNet-152</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*IaGyeGP9ZDJ5IxmlGSkFug.png" /><figcaption>Wide ResNet50 2.0</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*OsSvZfZwSULFHogo29Kerg.png" /><figcaption>Wide ResNet101 2.0</figcaption></figure><h4>ResNext Series</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*XKqQ83Dfyw-KxAPOXdzINA.png" /><figcaption>ResNext-50</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*fX2zf2BoLUX_bxeLRlIcBA.png" /><figcaption>ResNext-101</figcaption></figure><h4>VGG Series</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*MB_QXRpz3pSVJ48C0iJD6Q.png" /><figcaption>VGG-16</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*5Lrmx-3_WOxT87MmmDlsPQ.png" /><figcaption>VGG-19</figcaption></figure><h4>Other Networks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*ZDzAO8S5xSJwin7GXKLLWQ.png" /><figcaption>ShuffleNet V2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*LJTvtqSBk1bjodFipHQqAA.png" /><figcaption>MobileNet V2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*M7CEHzqZ3OcqufnZeNwqcg.png" /><figcaption>MNASNet V1.0</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*RF2ilSV_n_6qiHB42ln1vg.png" /><figcaption>DenseNet-161</figcaption></figure><h4>Image size variations</h4><p>We also conducted another test comparing computational speed variations when the input image size is increased. With DenseNet161 and image sizes of 128x128, 64x64, 32x32 the training procedure across a data set of 1k samples took 151 seconds, 145 seconds, and 146 seconds respectively. This was using: Sparse Cross-Entropy Loss, 20 epochs, batch size of 16, and the SGD optimizer on a V100. The same was repeated on a T4 with the following times respectively: 150 seconds, 95 seconds, 93 seconds.</p><h3>Why the discrepancies?</h3><p>Trying to pinpoint the exact reason for variations in the expected and observed performance in GPUs is a nontrivial task. Some initial thoughts as to why they exist are around the physical distribution of memory and compute cores internally in the GPUs.</p><p>As you add more cores in an attempt to take advantage of parallel-ability, bottlenecks naturally arise that slow down the computational speed. The more cores, the more potential delays due to core synchronization and the more strain that is put upon memory interfaces. With a speed of 8.1TFLOPS (32bit) the T4 GPU uses GDDR6 300GB/s, and with 15.7TFLOPS (32bit) the V100 uses HBM2 with 900GB/s. These two cards have 320/2560 and 640/5120 Tensor/CUDA cores respectively.</p><p>There is significantly more compute space on the V100, but with certain training pipelines, it’s possible that this is in fact slowing it down. The amount of time taken to move data around the device is simply slower than limiting to few compute cores. Most AI/ML frameworks will default to using the majority of a GPU. Reducing the number of computing cores used could increase the total training speed, but defeats the point of then having more cores. This hypothesis is supported by the final test conducted exploring the effects of various image sizes. The T4 hits a clear bottleneck causing its training speed to skyrocket with the V100 having more room to perform at a similar level to previous image sizes. This is further supported by the clear optimal performance of the T4 when training the ShuffleNet V2. As this network was designed to minimize memory requests, the clear bottleneck in the V100 compared to the T4 is compute core count and resulting issues.</p><p>At $8,000-$10,000 per device, you better be using all of the cores on a V100. A T4 will set you back around $3,000-$4,000 per unit but has been shown to produce very comparable results to a V100 in several instances if it doesn’t outperform it. An M60 varies more in price at $4,000-$6,000 depending on the source. When taking into account the hosting fees per server for each GPU and the time taken to compute, ditching the V100 becomes a very compelling idea.</p><p>The larger the batch size the more valuable the compute cores on the V100 become. If you’re working with batch sizes larger than 256–512 the V100 makes more sense.</p><h3>Now what?</h3><p>Training pipelines vary dramatically often with large data logistics to and from the GPU. Having more compute power is great, but not when it slows the whole process down (especially not when it costs and arm and a leg). Long term I believe that AI accelerator cards will adopt a lower core count, and process larger tensors without breaking them down.</p><p>We’ve got a processor in the works tackling this, more on this another time…</p><p>So, we’ve seen that pricing and compute speed for these GPUs varies drastically, what does that mean for you though? What can you take that is useful from this? How do you find the best server/GPU, your needs change frequently right? Our API at Neuro uses metadata about your models to find the optimal server to run it on, and then only charges for GPU time. No other hosting fees. Neat ey. Because you never touch the hardware yourself, that’s all of the infrastructure taken care of. If you need 1 or 100 servers, we’ve got you covered.</p><p>Make an account using <a href="https://dashboard.neuro-ai.co.uk/register?referral=c4ca4238a0b923820dcc509a6f75849b">this link</a> to get a bunch of free credits to try it out! Feel free to reach out to me directly — paul@neuro-ai.co.uk</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84e864982d46" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neuro-ai/a-comparison-of-enterprise-gpu-training-times-in-common-ml-vision-models-v100-t4-m60-84e864982d46">A comparison of enterprise GPU training times in common ML vision models (V100/T4/M60)</a> was originally published in <a href="https://medium.com/neuro-ai">Neuro Ai</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neuro Ai: The API for ML Compute]]></title>
            <link>https://medium.com/neuro-ai/neuro-ai-the-api-for-ml-compute-f7ba2708daa0?source=rss----3a6e90a095a4---4</link>
            <guid isPermaLink="false">https://medium.com/p/f7ba2708daa0</guid>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Oscar Rovira]]></dc:creator>
            <pubDate>Thu, 17 Sep 2020 15:39:02 GMT</pubDate>
            <atom:updated>2020-09-16T13:48:06.995Z</atom:updated>
            <content:encoded><![CDATA[<h4>Train, predict and deploy your models in the cloud in seconds.</h4><p>ML is hard enough by itself that we shouldn’t have to worry about expensive hardware, fastest hardware, drivers, deployment, cloud providers, hidden cloud charges, etc, right?</p><p>Well, <strong>you are damn right and</strong> <strong>I agree with you</strong>.</p><p>Imagine that every business that benefits from the delivery market, from restaurants to retail shops, had to build their delivery infrastructure. They would need to upfront the expensive cost of hiring a delivery team, create a system that is fast, cost-effective, and scales with the number of clients. Although some very large companies may be able to afford this, <strong>most companies won’t and they will rely on outsourcing the delivery service</strong>.</p><p>Something very similar happens with AI startups and their ML compute. <strong>Except their only option is to build all or part of the infrastructure in-house. </strong>Until now<strong>.</strong></p><h3>Context</h3><p>The process of building an AI system for any company or AI team can be summarised in the following stages:</p><ul><li>Collect and prepare data</li><li>Build an ML model that fits the data</li><li>Train and tune the ML model</li><li>Deploy or run predictions on real-case scenarios</li></ul><p>Unfortunately, there is no simple way that an ML engineer can contribute to all of these 4 stages with the comfort of tools and AI frameworks they already know, such as Jupyter Notebooks and TensorFlow or Pytorch. Each of these solves a specific stage in the process.</p><p>Currently, at least a DevOps or software engineer is required to build and maintain an infrastructure that allows the ML engineer to train, tune, and deploy their machine learning workflow efficiently. And it’s known that cloud bills get very expensive for every team. In fact, on average, 25% of revenue from AI companies is spent on cloud resources<a href="https://a16z.com/2020/02/16/the-new-business-of-ai-and-how-its-different-from-traditional-software/">*</a>. So you want to make sure you can optimise for cost while reducing the amount of time you are hanging around waiting until your model is trained, often that is days. So a good infrastructure that removes all burdens from the ML engineer while keeping an eye for the cost, is necessary.</p><h3>Current Scenario</h3><p>ML engineers love working from Jupyter Notebooks, and it makes sense, it lets you quickly explore and visualise your data and iterate with your models, while keeping everything tidy in one place. Most of the existing solutions to solve the burden of AI infrastructure is to add steroids to these notebooks by hosting them on a machine with a GPU so everything you run, runs with a GPU. And that’s the first issue, <strong>not everything you run on a notebook requires a GPU or an accelerator card</strong>.<strong> </strong>The most compute-intensive part of the process is training and tuning the ML model, which benefits from the fastest GPU. The rest of the pipeline can be run on CPUs.</p><p>So, instead of adding steroids to entire Jupyter Notebooks, <strong>why not just use and pay for a GPU when you need it</strong>?</p><p>One of the reasons why products like Gradient or FloydHub suck is that you are literally paying when you don’t need to.</p><p>The other issue with Jupyter notebooks is that they are meant for prototyping and not for deployment, so what ends up happening is that ML teams use separate tools for prototyping and then give it to a more software-focused team to create an infrastructure that puts their models into production.</p><p>Further to Jupyter Notebook specific solutions, there are other solutions directly from the big cloud providers that try to remove this burden in infrastructure. However, they lack flexibility for different specialised hardware and private or local clusters, which limit the individual requirements of each AI team. A perfect example is Amazon SageMaker which sucks in experience, fixes you on their available resources, and good luck understanding how much they overcharge you.</p><p>Wouldn’t it be great a service that <strong>allows you to work from anywhere</strong>, from a python script or Jupyter Notebook, <strong>it’s cloud-agnostic</strong> and <strong>only charges you when you require intensive computing power</strong>?</p><h3>Introducing the Neuro API</h3><p>We’ve created a dead-simple API that enables data scientists and AI teams to prototype and deploy ML workloads in top-tier cloud hardware in seconds.</p><blockquote>Pay for a GPU only when you train or predict.</blockquote><p>Making the Neuro API the cheapest option, since only the compute-intensive tasks run on the cloud. <strong>You only pay for the time taken to run a task on a GPU</strong>. No over-heads and you control exactly how much you spend.</p><p><strong>Cheap doesn’t mean slow!</strong> Our API scales with your tasks and is optimised to run on the fastest hardware for your task and pricing model chosen.</p><p>From internal research, we know some tasks run faster on some GPUs depending on model structure, batch size, training, or prediction, among other variables.</p><p>We currently support 1 pricing model of £2.5 per hour, which includes top-tier hardware such as Nvidia V100. We will soon include 2 more options, a cheaper and a more expensive cost tier with different hardware to serve the needs of everyone.</p><p><strong>We’ve built the infrastructure so you can focus on the AI.</strong></p><h4>How it works</h4><p>The process is simple,</p><ol><li>You build the ML model using your favourite framework (TF/Pytorch/ MXNet).</li><li>Use the Neuro API to train or run predictions on your model and datasets.</li><li>Your model and datasets get uploaded to the cloud and we use ML to distribute your tasks on the best hardware and cloud provider.</li><li>You can view all your tasks running on the Dashboard.</li><li>Download the trained model or results wherever you want after the task is completed.</li></ol><h4>How to use it</h4><p>This is all you require to train your Pytorch model on the cloud,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*ZdyZb2vLoa74O53AuYBb7g.png" /></figure><p>With the Neuro API, adding just <em>a couple of lines of code</em>, you can add steroids to your ML model to run on the cloud 💪.</p><p>But first, let me explain each of the 3 lines above.</p><p>There are <strong>5</strong> <strong>core functions</strong> in the Neuro API,</p><h4>npu.<strong>api()</strong></h4><p>Every user is given a token that allows them to use the API. At the beginning of your script simply write the following with your corresponding “API_TOKEN” to activate the API,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*YN-UEUtsYx5KrNoVy7Mwtg.png" /></figure><h4>npu.<strong>compile()</strong></h4><p>You need to compile your model to upload it via the API by simply passing the object model as follows,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*FOVofLZWgHngDdLPTFQHOw.png" /></figure><h4>npu.<strong>train()</strong></h4><p>With the model uploaded, now it’s time to run training. This one just requires the main parameters to train your model. You have to pass the <strong>compiled model</strong>, a tuple of <strong>x and y data for training</strong>, an optional tuple of <strong>x and y data for validation</strong>, the <strong>loss function</strong>, the <strong>optimiser</strong>, the <strong>batch size</strong> and finally the <strong>epochs,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLLo2DyTT6-nFjW96MTjcw.png" /></figure><h4>npu.<strong>predict()</strong></h4><p>With the model trained, you can now run predictions and download them to your computer as follows,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2POrCTcQadpBYhjzj-gpRg.png" /></figure><h4>npu.export()</h4><p>And if you want to download the trained model, exporting your model back to the original library is straight-forward,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j66HGRHK8zPpbn7oAqp3-w.png" /></figure><p>Oh! And to install the Neuro API library is as simple as,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*DvHRX9RHyK2pfGtuVn4xdA.png" /></figure><h4>Dashboard</h4><p>From the dashboard you can monitor all the tasks you are running. Your trained models will be available from here as well as any datasets you may have uploaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ks03Cy_lLgVhLPXsbGByNQ.png" /></figure><p>This is the Neuro API, an API that let’s you focus on building the best ML models without requiring you to be a software engineer and only paying for the exact compute time of your tasks. <strong>So you can train, predict and deploy your models in the cloud in seconds.</strong></p><p>You can <a href="https://dashboard.neuro-ai.co.uk/login">sign up</a> today and receive free credits to try it out!</p><p>Much more information with details, examples and tutorials is available in our <a href="https://docs.neuro-ai.co.uk/">documentation</a>.</p><p>We are still in Beta and every week we are adding more features. If there is anything you would like to see for you or your company, feel free to ping me: <em>oscar(at)neuro-ai.co.uk.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7ba2708daa0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neuro-ai/neuro-ai-the-api-for-ml-compute-f7ba2708daa0">Neuro Ai: The API for ML Compute</a> was originally published in <a href="https://medium.com/neuro-ai">Neuro Ai</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>