logoalt Hacker News

Serving Qwen via AWS Lambdas for fun and 80x negative profit

108 points • by octember • today at 3:28 AM • 15 comments • view on HN

Comments

iknownothow • today at 11:42 AM

Keep in mind that AWS Lambda has different performance characteristics based on how much memory you provide it.

1. For example a 10GB instance may have access to 6-ish cores. Also lambda instances under 1.3GB tend to have slower cores. [1].

2. There's the new aws managed lambda instances that can allow 32GB and 16vCPU instances [2]

3. Larger lambdas tend to have more network bandwidth so may be downloading layers from S3 might be faster [3]

Do you think it would make sense to stuff two or more layers into a larger lambda instances given that there's multiple cores and more memory available? I wouldn't be surprised if some optimizations would lead to only 20x negative profit :)

[1] https://aws.amazon.com/blogs/compute/optimizing-compute-inte...

[2] https://aws.amazon.com/about-aws/whats-new/2026/03/lambda-32...

[3] https://aws.amazon.com/blogs/compute/improving-lambda-functi...

➕ show 1 reply
catlifeonmars • today at 4:16 AM

I’m sure it’s still quite expensive but lambda can now access GPU instances via managed instances. I’d like to see the same thing implemented on some beefier GPU compute.

https://docs.aws.amazon.com/lambda/latest/dg/lambda-managed-...

➕ show 2 replies
cebert • today at 4:12 AM

I love it when folks experiment and try random approaches like this to see if it would even work.

➕ show 1 reply
enjoyyourlife • today at 6:55 AM

Needs to try Cloudflare Workers next

hizlikovboy27 • today at 7:01 AM

I love this madness. Its serves as an answer to that "what if?" question you have been harboring all this time. Im looking forward to seeing your new experiments with AWS Lambda documentation :)

janalsncm • today at 5:28 AM

Hey that’s pretty impressive even if it’s not economical.

First thing that came to mind is that you’re using a 4B model. If you can get away with something half the size, I think the numbers will be more favorable.

In order to do that you need an eval set, which you’ll want anyways if you care whether Jev or Open AI decisions or Gemini decisions are best for your problem.

Another thing is, you’ll probably be crushed on cold start unless you deliberately keep your lambdas warm.

➕ show 2 replies
iknownothow • today at 11:21 AM

> splitting a model call across 5,600 Lambdas is kinda wild.

100% wild! Absolutely amazing idea and implementation! The advantage (theorectical) I see with this approach is that you can run an abritrarily large open model yourself using this approach without having access to a large machine or GPU*.

* When cost, speed and practicality are of no concern :D

Do you know if a diffusion model lends itself better to this approach? Since token generation may not be serial?

jdw64 • today at 4:25 AM

>I need a GPU Who wouldn’t need a GPU? We all need one.

arbor-group • today at 2:57 PM

[flagged]

velocitixagency • today at 1:00 PM

[flagged]

kooyu • today at 9:24 AM

[flagged]