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

By hackernews · · AI News

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

I was curious if it was possible to run inference on self-hosted models using Lambdas. In this case I was very wrong, but it was a good lesson!

In my work at Bevyl I was really impressed by the performance and cost characteristics of AWS Lambdas. They can massively distribute and fan out CPU-bound work, which is amazing for things like ffmpeg on long videos.

So I was curious if it was possible to run inference on self-hosted models using Lambdas. It was a random idea built on a hunch, and I like to prove such ideas right or wrong by building. In this case I was very wrong, but it was a good lesson!

I picked H2O-Lightning, a fine-tune of Qwen3.5-4B, because I wanted a small model built for decisions. I figured if this architecture had any legs, only doing decision models (a single forward pass) is the move. A decision model reads a document and answers a question about it by picking one option.

Fanning out

So the trick, if it's possible, would be fanning out. I was inspired how Remotion uses massively parallelized Lambdas to render videos.

I wanted to prove this was possible to do, so I kept a constraint of a 3 GB limit for Lambdas. The whole model is 9.3 GB, so it does not fit in one.

What Hacker News is saying

  • “I love it when folks experiment and try random approaches like this to see if it would even work.”
  • “I’m sure it’s still quite expensive but lambda can now access GPU instances via managed instances.”
  • “>I need a GPU Who wouldn’t need a GPU?”
  • “Hey that’s pretty impressive even if it’s not economical.”

Read the full discussion on Hacker News →

Source: https://noahbuilt.it/writing/qwen-on-5600-lambdas

More stories