AWS Sagemaker or AWS EC2 for llm model training

Hi ! I have a question for ml practitioners who are familiar with AWS products.

In my workplace, we are assessing two options : using Amazon SageMaker or having an EC2 instance with GPU.

We mainly need the computing power (GPU) and nothing more. We are about to train a oss llm model with our own dataset. Havent considered regarding cloud gpu services such as (runpod and vast), current poc focus is on Aws products as our ecosystem is mostly in AWS itself.

Which is more adapted for our case cost-wise and from an ease-of-use point of view ?

Thank you in advance for your help.

Remind me! 3 days

I will be messaging you in 3 days on 2024-04-24 19:19:59 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

^(Parent commenter can ) ^(delete this message to hide from others.)


Remind me! 3 days

!remind me in 3 days

Remind me! 3 days

Ease of Use = SageMaker and possibility to make it prod ready too.

I’m sorry, based on the superficial level of your question I checked your post history, so forgive me if my answer is biased. There is a trend lately in this subreddit of people trying to build the next OpenAI with close to zero previous data or computer engineering knowledge.

How large is your dataset? How fast do you want to train it? How big is your budget? What are your preprocessing needs?

Generally speaking Ec2 will be cheaper and give you more control and flexibility. Sagemaker does have few features for mlops but from our team’s experience it’s still kind of prototype that aws is pushing out. From missing or old documentation to straight out bugs, every time we try to implement something new in sagemaker, half our time is spent fighting the tool rather than doing the actual work. For our project we have already started moving out of sagemaker and to ec2 instances and developing our own pipeline for the model

Yeah exactly there are way better gpu compute services than an ec2 instance with gpu. The nature of this question does not impute confidence.

When doing cost analysis, include salaries and mental health of employees who will be working on this project. Sagemaker is 4 times more expensive than EC2/EMR solution, but can be setup by someone with little experience. If your engineers are costing 2k per day, and you need 4 of them to learn about model training on EC2, you are gonna “invest” 50k+ into training before seeing any results.

With a sagemaker, It is all about how much you are going to train your models and how often. If it is a once a year thing, just do it. If it is a daily thing, then consider looking for alternatives.

Hi, thanks for responding, the reason i was specifically looking for aws was as mentioned in my post, most of the company ecosystem is in aws so it was preferred. i do know some of the other gpu compute services, could you list down the services that you know of, so i can check if there is something new in the market

Hi, Thanks for responding, i would say my dataset is around a couple of thousand rows. I am not looking for fast and slow, i need quality output hence whatever time is appropriate we are ready to give it. For budget there is no constraint as such as its a company project but then again i dont want recommend something costlier and later everyone finds out it could have been done for much cheaper which would be embarrasing(hence the sagemaker vs ec2 discussion).I’ll need to clean the data by handling missing values and possibly removing outliers. Then, I’ll explore feature scaling and encoding techniques based on the types of features present.

Why do you feel like ec2 is not scalable, maintainable,redundant and cant be monitored? could you give me a clear explaination on that please.

By prod ready do you mean, deployment, or building a production ready model? i suppose with ec2 we definitely can build production ready models

Couple of thousand rows?! Have you considered using a vector database/RAG instead?

how will it help? Can you explain

Deployment/Feature Registry/Model Registry and well documented ML Ops by AWS.

By

As a researcher I have always used a training job inside of sagemaker. Average cost of 40$ per training and in 16 bit precision avoiding parameter efficient finetuning degradation. Since building the codes with AWS is really annoying and they do not provide support, I decided to release the training notebooks I use at work.

https://github.com/javiagu13/AWS_LLM_Training

There you go!

Avoid notebook instances in AWS they will suck your money.

Use p4de instance even its bigger, training is faster and ends up being faster and cheaper (x8 A100)