Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Follow publication

How to host your large ML model — 3 simple ways

Eivind Kjosbakken
Dev Genius
Published in
4 min readSep 18, 2023

--

I am currently working on a project where I have to call a large ML model from my front end. Large in this case referring to my model being a few Gigabytes large. Hosting the ML model became an issue because of its size, and consequently, I am creating this article to show you some suggestions on how to host your model. I will give you three options, together with links you can use, to easily be able to host your large ML model online.

Easily host your large ML model with this tutorial. Illustration source

Story overview

  • Method 1: Azure Webapp
  • Method 2: Azure Functions
  • Method 3: Local tunneling (completely free)
  • Conclusion

Method 1: Azure Webapp

Method 1 is using Azure Webapp. This is a simple way to host your backend using Microsoft’s Azure platform. This is particularly easy if you have a Django or Flask backend, as you can just follow this tutorial on how to deploy a Python (Django or Flask) web app to Azure App Service. If you are not using Django or Flask, you can likely find your stack in this tutorial, and follow that to host your application. One thing to note here is that there exists a free tier, though this tier has severe limitations when it comes to storage and RAM. If you use a more premium price tier, you can naturally get more storage, RAM, and other features. You can get the full pricing details on this page.

One thing I highly recommend if you are a student is receiving the 100 dollars (as of this tutorial’s writing) Azure credit from this page, so you can basically use the more premium tiers for free, as 100 dollars will last you quite some time. Note that you could use a similar feature on other large cloud providers like AWS and GCP.

The downside to this method however is that if your model is a few GB in size, you will likely have difficulties hosting a model for less than several hundred dollars per month. If this is a problem, I strongly recommend checking out method 3 in this tutorial.

With Azure Webapp you can easily host your backend. Photo by Glenn Carstens-Peters on Unsplash

Method 2: Azure Functions

--

--

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Written by Eivind Kjosbakken

Data scientist at Findable. Former CS Student at TU Delft and NTNU. I write articles about AI. Reach me at: https://www.linkedin.com/in/eivind-kjosbakken/

No responses yet

Write a response