Fetch Cuts ML Processing Latency by 50% Using Amazon SageMaker & Hugging Face

-


Violette's avatar


This text is a cross-post from an originally published post on September 2023 on AWS’s website.



Overview

Consumer engagement and rewards company Fetch offers an application that lets users earn rewards on their purchases by scanning their receipts. The corporate also parses these receipts to generate insights into consumer behavior and provides those insights to brand partners. As weekly scans rapidly grew, Fetch needed to enhance its speed and precision.

On Amazon Web Services (AWS), Fetch optimized its machine learning (ML) pipeline using Hugging Face and Amazon SageMaker , a service for constructing, training, and deploying ML models with fully managed infrastructure, tools, and workflows. Now, the Fetch app can process scans faster and with significantly higher accuracy.



Opportunity | Using Amazon SageMaker to Speed up an ML Pipeline in 12 Months for Fetch

Using the Fetch app, customers can scan receipts, receive points, and redeem those points for gift cards. To reward users for receipt scans instantaneously, Fetch needed to have the option to capture text from a receipt, extract the pertinent data, and structure it in order that the remainder of its system can process and analyze it. With over 80 million receipts processed per week—tons of of receipts per second at peak traffic—it needed to perform this process quickly, accurately, and at scale.

In 2021, Fetch got down to optimize its app’s scanning functionality. Fetch is an AWS-native company, and its ML operations team was already using Amazon SageMaker for lots of its models. This made the choice to boost its ML pipeline by migrating its models to Amazon SageMaker an easy one.

Throughout the project, Fetch had weekly calls with the AWS team and received support from a topic expert whom AWS paired with Fetch. The corporate built, trained, and deployed greater than five ML models using Amazon SageMaker in 12 months. In late 2022, Fetch rolled out its updated mobile app and recent ML pipeline.



“Amazon SageMaker is a game changer for Fetch. We use almost every feature extensively. As recent features come out, they’re immediately priceless. It’s hard to assume having done this project without the features of Amazon SageMaker.”

Sam Corzine, Machine Learning Engineer, Fetch



Solution | Cutting Latency by 50% Using ML & Hugging Face on Amazon SageMaker GPU Instances



“Using the flexibleness of the Hugging Face AWS Deep Learning Container, we could improve the standard of our models,and Hugging Face’s partnership with AWS meant that it was easy to deploy these models.”

Sam Corzine, Machine Learning Engineer, Fetch

Fetch’s ML pipeline is powered by several Amazon SageMaker features, particularly Amazon SageMaker Model Training, which reduces the time and price to coach and tune ML models at scale, and Amazon SageMaker Processing, a simplified, managed experience to run data-processing workloads. The corporate runs its custom ML models using multi-GPU instances for fast performance. “The GPU instances on Amazon SageMaker are easy to make use of,” says Ellen Light, backend engineer at Fetch. Fetch trains these models to discover and extract key information on receipts that the corporate can use to generate priceless insights and reward users. And on Amazon SageMaker, Fetch’s custom ML system is seamlessly scalable. “By utilizing Amazon SageMaker, we’ve a straightforward strategy to scale up our systems, especially for inference and runtime,” says Sam Corzine, ML engineer at Fetch. Meanwhile, standardized model deployments mean less manual work.

Fetch heavily relied on the ML training features of Amazon SageMaker, particularly its training jobs, because it refined and iterated on its models. Fetch also can train ML models in parallel, which hastens development and deployments. “There’s little friction for us to deploy models,” says Alec Stashevsky, applied scientist at Fetch. “Principally, we don’t must give it some thought.” This has increased confidence and improved productivity for the complete company. In a single example, a brand new intern was capable of deploy a model himself by his third day on the job.

Since adopting Amazon SageMaker for ML tuning, training, and retraining, Fetch has enhanced the accuracy of its document-understanding model by 200 percent. It continues to fine-tune its models for further improvement. “Amazon SageMaker has been a key tool in constructing these outstanding models,” says Quency Yu, ML engineer at Fetch. To optimize the tuning process, Fetch relies on Amazon SageMaker Inference Recommender, a capability of Amazon SageMaker that reduces the time required to get ML models in production by automating load testing and model tuning.

Along with its custom ML models, Fetch uses AWS Deep Learning Containers (AWS DL Containers), which businesses can use to quickly deploy deep learning environments with optimized, prepackaged container images. This simplifies the strategy of using libraries from Hugging Face Inc.(Hugging Face), a man-made intelligence technology company and AWS Partner. Specifically, Fetch uses the Amazon SageMaker Hugging Face Inference Toolkit, an open-source library for serving transformers models, and the Hugging Face AWS Deep Learning Container for training and inference. “Using the flexibleness of the Hugging Face AWS Deep Learning Container, we could improve the standard of our models,” says Corzine. “And Hugging Face’s partnership with AWS meant that it was easy to deploy these models.”

For each metric that Fetch measures, performance has improved since adopting Amazon SageMaker. The corporate has reduced latency for its slowest scans by 50 percent. “Our improved accuracy also creates confidence in our data amongst partners,” says Corzine. With more confidence, partners will increase their use of Fetch’s solution. “With the ability to meaningfully improve accuracy on literally every data point using Amazon SageMaker is a big profit and propagates throughout our entire business,” says Corzine.

Fetch can now extract more sorts of data from a receipt, and it has the flexibleness to structure resulting insights in keeping with the precise needs of brand name partners. “Leaning into ML has unlocked the flexibility to extract exactly what our partners want from a receipt,” says Corzine. “Partners could make recent sorts of offers due to our investment in ML, and that’s an enormous
additional profit for them.”

Users benefit from the updates too; Fetch has grown from 10 million to 18 million monthly lively users because it released the new edition. “Amazon SageMaker is a game changer for Fetch,” says Corzine. “We use almost every feature extensively. As recent features come out, they’re immediately priceless. It’s hard to assume having done this project without the features of Amazon SageMaker.” For instance, Fetch migrated from a custom shadow testing pipeline to Amazon SageMaker shadow testing—which validates the performance of latest ML models against production models to stop outages. Now, shadow testing is more direct because Fetch can directly compare performance with production traffic.



Consequence | Expanding ML to Latest Use Cases

The ML team at Fetch is continually working on recent models and iterating on existing ones to tune them for higher performance. “One other thing we like is having the ability to keep our technology stack up so far with recent features of Amazon SageMaker,” says Chris Lee, ML developer at Fetch. The corporate will proceed expanding its use of AWS to different ML use cases, corresponding to fraud prevention, across multiple teams.

Already certainly one of the largest consumer engagement software corporations, Fetch goals to proceed growing. “AWS is a key a part of how we plan to scale, and we’ll lean into the features of Amazon SageMaker to proceed improving our accuracy,” says Corzine.



About Fetch

Fetch is a consumer engagement company that gives insights on consumer purchases to brand partners. It also offers a mobile rewards app that lets users earn rewards on purchases through a receipt-scanning feature.

Should you need support in using Hugging Face on SageMaker to your company, please contact us here – our team will contact you to debate your requirements!



Source link

ASK ANA

What are your thoughts on this topic?
Let us know in the comments below.

0 0 votes
Article Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

0
Would love your thoughts, please comment.x
()
x