Learn how to build and serverlessly deploy a simple semantic search service for emojis using sentence transformers and AWS lambda. I’ll be honest wi

Serverless Deployment of Sentence Transformer models

submited by
Style Pass
2022-05-13 11:30:05

Learn how to build and serverlessly deploy a simple semantic search service for emojis using sentence transformers and AWS lambda.

I’ll be honest with you: deploying a serverless function is quite a shitty experience. There’s a huge number of steps you need to take, lots of provider specific configuration, and an extremely painful debugging process. But once you get your service to work, you end up with a really cost-effective and super-scalable solution for hosting all kinds of services, from your custom-built machine learning models to image processors to all kinds of cron jobs.

The goal of this post is to keep things as simple as possible without cutting corners. There are certainly simpler ways to deploy serverless functions (e.g. using chalice), but they come at the cost of severely limiting your flexibility. As in my previous post on Python Environment Management, I want to give you just enough information to cover most of your needs—not more, but also not less.

At the end of this article you will be able to deploy a serverless function in a way that allows you to move freely to other cloud providers (like Google Cloud Functions or Azure Functions with slight modifications) and is not limited to Python but allows to deploy any Docker image.

Leave a Comment