- Newest
- Most votes
- Most comments
Hello.
The following document describes the GPU-equipped instance types that can be used with EC2.
https://docs.aws.amazon.com/dlami/latest/devguide/gpu.html
I checked the prices in the price list below, and I thought that "g4dn.xlarge" was the cheapest if you were running it on demand.
https://aws.amazon.com/ec2/pricing/on-demand/?nc1=h_ls
The g4dn is among the lowest cost GPU-based instances.
If your software supports Graviton arm64, you can explore g5g instance. It is available in Regions such as Oregon us-west-2.
There are two types of cost here: (1) cost to train, and (2) cost per hour.
If you are doing training jobs, you should use (1). If you're deploying only a single GPU as an endpoint for inference, then you should use (2).
So with inference (option 2), g4dn.xlarge has the lowest cost per hour
On the other hand, if you're training LoRA (option 1), then the answer changes. If the g6 has 2x the performance of the g4dn (see reference), it should take half the time to run the LoRA training job.
For each hour of training, the cost is:
- g6.xlarge: $0.8048
- g4dn.xlarge: $0.526
However, if the g6.xlarge takes half the time to train, we should divide $0.8048 by 2, whereby we would get $0.4024, which is cheaper than the g4dn.xlarge cost.
*Note: to be more accurate, it's best to check the 2x multiplier, by doing an actual benchmark, since performance will depend on the model, the quantisation used, etc.
Relevant content
- Accepted Answerasked 4 years ago
- asked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago