18

Serverless BERT with HuggingFace and AWS Lambda

 3 years ago
source link: https://towardsdatascience.com/serverless-bert-with-huggingface-and-aws-lambda-625193c6cc04?gi=fa010b142d7a
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Serverless BERT with HuggingFace and AWS Lambda

Build a serverless question-answering API with BERT, HuggingFace, the Serverless Framework, and AWS Lambda.

BJV7N3Q.jpg!web

Photo by Samule Sun on Unsplash

Originally published at https://www.philschmid.de on June 30, 2020.

Introduction

“Serverless” and “BERT” are two topics that strongly influenced the world of computing. Serverless architecture allows us to provide dynamically scale-in and -out the software without managing and provisioning computing power. It allows us, developers, to focus on our applications .

BERT is probably the most known NLP model out there. You can say it changed the way we work with textual data and what we can learn from it. “BERT will help [Google] Search [achieve a] better understand[ing] one in 10 searches” . BERT and its fellow friends RoBERTa, GPT-2, ALBERT, and T5 will drive business and business ideas in the next few years and will change/disrupt business areas like the internet once did.

ia6jyuI.png!web

search language understanding BERT

Imagine the business value you achieve combining these two together. But BERT is not the easiest machine learning model to be deployed in a serverless architecture. BERT is quite big and needs quite some computing power. Most tutorials you find online demonstrate how to deploy BERT in “easy” environments like a VM with 16GB of memory and 4 CPUs.

I will show you how to leverage the benefits of serverless architectures and deploy a BERT Question-Answering API in a serverless environment. We are going to use the Transformers library by HuggingFace, the Serverless Framework , and AWS Lambda.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK